helium / router

router combines a LoRaWAN Network Server with an API for console, and provides a proxy to the Helium blockchain
Apache License 2.0
69 stars 32 forks source link

AU915 Join on DR4 channel stalls the end-device #724

Closed mikev closed 2 years ago

mikev commented 2 years ago

Describe the bug Browan has discovered an issue for the AU915 and US915 Region.

For AU915 the Gateway listens on a DR4 compatible channel but the Join response channel mask uses 8 to 15 and disables all DR4 compatible channels (including the one we listen on). The device is randomly hopping around all AU915 channels and may join on any of them, but eventually is getting unlucky enough to join on this DR4 channel.

We attempted an earlier fix by setting the DRIndex and TXIndex to 0xF and 0xF. The belief was this would be a signal to the end-device to ignore or reset it's DR settings, however the end-device continue to use DR4. Thus the end-device is stalled.

Possible solutions the LNS side to resolve it:

To Reproduce Discuss with browan

Expected behavior End-device joins successfully

Solution The function build_link_adr_req knows if the Uplink is DR4 or DR6 and outside of the range of the regular Uplink channels. We detect this condition and set both TxPower and DRIndex to zero. Otherwise leave the TxPower and DRIndex the same.

pvolodin commented 2 years ago

I believe this issue can easily be reproduced for US915 too, seems to be a reincarnation of #633, it may be good to reopen that issue.

We attempted an earlier fix by setting the DRIndex and TXIndex to 0xF and 0xF. The belief was this would be a signal to the end-device to ignore or reset it's DR settings, however the end-device continue to use DR4.

Hm. #656 discussion.

pvolodin commented 2 years ago

Hm. #656 discussion.

What LoRaWAN version do Browan devices support?

mikev commented 2 years ago

Create build_link_adr_req to handle this case. https://github.com/helium/erlang-lorawan/pull/9/files