Closed dbrgn closed 2 years ago
When waking up from deep sleep, do mac join abp to join without the OTAA process
Do we currently do that?
I think we don't actually need to do that, since the power is never cut. So when we wake up in the main loop, the RN2483 still remembers its credentials.
Should we close this?
We're switching to ABP.
TODO: Find out how we can persist the counter value! Probably mac save
.
We can persist the data with mac save
. This saves both the ABP keys as well as the counters to EEPROM.
Because the setting of the keys also takes a while, we can employ the following logic:
mac get devaddr
). By default, this will be 0000000
.mac set devaddr <x>
, mac set appskey <x>
, mac set nwkskey <x>
and mac set upctr 0
mac join abp
mac save
to persist all dataBefore we close #16, the restoring of the counter values should be verified. But for that, we first need to implement standby.
It seems to work nicely! See commit https://github.com/gfroerli/firmware/pull/111/commits/481b84f7b88b3d81a52a10b2e730f1ea9f04a84b.
mac join otaa
if not already joined, seehasJoined()
) and domac save
mac join abp
to join without the OTAA process