I periodically send a confirmed uplink to check network connectivity. ADR is enabled, and the data rate is DR5. The server responds with an ack, and no ADRLinkReq as expected.
The next uplink is unconfirmed, but the datarate returns to the default datarate set before ADR (i.e. DR0). Then the server starts a new ADRLinkReq sequence to recover device back to DR5, which involves up a lot of unnecessary traffic.
What might be the reason for the uplink not using the datarate parameters set by ADR after the confirmed uplink?
LNS is Chirpstack v4
Please include the following information, in order for us to help you as effectively as possible.
What product do you wish to discuss? RAK4631
What firmware are you using? (Arduino )
What firmware version? Can it be obtained with AT+VER=?
Computer OS? (MacOS, Linux, Windows) MacOS
What Computer OS version? Sonoma 14.5
How often does the problem happen? Every confirmed uplink
How can we replicate the problem?
Provide source code if custom firmware is used or link to example if RAKwireless example code is used.
I might have found it.
There was a “workaround” implemented (not sure if it was me or if it was already there when I got the sources).
I am not even sure why the workaround was implemented, but it does reset DR (and other things).
I made a workaround around the workaround (preserving the DR).
But I am not sure about the side effects, I don’t want to release this immediately.
Can you replace in the SX126x-Arduino library the file LoRaMacHelper.cpp with the attached file and check if it works for you and if there are other side effects?