Skip to main content
Associate III
January 20, 2026
Question

STM32WL disable LmHandlerJoin at startup

  • January 20, 2026
  • 1 reply
  • 171 views

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.

 

1 reply

Dana Myers
Senior
January 21, 2026

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

DanaMyers_0-1769039745495.png

 

Associate III
January 22, 2026

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