Lora-net / SWL2001

LoRa Basics Modem LoRaWAN stack
BSD 3-Clause Clear License
87 stars 50 forks source link

no reloading context after power on #64

Open davidBaselga opened 1 month ago

davidBaselga commented 1 month ago

I used LoraWan Basic on stm32Cube with STM32L082KZT6 and semtech SX1276IMLTRT. Join, Uplink and downlink work correctly.

I would like the system not to make a "join" at each startup (power on).

I see backups in EEPROM, at startup during init I also see loading from the EEPROM but I cannot send any frame. I don't understand why and I haven't found an example.

thanks a lot David

opeyrard commented 3 weeks ago

Hi,

Only Devnonce and joinnonce are stored in non-volatile memory as requested by LoRaWAN standard. The full LoRaWAN stack context is not stored in NVM.

davidBaselga commented 3 weeks ago

if I understand correctly, To not do a join after a restart I only need joinnonce and Devnonce, or do I need other data?

Thank you very much for your response

opeyrard commented 1 week ago

Hi, In the current LBM implementation, you have to perform a new Join after a Reset. The whole context of LoRaWAN is not saved. We are studying the possibility to improve it (especially to support ABP) in the next release. Many thanks,

davidBaselga commented 1 week ago

Thank you very much for these clarifications.

I succeeded in saving the context by making these modifications in the lower layers:

So on the reset event: