diff options
author | Jason Reiss <jreiss@multitech.com> | 2021-06-17 14:29:00 -0500 |
---|---|---|
committer | Jason Reiss <jreiss@multitech.com> | 2021-06-21 11:18:12 -0500 |
commit | cea35975ee9c7fcb2731b6fa5d69e67637d1e3cb (patch) | |
tree | af9734565e8d41de64f5c6b6c8bf5b9092f97d73 | |
parent | 6de6dd75a232f9abb5aaffba3aba5a67c7b91576 (diff) | |
download | lora_gateway_mtac_full-cea35975ee9c7fcb2731b6fa5d69e67637d1e3cb.tar.gz lora_gateway_mtac_full-cea35975ee9c7fcb2731b6fa5d69e67637d1e3cb.tar.bz2 lora_gateway_mtac_full-cea35975ee9c7fcb2731b6fa5d69e67637d1e3cb.zip |
lbt: adjust packet duration check to allow 400ms, check was there to only allow tx within 4s of last ch free time, channels are checked more frequently than every 4s
-rw-r--r-- | libloragw/src/loragw_lbt.c | 5 |
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"); |