Closed Bucknalla closed 6 years ago
Hi @Bucknalla, ADR information is a bit scarce in the specifications but from what I understand there isn't any set rule on where ADR should start, for example the node can start trying ADR at the highest DR=5 (SF7BW125) and slowly lower until it achieves successful transmission, but it can also start at DR=3 (SF9) - if there is previous evidence SF7 won't work - which will make the connection process much quicker and robust, no need to wait for many missed packets.
So there is still value in keeping the data rate setting even when ADR is enabled. I may be wrong - definitely welcome any comments - but I see ADR as more as a "turn on link optimisation" and not so much as a fully automatic process.
Actually to me ideally it would be a run-time flag and not require a full re-init of the LoRa class. This would then better suit nodes which may be moving (ADR off) at times and be static (ADR on) at others
Hi 👋 I'll close this issue because it has not had any recent activity. Thank you for your contributions!
(sysname='LoPy', nodename='LoPy', release='1.6.13.b1', version='v1.8.6-593-g8e4ed0fa on 2017-04-12', machine='LoPy with ESP32', lorawan='1.0.0')
When ADR is enabled for the LoRaWAN class, the data rate is still expected to be set in the socket setsockopt() method.
Where the LoRaWAN constructor is called as following:
lora = LoRa(mode=LoRa.LORAWAN, frequency=868000000, adr=True)
And the produced error is as follows:
The ADR should not require the data rate to be set inside of the socket class as the gateway should provide feedback and control over data rate.
Thanks!