cancel
Showing results for 
Search instead for 
Did you mean: 

Wio E5 STM32WL LoRaWAN: Conditional Rejoin Based on NVM Context Restoration

user_01
Associate III

I'm using Seeed Studio's Wio E5 board, LoRaWAN 1.0.3 and the repository Seeed Studio Wio E5 LoRa  as the base of my source code. I want my device to force a rejoin only when NVM context is not restored (e.g., after a reset or memory clear), and to resume using the previous session if the NVM context is successfully restored. I have already set LORAWAN_FORCE_REJOIN_AT_BOOT to false and CONTEXT_MANAGEMENT_ENABLED to true, and I noticed that even if NVM data is restored successfuly the device rejoins (which is wrong).

1 ACCEPTED SOLUTION

Accepted Solutions

I am glad you found the repo useful!

The issue you ran into certainly was my fault - I did not merge in a necessary call to FLASH_IF_Init() in the LoRaWAN application initialization code. I sincerely apologize!

I have updated that repo with a FW1.4.0 branch which uses the ST FW1.4.0 firmware package and appears to work well. I did specifically test the NVM restore functionality; after joining, the node rejoins upon reset, but remembered the devAddr, credentials and fCnt, so it quickly joins and carries on like nothing happened.

Perhaps you'll find this useful in the future.

Cheers!

Dana

View solution in original post

5 REPLIES 5
STTwo-32
ST Employee

Hello @user_01 

The Seeed Studio Wio E5 LoRa is not a ST repository, So, if you are looking for support on it and on the Seeed Studio's Wio E5 board, you may contact the Seeed Studio Forum - Seeed Forum since they are the developer of the Code and HW and they may give you better support.

Best Regards.

STTwo-32 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Dana Myers
Senior

Which version of the ST STM32WL firmware are you using under my repository?

I have not updated this repository in too long, but I am completing an update of the same functional build for RAK3172 for FW 1.4.0 and there have been changes that I am testing.

Next up, I will update the Seeed Wio E5 repo, and will be happy to help.

Note to ST employees: I appreciate you have little interest in debugging other people's code, but 2 minutes of research here beyond reading the headlines would have pointed user_01 to me in a timely way.

Dana

Hey @Dana Myers, thanks for replying. But I've long left the company where I used to work with a Wio E5 dev board using your repository, but I remember never figuring out the issue in this post or a workaround. But for your information, clicking on the link I've attached in my last year's post I believe it was danak6jq's master version  of the STM32WL repository. It's been close to a year since I left the company so my memory is weak on this, but mostly it was this version. 

If this was you, who created this version of the repo, then thank you so much. I was able to make progress in the project and develop your code according to the application very flexibly until I left.

Btw I don't remember getting any solutions for any issues or doubts regarding this repository on the STM32 forum.   

 

I am glad you found the repo useful!

The issue you ran into certainly was my fault - I did not merge in a necessary call to FLASH_IF_Init() in the LoRaWAN application initialization code. I sincerely apologize!

I have updated that repo with a FW1.4.0 branch which uses the ST FW1.4.0 firmware package and appears to work well. I did specifically test the NVM restore functionality; after joining, the node rejoins upon reset, but remembered the devAddr, credentials and fCnt, so it quickly joins and carries on like nothing happened.

Perhaps you'll find this useful in the future.

Cheers!

Dana

Thanks for rectifying the issue, it will be helpful for those still using your old repository now. 

Keep doing your good work! I'm sure it's already helping countless people in their projects.