-
Notifications
You must be signed in to change notification settings - Fork 210
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
Add join back-off #546
base: master
Are you sure you want to change the base?
Add join back-off #546
Conversation
@ngraziano thanks for this! Before we merge, we need to make sure the compliance script can disable this cleanly (ideally via the mechanism already in use). It turns out that all the compliance test suites assume that the device will "magically" not honor duty cycle limitations; otherwise the tests would take forever.... |
This back off can be disable in the application side in |
@ngraziano sorry, was speaking loosely. I always forget that I divided the compliance code into a library (that can be incorporated into any application) and a sketch (that provides a null application and a bunch of debug support). We'd want to update the library to disable join timing. This is tricky because right now the library really only runs parasitically (if you call The code that I was thinking of, that defeats duty cycle logic, is: arduino-lmic/src/lmic/lmic_compliance.c Lines 216 to 225 in 4eb195e
I see that this is only post-join. I'll have to do some testing on this to see the best way to do this. Maybe at NYC hacking hours on Thursday. |
I make a proposition for disabling globalDutyRate but I can't test it. |
@ngraziano Yes, very much like that, thanks. I'm on deadline for something else; I'd like to try testing before merging, but it may be a few days. Thanks again for this contribution. |
I'm studying this for US-like bandplans; all need the same thing, but there are subtleties for US-like having to do with probing all the channel groups; and this interacts with a better randomization scheme. Probably can't get to testing this weekend, I'm afraid. Would encourage others with EU-like bandplans to try testing; @svelmurugan92 can you arrange to test with IN866, AS923 and KR920, all of which are EU-like, and see if the compliance mode on the RWC5020 works smoothly? (Symptom of a problem will be very long script processing time, compared to without the fix.) |
With all the current excitement, I've not heard back from anyone else with test results. I've marked this as on the list the release after this one, which will be in a few weeks. |
@ngraziano can you rebase this PR on v3.2.0? That will make it easier for others to test with the latest fixes, which are important. Thanks! |
Get in transmission limit for join request using the globalDutyRate. The limitation is made without summing time on air during the period to be simple. Limit for hour 1 is 36s, so select duty rate fo 2^7 which limit to 28s Limit between hour 1 and 11 is 36s, divide by 2 the duty rate every 4000s, this limit to 35s Limit after hour 11 is 8.7s/24h duty rate of 2^14 which limit to 5.7s/24.
Add an event handler for compliance test to disable the duty rate during the join when compliance test is active.
@terrillmoore rebase made. |
Hello again... In writing #581, I discovered some fishy things around (in EU only) setting the join requests in the 0.1% group, rather than 1%. I suspect this is an overlacking hack, as there's nothing in the 1.0.3 regional spec about this. Evidence of fishy code surfaces here: arduino-lmic/src/lmic/lmic_eu868.c Lines 94 to 99 in 6fe04ec
There is later code that manipulates the 0.1% join code: arduino-lmic/src/lmic/lmic_eu868.c Lines 110 to 115 in 6fe04ec
I don't think that this logic is needed any more with your changes, as you're managing according to the rules in LoRaWAN 1.0.3 chapter 7. Also... I think we might want to centralize this logic (not limit it to Join) -- chapter 7 can apply to application-triggered messages as well. But perhaps the best should not be the enemy of the good. |
Hello I agree for the 0.1% group for join frequency, I also think it is an hack of the old code to limit the number of join without proper back-off. I was thinking to remove it in a second step (with the "join" parameter of initDefaultChannels only use in EU868) For back-off for other case of chapter 7, I do not see easy way to implement it.
If you have an idea to centralize this let me know. |
This is a simple proposition for the join bakoff to resolve #2 .
It try to use the globalDutyRate to limit the interval of transmission and add a random value to prevent synchronization of different device which start at same time.
The limitation is made without summing time on air during the period to be simple.
Limit for hour 1 is 36s : start join with duty rate of 2^7 which limit to 3600/2^17 = 28s.
Limit between hours 1 and 11 is 36s,
divide by 2 the duty rate every 4000s, this limit to 35s
A next step should be to work on LMICbandplan_nextJoinState to not stay on SF12 after join try all frequency once.