Using lower DR or SF/BW in OTAA Join
-
I am able to join a node to my nano gateway when it is configured to use a SF=7, BW=125 but when I config it to use SF=12 and BW=125 no join request is received.
I don't seem to be able to configure a LoRaWAN OTAA join to use a datarate of 0 (sf12, bw=125). Someone else has mentioned this in another post Set join SF and the reasons why this should be configurable. Is there a chance this will be configurable?
However looking at the code it would appear (maybe I'm wrong) that a join will cycle through various data rates 0-5 in a curious manner by doing a modulo on an incrementing value. If that is indeed the case then it should at some time use a DR0 (sf12, bw125) and the gateway should be joined. But it never seems to.
I think these are the calls made by a OTAA join.
Lora sends join cmd here
puts it into FreeRTOS Queue here
Queue request handled here which cycles until joined/timeout
calls this code which increments a counter and then
calls AlternateDataRate repeatedly which modulo against the counter using some strange divisors to get a DRIf I'm correct, then this last step that calculates the DR of a join is almost always going to generate a DR5 and very little else.
-
OK This seems to be a restriction introduced by LoRa Alliance. It seems a join request uses AlternateDatarate() to cycle over datarates 0-5 in way that makes 5 dominant. See below for the first cycles. Doesn't explain why I can't join a nano gateway with a SF=12, BW=125.
55555554 55555553 55555552 55555551 55555554 55555550 55555554 55555551 55555552 55555553 55555554 55555550 55555554 55555553 55555552 55555551 55555554 55555550 55555554 55555551 55555552