I am doing some development with the RAK3172 and I noticed the following behaviour: Once I run ATR the “Serial Number” becomes blank. Also, because this is a “read-only” command, I can’t re-configure it.
Other “read-only” parameters like version, build-time, etc remain there. Being a “Serial Number” I would expect this to be preserved after an ATR command “Restore default parameters”.
RAKwireless RAK3172-E Example
------------------------------------------------------
Current Work Mode: LoRaWAN.
AT+VER=?
AT+VER=3.2.0-p2_22q1_final.87
AT+SN=?
AT+SN=AC1F09FFFE072DBC
OK
ATR
OK
AT+SN=?
AT+SN=
OK
I tried upgrading the Firmware, but it didn’t fix:
RAKwireless RAK3172-E Example
------------------------------------------------------
Current Work Mode: LoRaWAN.
AT+VER=?
AT+VER=3.4.2-rui3_22q1_update.112
OK
AT+SN=?
AT+SN=
OK
The unit still without serial number and it also does not allow me to re-write to it:
AT+SN=AC1F09FFFE072DBC
AT_ERROR
is the Serial Number something stored in the STM32 Flash or is that from a proper IEEE EEPROM?
The SN can only be set in production. Due to the bug in the older firmware version the serial number in the RAK3172 is erased and it cannot be rewritten by the user.
I too have lost my SN, but I am also loosing other settings too, Are you guys loosing other settings such as the DevEui, AppEui, AppKey and workmode settings?
Hey @Kevin192291, when you mean “losing” settings, is that after you run ATR? Because ATR would reset any configuration you changed and this is normal. The configuration might also reset when you upgrade the firmware.
But if you’re “losing” configuration just by running or restarting the module, maybe create another topic reporting the command sequence so RAK team can replicate the issue and investigate.
On my side, I just noticed the issue with the Serial Number, which would be great if that was something “protected” and that would never be erased independent of the operation. This is because having a unique serial number is important for our manufacturing processes and testing.
ATR means to reset module settings to factory default, that includes LoRa mode, region, EUI’s and Keys.
That ATR was deleting the serial number was a bug and it is fixed in the latest version.
The serial number and the default settings are stored inside the module and are not overwritten when you flash a new firmware.
For now I have no solution to write a serial number with AT commands.