summaryrefslogtreecommitdiff
path: root/libloragw/src
diff options
context:
space:
mode:
Diffstat (limited to 'libloragw/src')
-rw-r--r--libloragw/src/loragw_lbt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libloragw/src/loragw_lbt.c b/libloragw/src/loragw_lbt.c
index 9c43521..a9a858f 100644
--- a/libloragw/src/loragw_lbt.c
+++ b/libloragw/src/loragw_lbt.c
@@ -345,7 +345,10 @@ int lbt_is_channel_free(struct lgw_pkt_tx_s * pkt_data, uint16_t tx_start_delay,
/* lbt_time: last time when channel was free */
/* tx_max_time: maximum time allowed to send packet since last free time */
/* 2048: some margin */
- if ((delta_time < (tx_max_time - 2048)) && (lbt_time != 0)) {
+ // if ((delta_time <= (tx_max_time - 2048)) && (lbt_time != 0)) {
+ // delta time check did not allow 400 ms packets, change to simple check against packet duration
+ // Japan STD regulations allow 400ms packet duration from start of tx
+ if ((packet_duration <= (tx_max_time)) && (lbt_time != 0)) {
*tx_allowed = true;
} else {
DEBUG_MSG("ERROR: TX request rejected (LBT)\n");