Skip to main content
Candra SN.
Associate III
Oct 25, 2021 3:51 AM UTC
Solved

How to make custom re-join request LoRa process on LoRaWAN End Node STM32WL program ?

Hi,

I am a bit confused about re-join request process on the lora STM32WL. I want to make my end node will join request to the gateway for five times when the join accepted process is not happening. After five times the join request process and end node failed to join accepted, then the system enters stop 2 mode (idle by default firmware package STM32WL).

Is there any reference or information about it ? Maybe, how to implement my need on LoRaWAN End Node STM32WL program ?

I really appreciate your attention, thank you.

This topic has been closed for replies.
Candra SN.
Candra SN.Best answer
Associate III
Jun 8, 2023 4:59 AM UTC

Thank you @Imen DAHMEN​ & @Arvid Bläser​ 

I've got a solution from this topic, namely by modifying the function of

OnJoinRequest(LmHandlerJoinParams_t *joinParams)

9 replies

ST Technical Moderator
Oct 29, 2021 8:53 AM UTC
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Candra SN.
Associate III
Nov 2, 2021 2:05 AM UTC

Thank you @Imen DAHMEN​ for your reply

But, i still confuse & dont know how to code on LoRa application layer based my need. Maybe you can help me technically or where should I edit the code to suit my needs ?

Fyi, my system use STM32WLE5CBU6 (single core)

ABläs.1
Associate II
Sep 21, 2022 2:49 PM UTC

Did you learn what you needed?

I'm trying to figure out how take make sure the join procedure is more robust.

After failing a join a few times with

LmHandlerJoin(ActivationType, ForceRejoin);

It stops sending join messages, even when calling it again.

By resetting the whole device I can of cource restart the process but preferrebly I want to only restart the join process again after a timer event. I guess it is possible to reset some sort of join counter somewhere?

Candra SN.
Candra SN.AuthorBest answer
Associate III
Jun 8, 2023 4:59 AM UTC

Thank you @Imen DAHMEN​ & @Arvid Bläser​ 

I've got a solution from this topic, namely by modifying the function of

OnJoinRequest(LmHandlerJoinParams_t *joinParams)

Mr._Nileshkumar_Solanki
Associate II
Dec 30, 2023 5:46 AM UTC

What kind of modification I have do??

Associate III
Jul 31, 2023 10:15 AM UTC

Hello @Candra SN. I want to perform same kind of operation, can you suggest me how to do same? Which parameters of  OnJoinRequest(LmHandlerJoinParams_t *joinParams) function needs to be modified?

Associate
Sep 16, 2023 1:47 AM UTC

I'm having the exact same problem.   Can anyone describe how you addressed this situation?  I'm somewhat familiar with OnJoinRequest().  The reason I need to re-join is because either my end-device RAK3172 (Class A) or the RAK7268 router seems to loose the device credentials after about 24 hours - which isn't good.  This device wakes up about every 24 hours on an external event. (Hardware: RAK3172/19003 baseboard, Software: STM32Wl end-node STM32WL SDK 1.3)

Associate
Dec 30, 2023 8:29 PM UTC

This worked for me.  Place this join request below in the appropriate location in your lora_app.c.

        LmHandlerJoin(ActivationType, ForceRejoin);

Mr._Nileshkumar_Solanki
Associate II
Jan 1, 2024 4:59 AM UTC

How your "lora_app.c" file look like??
Can you provide that function??