BNNorman / dragino-1

LoRaWAN implementation in python
Other
13 stars 3 forks source link

Impossible to Set a Fixed SF #3

Closed palia95 closed 2 years ago

palia95 commented 2 years ago

Hi, Am I the only one unable to set a fixed SF to 7? If I set it into the Toml file (ADR = 5), then the node can't join the TTN network, while if I keep it at ADR = 3, then it joins the network correctly but with SF9. I need to use SF7, ADR is not enabled in TTN but the problem persist, where am I wrong? Thank you for your work

BNNorman commented 2 years ago

Sorry for the delay in answering this.

I'm a little confused by you saying you are setting ADR=5 in the toml file. I think you mean date_rate=5?

The file cache.json is used to store the dynamic settings and supercedes those in the TOML file. If you have previously joined at DR3 that will be the value stored in cache.json. Try deleting cache.json and then change your data_rate to force a join.

palia95 commented 2 years ago

Hi, thank you for your answer.

Yes sorry, not ADR but date_rate, my misspells. If I delete the cache and I set date_rate=5 (so SF7), only the first join message is sent at SF7, then, even if the GW transmit the join accept, the dragino is stuck in "Waiting", while if I leave date_rate=3 (so SF9) it works flawlessly. I really can't understand where I'm wrong. Thank you anyway for your effort.

BNNorman commented 2 years ago

Ok, I'll see if I can replicate this.

BNNorman commented 2 years ago

Just done a quick check at DR5 - it worked on my device. Did you also set RX1_DR=5? In the UK the RX1 window is,initially, the same datarate as the uplink.

palia95 commented 2 years ago

Ok, that was the issue, I didn't set the RX window DR the same as the TX. Thank you!