AnsweredAssumed Answered

Cube lrwan LoRa & Standby Mode

Question asked by Andres Smithuis on Jun 13, 2018

I'm having trouble to initialize the LoRa stack after standby mode. I'm saving the required keys after the first join request etc on the EEPROM. But after standby mode, the stack needs to be initialized again. But I would like to skip the join request after the first time start up to save air time / battery.

 

What I would like to achieve:

-Power up

-Initialize LoRa stack

-Send Join Request (OTAA)

-Receive Join accept

-(Save credentials to EEPROM)

-Go into Standby Mode

 

-Wake up form standby mode

-Initialize LoRa stack again with credentials saved in EEPROM

-Send message directly (no join request)

 

I am able to send a message directly after reinitialization of the LoRa stack (so saving and loading my credentials work). But I think I lose some stack configuration when I enter Standby mode which isn't re-initialized by the LoRa_Init() function. 

 

Does someone have experience with the cube lrwan stack and reinitializing the stack after waking up from standby mode?

 

*EDIT*

I am able to wake up from Standby Mode and directly send messages now. Turns out I needed to save not only the AppsKey, NwkSKey and DevAddr. But the NetID as well. 

 

Now onto the next problem. Framecounters. Somehow storing the UpLinkCounter from the LoRaMac layer and reload them upon initialisation of the LoRa stack doesn't add that counter to the uplink messages.

 

Anyone got experience with this?

Outcomes