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

Completely refrain from transmitting if duty cycle limit exceeded #1998

Merged
merged 3 commits into from
Nov 29, 2022

Conversation

GUVWAF
Copy link
Member

@GUVWAF GUVWAF commented Nov 26, 2022

With this, the device will completely refrain from transmitting if it is violating the hourly duty cycle. If it happens, it informs the client by generating a NAK with DUTY_CYCLE_LIMIT error (needs updated protobufs). Did some stress testing with the interactive simulator and then it works fine :)

Still have some doubts. I added a LoRaConfig bool to override it, but am not sure if we should always set this to true if you set the user to is_licensed (for HAMs). Furthermore, do we need to inform the client how many minutes we have to be silent before we can transmit again? Then we need an admin message for that I think.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2022

🤖 Pull request artifacts

file commit
pr1998-firmware-2.0.6.7ca104c.zip 7ca104c

thebentern added a commit to meshtastic/artifacts that referenced this pull request Nov 26, 2022
@GUVWAF
Copy link
Member Author

GUVWAF commented Nov 27, 2022

Duty cycle limitation will now automatically be overridden when user is set to is_licensed.
For now I think getting the DUTY_CYCLE_LIMIT error will suffice. Tested it with a T-Beam and the Android app by setting the duty cycle to 0.01%. Got a cloud with strike when it got exceeded. A feature request for the apps would then be to show some pop-up telling what happened (and maybe the option to override it).

@GUVWAF GUVWAF marked this pull request as ready for review November 27, 2022 16:02
thebentern added a commit to meshtastic/artifacts that referenced this pull request Nov 27, 2022
Copy link
Sponsor Member

@caveman99 caveman99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - the generated files will be overwritten on proto regen... So we need to update that first.

@caveman99 caveman99 merged commit 0dff05e into meshtastic:develop Nov 29, 2022
@sachaw
Copy link
Member

sachaw commented Dec 2, 2022

There will likely need to be scope for being able to bypass the duty cycle restrictions and have encryption enabled at the same time.

@GUVWAF
Copy link
Member Author

GUVWAF commented Dec 2, 2022

There is a separate LoRaConfig field 'override_duty_cycle'. It will be automatically set to true if you set the user to is_licensed, but it can also be manually set.

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

Successfully merging this pull request may close these issues.

None yet

3 participants