Keep the ADR data rate index value between min and max values - #7704
Conversation
|
Hello, thank you for working on this! I believe this was inspired by the TTI ticket I filed earlier last month. @halimi, Flagging that before this update I observed the device fully disregarding the min/max SF values, even if it was within the min/max range at the time of the settings change. For example, when I set it to between SF7 and SF9, then performed a reset and rejoin on the device, if the gateway was removed and the device was looking for an ack due to Are we confident the fix above would address this case as well? |
@pomplesiegel, Before this fix the min and max value was not enforced by the ADR. Now it enforces the desired value to be between the min and max value. When the device rejoins the data rate index can be outside of the min and max values for the first couple of uplinks, after that the NS should start to adjust it by sending CID_LINK_ADR command with the desired data rate index to the device. If the device accepts it then after that the desired data rate index will be between the min and max value. So yes, I think it should fix your case too. |
|
@halimi, perfect, thank you! Looking forward to seeing this in a release and we'll update on our side. |
Summary
References: https://github.com/TheThingsIndustries/lorawan-stack-support/issues/1336
The ADR desired data rate index didn't respect the MAC settings min and max value if the current data rate index was below the min or above the max value. It has been fixed.
Changes
Testing
Steps
adr_data_rate_indexmac-settings.adr.mode.dynamic.min-data-rate-indexandmac-settings.adr.mode.dynamic.max-data-rate-indexthat the current data rate value will be outside of this range.adr_data_rate_indexvalue is between the min and max valueResults
Regressions
adr_data_rate_indexmac-settings.adr.mode.dynamic.min-data-rate-indexandmac-settings.adr.mode.dynamic.max-data-rate-indexthat the current data rate value will be outside of this range.MAC settings:
adr_data_rate_indexvalue is between the min and max valueNotes for Reviewers
...
Checklist
README.mdfor the chosen target branch.CHANGELOG.md.CONTRIBUTING.md, there are no fixup commits left.