Problem with storing radio configuration in RAK11720

Hello,

I’m encountering an issue with the RAK11720 where the radio parameters are not being stored correctly. Unexpectedly, the parameters stored in flash memory are erased. I am using the following setup:

  • RAK11720 with RUI3 v4.1.1, running on Windows 10.
  • ABP authentication; however, when the issue occurs, the device switches to OTAA and erases the keys DevAddr, NwkSKey, and AppSKey. The OTAA keys appear to be set to:
    • DevEUI = AC1F09FFFE1302CE
    • AppEUI = AC1F09FFF9153172
    • AppKey = AC1F09FFFE1302CEAC1F09FFF9153172

These keys seem to correspond to an example used in RUI3 OTAA application.

Additionally, the radio configuration is lost. The band changes from AU915 to US915, and the channel and Spreading Factor settings are erased.

When I read the memory of the chip with a JLINK programmer, I see that the user memory section is also erased.

Despite the radio configuration being wiped, the rest of the application code seems to work correctly.

My questions:

  1. Is there a way to resolve this issue?
  2. Does RUI3 have a section of memory where it stores the default radio configuration? If so, can I store my radio configuration there to avoid this problem?

Any help or insights regarding this would be greatly appreciated.

Best regards,

Dabliu.

I dont know whats going on, but a temp workaround. You could try to change the default settings when you build the RUI3 firmware? If it gets reinitialized with wiped out settings, maybe the defaults stored in the hex will work. Not sure if that would help, but I tried searching for default values and this is what I found

Can you elaborate this?

RUI3 has two set’s of configuration (LoRaWAN settings + Credentials + other settings) in the flash and they should be read/written only with the API calls or AT commands. If you are writing to these configurations directly, it is not guaranteed that it will work.

Setting (1) is the one used and changed with AT commands and API calls.
Setting (2) is the factory settings and they can be used to overwrite Setting (1) with ATR command.

You can as well save your current settings as factory settings with AT+FACTORY.

I never experienced that any of the two configurations are changed without using API calls or AT commands.