Skip to main content
RKaly.1
Associate II
November 25, 2020
Question

How to save the OTAA join parameters in the memory permanently?

  • November 25, 2020
  • 2 replies
  • 1614 views

Hi everyone

I have been working with the BL072Z-LRWAN using the AT Slave software provided by stm.

In our custom devices , we are using the same module and to save power we have a relay to turn on and off the module , as and when required.

But the problem is that whenever i switch off the module , the key and OTAA join parameters are lost , and to send data over LoRa , we have to initiate Join Command again , which is not a good way to go.

Can you please guide me on how can i save the join parameters in the memory so that i don't have to do it again?

Is there any AT command to save the information?

Thanks and Regards

Rajat Kalyan

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
November 25, 2020

You're probably going to need to modify the source, and add code to write into FLASH or EEPROM

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
ty.locke
Associate II
December 2, 2020

I did the same for the end node example. You can use the STM HAL Flash libraries to write to EEPROM and store the LoRa join parameters, then fetch the parameters from memory when the module starts up again.

RKaly.1
RKaly.1Author
Associate II
December 3, 2020

Can you please guide me to some github source to take reference from , pretty new to the Stm enviornment actually , so i don't know much how to go about it.

Also if possible , can you provide me the code you wrote for the flash/eeprom?

ty.locke
Associate II
December 4, 2020

Find the link attached; it will download the entire zip folder (couldn't find a public repo on Github). Project is built for Keil. See the terminalhandler source for reference on writing/reading to/from EEPROM.

https://iot.machineq.com/l/651953/2019-07-11/8z65n/651953/72651/MachineQ_STDevKit_SampleCode.zip