Storing OTAA Join Keys

Hi,

Anyone have experience saving the keys gained from a OTAA join?
Is the eeprom the best place to store them?
I would like to store them to avoid the device having to try a join request every time it is turned off.

Any tips/examples would be appreciated!

Thanks

There are more parameters to store than just the keys…the state of the stack is a bit more complicated than that. Frame counters plus more subtle internal parameters and I don’t believe they are exposed. Having said that, the LORAWAN_Net_Reservation config item is supposed store the keys (but I’ve never gotten it to work, every time I’ve tested it the function to read it says it’s invalid - advice was that join + one successful downlink was required?). I’m not sure how many write cycles the eeprom has either, you certainly can’t store the frame counter on every packet without nuking it.

It is easier (if it’s configured correctly, this is the slightly harder bit) to go to sleep and consume nA (and be able to be woken up by interrupts).