-
Notifications
You must be signed in to change notification settings - Fork 311
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
ADR does not change data rate #3901
Comments
Thank you for reporting. This is actually a great idea to use the uplink data rate index and will solve quite some issues with LinkADR in US-like bands. |
Thank you for handling the problem. |
This one looks stale. @rvolosatovs please re-add |
Summary
After a (manually) change of data rate and using ADR the network calculates
new settings and changes TX power, but not the data rate.
That behaviour is different to the TTN v2 stack and I believe it is
caused by a missing transfer of last received data rate to the internal
MAC state.
Steps to Reproduce
link_adr_req: dataRate=5 txPower=15 chMask=00ff chMaskCntl=0 nbTrans=1
link_adr_req: dataRate=15 txPower=4 chMask=00ff chMaskCntl=0 nbTrans=1
link_adr_ans: powerOK=true dataRateOK=true channelMaskOK=true
and the device receives a new request in order to further decrease the power:
link_adr_req: dataRate=15 txPower=7 chMask=00ff chMaskCntl=0 nbTrans=1
change requests, even after more than 100 downlinks.
The internal ADR mac state displayed by ttn-lw-cli is:
So it looks to me, that the currently asssumed data rate on
network is not correct. When I overwrite the setting with
ttn-lw-cli dev set ... --mac-state.current-parameters.adr-data-rate-index 2
the device receives the expected adr request with next uplink:
link_adr_req: dataRate=5 txPower=0 chMask=00ff chMaskCntl=0 nbTrans=1
What do you see now?
The device receives an adr request with power change, but no rate change:
link_adr_req: dataRate=15 txPower=4 chMask=00ff chMaskCntl=0 nbTrans=1
What do you want to see instead?
The device should receive an adr request with rate change back to DR5/SF7:
link_adr_req: dataRate=5 txPower=0 chMask=00ff chMaskCntl=0 nbTrans=1
Environment
I use a LoRaWAN 1.0.4 compatible node, that was already used on the TTN v2 stack.
The region is EU-868 on eu1.cloud.thethings.network, v3.11.1.
The transmission conditions are very good, there is no packet loss with DR5/SF7
and SNR on network is between 9 and 12.
How do you propose to implement this?
I believe that the data rate of last received uplink is not copied to internal
MAC state. At a first glance I could not find in the code the assignment for
MACState.CurrentParameters.ADRDataRateIndex.
How do you propose to test this?
see steps above.
Can you do this yourself and submit a Pull Request?
No, I don't have a test environment.
The text was updated successfully, but these errors were encountered: