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

[Bug] [V3 fix] slotTimeMsec is constant but should be recalculated on startup based on spreading factor and bandwidth #3892

Open
ianmcorvidae opened this issue May 14, 2024 · 0 comments
Labels
3.0 tech debt Code or lib references that are not up to date or propper standards

Comments

@ianmcorvidae
Copy link

Category

Other

Hardware

Not Applicable

Firmware Version

2.x

Description

This is a fix for V3 after some discussion in discord.

In RadioInterface.h we set some initial values for slotTimeMsec, preambleTimeMsec, and maxPacketTimeMsec, but the second and third of those are recalculated on startup in order to match the actual modem settings in use. However, slotTimeMsec is not, so it uses the fixed values for spreading factor and bandwidth that appear in RadioInterface.h (sf 9, bw 125) regardless of radio settings. We should update this since the actual LongFast values would create a longer slot time (~77ms rather than ~42), so this could in theory lead to some failures in channel activity detection (since we're not leaving enough time for the process to happen).

The formula may also need or want adjustment, or formulas that use this value. Possibly the maximum contention window size will be too large with the longer slot time, or other issues. This should be tested/simulated, probably.

Relevant log output

No response

@ianmcorvidae ianmcorvidae added the bug Something isn't working label May 14, 2024
@caveman99 caveman99 added 3.0 tech debt Code or lib references that are not up to date or propper standards and removed bug Something isn't working labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 tech debt Code or lib references that are not up to date or propper standards
Projects
Development

No branches or pull requests

2 participants