cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the joining requests and sending the data to server in LoRaWAN_End_Node example

pho3nix
Associate III

Hello everyone, 

I am using a custom board for LoRa operations, where I have used RAK3172 which is based on STM32WLE5CCU6, the Official LoRa SDK from ST is working fine , now I want to develop the same program from scratch,

Issue: The module is joining the network server joining continuously(with an interval of 10s) after powering up, how can I program the module to send the join request for 5 or 10 times(just for example) and after joining it will send data to the server with particular time interval.

1 ACCEPTED SOLUTION

Accepted Solutions

Actually the issue was in gateway setup, after setting up the gateway properly, everything worked perfectly,

View solution in original post

6 REPLIES 6
Sarra.S
ST Employee

Hello @pho3nix

Include a loop in the Lorawan stack to send requests multiple times that should look something like this : 

 

uint8_t join_attempts = 0;
while (join_attempts <10)
{
   //join(); 
   //wait for join response or timeout
}
join_attempts++; 
delay(5000); 
if (join_attempts == 10) {
    // join failed after 10 attempts, handle error...

 

 to send data to the server with a fixed time interval, I recommend using a timer interrupt to trigger the data transmission

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.

pho3nix
Associate III

Hello @Sarra.S ,

Thanks for replying, yes I understood your suggestion, but I should elaborate the scenario.

The module is joining successfully to the network server, as it can be seen

TTN server endTTN server endSo, I guess the Sub_Ghz / RF section is working fine, but the MCU section is not receiving any successful Tx return status from the RF sectiono, so it is trying to join again and again

Serial log of moduleSerial log of module

What could be the possible issue?

 

Can you explain in details.

Actually the issue was in gateway setup, after setting up the gateway properly, everything worked perfectly,

Could you elaborate what was the issue, because i am having the same problem that you have, only every 40 seconds

Artiom_0-1716314137345.png