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

Baremetal LoRaWAN rejoin best pratices #204

Open
mcserved opened this issue Jul 7, 2021 · 5 comments
Open

Baremetal LoRaWAN rejoin best pratices #204

mcserved opened this issue Jul 7, 2021 · 5 comments
Assignees
Labels
Firmware Anything related to code and SW on the HW

Comments

@mcserved
Copy link
Contributor

mcserved commented Jul 7, 2021

Summary:

Most of the LoRaWAN applications retry join attempts after a set amount of time since they try to rejoin (after being denied the first time) on sending. But this does not adhere to best practices as there is not backoff (or jitter) implemented in most applications. basic_lorawan for instance will rejoin periodically on APP_TX_DUTYCYCLE. This can lead to problems when large deployments are reset, as it can hog the network, with the potential of none of the devices being able to join. This is related to #106.

Why do we need this?

This is considered a best practice for LoRa as it helps with use cases with multiple devices.

What is already there? What do you see now?

basic_lorawan, secure_element_lorawan, and sensors_lorawan rejoin on a periodic cycle

What is missing? What do you want to see?

Jitter and backoff implemented to randomize (and constantly increase) rejoin times, optionally configurable in app_conf.h with a max, which was done for freertos_lorawan. It only needs to target rejoins and have a reasonable max value to not interfere with development and regular use cases.

How do you propose to implement this?

Use a randomizer function and wait this amount of milliseconds on rejoins (jitter), which increases over time (backoff)

Environment:

Baremetal

Acceptance Criteria:

Network rejoins don't happen based on a set value, but use jitter and backoff.

What can you do yourself and what do you need help with?

All

@mcserved mcserved added the Firmware Anything related to code and SW on the HW label Jul 7, 2021
@mcserved mcserved added this to the 2021 Q3 milestone Jul 7, 2021
@mcserved mcserved self-assigned this Jul 7, 2021
@mluis1
Copy link

mluis1 commented Jul 7, 2021

Just for info the MAC layer already implements the Join back-off as specified by the LoRaWAN specifications chapter "7 Retransmissions back-off" (The seen behavior is like the duty-cycle enforcement)
This feature is always enforced.

The only thing that is required at application level is to insure that the end-device transmissions are randomized.

@mcserved
Copy link
Contributor Author

mcserved commented Jul 7, 2021

Just for info the MAC layer already implements the Join back-off as specified by the LoRaWAN specifications chapter "7 Retransmissions back-off" (The seen behavior is like the duty-cycle enforcement)
This feature is always enforced.

The only thing that is required at application level is to insure that the end-device transmissions are randomized.

You're right, it's not a problem with the mac layer's implementation but rather on the device level application since basic_lorawan will join (after the initial failed attempt) when trying to sent, and the timing is set by APP_TX_DUTYCYCLE (which is set at the mentioned 10s). Thanks for pointing that out, I'll try to be more clear in the description next time.

@elsalahy
Copy link
Contributor

elsalahy commented Jul 8, 2021

@marnixcro can you please adjust the the description of the issue following Miguel's input.
Mainly concerning the need for backoff.

@mcserved mcserved changed the title Jitter and backoff implementation for basic_lorawan basic_lorawan rejoin best pratices Jul 12, 2021
@mcserved mcserved changed the title basic_lorawan rejoin best pratices Baremetal rejoin best pratices Jul 12, 2021
@mcserved mcserved changed the title Baremetal rejoin best pratices Baremetal LoRaWAN rejoin best pratices Jul 12, 2021
@elsalahy elsalahy assigned elsalahy and unassigned mcserved Aug 20, 2021
@NicolasMrad NicolasMrad modified the milestones: 2021 Q3, 2021 Q4 Oct 4, 2021
@NicolasMrad NicolasMrad assigned azerimaker and unassigned elsalahy Dec 13, 2021
@NicolasMrad NicolasMrad modified the milestones: 2021 Q4, 2022 Q1 Jan 3, 2022
@NicolasMrad NicolasMrad modified the milestones: 2022 Q1, 2022 Q2 Mar 29, 2022
@NicolasMrad
Copy link

is this still relevant?

@azerimaker
Copy link
Contributor

It is. We need to look into this.

@NicolasMrad NicolasMrad modified the milestones: 2022 Q2, 2022 Q3 Jun 27, 2022
@NicolasMrad NicolasMrad modified the milestones: 2022 Q3, 2022 Q4 Oct 10, 2022
@NicolasMrad NicolasMrad modified the milestones: 2022 Q4, 2023 Q1 Dec 12, 2022
@NicolasMrad NicolasMrad modified the milestones: 2023 Q1, 2023 Q2 Apr 13, 2023
@KrishnaIyer KrishnaIyer removed this from the 2023 Q2 milestone Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Firmware Anything related to code and SW on the HW
Projects
None yet
Development

No branches or pull requests

6 participants