Skip to content

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

@mereshow

Description

@mereshow

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions