2023-04-12 01:31 AM
I have developed a device that joins lorawan in OTAA mode. I am testing the device and i am having some problems with conectivity.
Device joined succesfully to Lorawan Network Server, i saved the NVM Lorawan context and i reset the device, after reset NVM Lorawan context is restored, but when i send a uplink message it is ignored by Network Server because the Device frame count is less than Network server frame count.
My question is is there a way to save frame count in ROM memory and restore it in the LmHandler?
Thanks in advance
2023-04-17 02:24 AM
I have found response to my own answer, Frame counter was included in NVM Lorawan context. The problem was that it was not saved properly, I included a function to save it every time that the device send an uplink.
LoRaMacNvmData_t Struct contains several structs with lora data, in LoRaMacCryptoNvmData_t struct have:
LrWanVersion, DevNonce, JoinNonce, FCntList, LastDownFCnt, Crc32.
FCntList contains