cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WL disable LmHandlerJoin at startup

matteverze
Associate III

Hi, 

I'm using a STM32WL5MOC. I see that in the LoRaWAN_Init the LmHandlerJoin is not in a USER CODE section, meaning that it can't be disabled. In my application I would like to do the join upon my request and not in the init. How I can prevent from join?

/* USER CODE END LoRaWAN_Init_2 */



 LmHandlerJoin(ActivationType, ForceRejoin);



if (EventType == TX_ON_TIMER)

Thanks.

 

2 REPLIES 2
Dana Myers
Senior

I haven't tried this specific case, but you might be able to change this in CubeMX:

DanaMyers_0-1769039745495.png

 

Thanks @Dana Myers. I think that "Force rejoin at each reboot" prevent only a new join if you have already restored the NVM context. Infact, in lora_app.h there is a comment on the variable:

/*!
 * LoRaWAN force rejoin even if the NVM context is restored
 * @note useful only when context management is enabled by CONTEXT_MANAGEMENT_ENABLED
 */
#define LORAWAN_FORCE_REJOIN_AT_BOOT                true