-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LoRaWAN] Improve persistence behaviour, add dwell time error, clear up debug output #980
Conversation
WIP. |
@StevenCellist we can convert a PR back to a draft if you need more time for working on this. |
Just more improvements in progress with the help of my friend. Keeping it a PR will maybe help people finding it in case they want to use it. But draft also fine by me.. mostly: don't merge yet :) |
Now also fixes #968, expecting more WIP |
PR changelog:
|
Co-Authored-By: HeadBoffin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@StevenCellist very good job as always! I left I couple comments/clarifications.
@StevenCellist FYI I pushed a minor update to LoRaWAN in 9f0bdff |
Thanks for the heads-up. I will fix the mentioned points tomorrow! |
In addition to earlier changelog (missed + new item):
PR is tested on the following configurations:
Actually now also confirmed that forced MAC uplinks (when too large to piggyback) also work as intended! @HeadBoffin is willing to give it a quick go tomorrow; once he's given his blessing, it's ready for merge! |
Smoke test of non-persistant & persistent looks good to go! |
Amazing guys, thanks for this! @StevenCellist I see no reason to not bump to 6.4.3, I will do that ASAP. |
@jgromes I heard that @HeadBoffin is looking to update the examples a bit more - maybe we can wait one or two days to get them into the next release as well? :) |
@StevenCellist sure, we can wait a bit. I also wanted to merge #990 before this next update, which has been done, so update of examples is probably the last thing left. |
Changelog is pretty much in the commit titles (except that I didn't re-fork so there are two old commits as well).
Fixes #976, now also tested through PIO Remote at @HeadBoffin's setup that is starting to get running. Before this makes it into a new version, we can hopefully give it a good shot through a certain 'test-suite', we're getting there!
Most important change is that join-accept information is now only saved through
node.saveSession()
;node.beginOTAA()
now only saves the Nonces to adhere to LW spec. The resulting behaviour should also be less confusing for new users.This change is achieved by keeping the keys in EEPROM all zero until
saveSession()
is called. As soon asbeginOTAA()
is called, it checks if the keys are all zero (in which case a new join must be issued with the existing, increased Nonces); if the keys are present,saveSession()
was apparently called at some point and we can safely assume that restoring is fine.ABP mode does about the same, except that it can't do a new join, so if its keys are all zeroes it will restart from 0-frame counters.