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

Wrap-around of globalDutyAvail is blocking transmission in case of long transmission intervals #934

Open
uhi22 opened this issue May 25, 2023 · 1 comment
Assignees
Labels

Comments

@uhi22
Copy link

uhi22 commented May 25, 2023

Describe the bug

If the application triggers a transmission in very slow interval (multiple hours, or even days), and the device sleeps in between, the transmission hangs up.
Identified the root cause: The point in time, when transmission is allowed again, is controlled by globalDutyAvail. This is intended to be a value in the future, if we want to wait, and it is a time in the past, when it is allowed to transmit. But if we have for several hours no transmission, then the globalDutyAvail will be back in the past more and more, and at about 9hours it will wrap-around, and the transmission will be forbidden, because it looks like that the globalDutyAvail is in the future.

Possible bug fix: We need to avoid that globalDutyAvail is too far in the past. This can be reached by cyclically checking and correction of the global globalDutyAvail, and also the band-specific avail times.

Environment

  • Version of LMIC being used 3.2.0 (sorry, this is very old, but my impression is that this issue is still present)
  • Version of Arduino IDE being used. 1.8.5
  • Network provider: The Things Network
  • Region: EU868
  • Board: selfmade Arduino pro mini with RFM95W
  • CPU: AVR
  • Radio RFM95W

To Reproduce

Trigger a transmission or multiple. Wait, until globalDutyAvail turns from "future" into "past", and after several hours it wraps-around into "future". Try a transmission, this is blocked because the globalDutyAvail is seems as "not yet reached".

Expected behavior

No matter how long are the gaps between two transmissions, the globalDutyAvail shall never wrap around from the past to the future.

Additional context

I prepared and tested a fix, see uhi22@c9b6bd6

@uhi22
Copy link
Author

uhi22 commented May 25, 2023

Just noticed, that #926 mentions the same issue.

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

No branches or pull requests

2 participants