RAK811 accessing keys after successful OTAA join

How can I get the join data after a successful OTAA join?

More details:

I clear device address, network session key and app session key via the following command:


I do an at+join=otaa and get the 3,0,0 response and I’m able to send data through to TTN.

However, I get an ERROR-2 reply to all following commands:




w=Which means information is not available, again, I’m able to send data to TTN in this situation (since the OTAA join was successful). I assume this means the keys and device address are not going to be stored in the flash.

I understand the at+get_config commands call the data from module flash. However, I want to get the actual address and keys that was sent down to the module via OTAA join.

Hi @kavehoo,

The situaion is the followng I believe.
Those comands you are using are only possible to execute in the configuration window, before the actual OTAA join procedure. Since you have not keys yet (the OTAA procedure is what gets them), they are meaningless, and later they don’t work. This is just for your informatiom.
The solution is to run the following (should work at any time during normal operation after the OTAA procedure has finished)

It will return the following in this order separated by a “,”:
NetworkID 4Byte
Network address 4Byte
Network session key 16Byte
Application session key 16Byte

You should get something similar to this:

NetworkID 0
Network address 1234fae
Network session key eeee383e27e65d3f08fde597ab170675
Application session key 1bf234567d8a9012345c6fb7e8ee9012

Please let me know if this help.



Hi @Hobo,
Thank you very much for your reply. I’m pretty sure this is what I’m after. I appreciate your help. I’ll test this and post an update.