Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Join ABP after succesful join OTAA fails due to RX1Delay not properly saved #53

Open
mereshow opened this issue Apr 4, 2022 · 2 comments

Comments

@mereshow
Copy link

mereshow commented Apr 4, 2022

Problem:
If a node joins via OTAA correctly, it receives the RX1 delay correctly, but the saveConfig() function does not save this value.

If we join via OTAA on the setup() code, save the cofiguration, and then try to join via ABP on loop() (as shown in the examples), the join procedure fails if the RX1 delay in the network server is not the same as the default in the Libelium api (1000 ms).

Cause
the saveConfig() code does not stores the rx1Delay value, so after waking up in the loop() code, the default values are used (rx1Delay = 1000 and rx2Delay = 2000).

Solution:

  • In setup()
    • Join via OTAA
    • Save the configuration
  • In loop():
    1 - Set the apropriate RX1 delay for your network server (TTN is 5000): LoRaWAN.setRX1Delay(5000); LoRaWAN.getRX1Delay(); LoRaWAN.getRX2Delay();
    2 - Join via ABP
    3 - Send data
    4 - Power everything down

It would be better if the saveConfig() function stores the rx1Delay.

@Krispu
Copy link

Krispu commented Apr 5, 2022

Yes, after modifying any lorawan feature, it is mandatory to use the save function to store the changes in the radio's EEPROM.

@mereshow
Copy link
Author

mereshow commented Apr 5, 2022

Yes, after modifying any lorawan feature, it is mandatory to use the save function to store the changes in the radio's EEPROM.

Yes, I know. I am saving the configuration.
What I am saying is that the save function does NOT stores the Rx1 delay it receives via OTAA, so we have to specify it every time before connecting again using ABP (in loop()).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants