ADR algorithm and configuration

Hi, someone knows something about this “nb_trans” in ADR management ? I would like to control it and be sure that the algorithm never set a value higher that 1…

hi @brocaar
i can’t find this in the LoRaWAN specifications. i read everything in the specifications related to ADR - but could not find it or did not understand it.

can you guide me to this part or post a printscreen of it?

thanks a lot,
sil

Actually, I might have been wrong about the re-join. However a device will start lowering its data-rate if it detects that it is not receiving any response back when the ADRACKReq bit is set.

thanks,

so if i have “adrAckReq:false” in my uplink frames the device has no chance to know if he should start lowering DR?

Do you know if other LoRa-Servers (the things network. or others) has a implementation of ADR Decrease or is it “fobidden” to do so by the specifications?

regards, sil

The lowering of data-rate usually happens in the device firmware stack, so independent of the Network Server that you are using.

so if i have “adrAckReq:false” in my uplink frames the device has no chance to know if he should start lowering DR?

In short when this bit is set, a Network Server must send a downlink. This gives the device the confirmation that it is still connected (e.g. the NS sent back a downlink reply). Please refer to the LoRaWAN Specification for full details on the adrAckReq bit.

1 Like

My problem with ADR:
In loraserver in “Service profile” I setup Minimum allowed data-rate = 0 and Maximum = 4 (for US915 region).
Did a testing of 3 different end-node devices: RAC612 LoRaButton, Dragino I/O Controller LT-33222-L and STM dev B-L072Z-LRWAN1.
All devices used DR = 0 in Uplink:

"txInfo": {
                "dr": 0,
                "frequency": 905300000
            }

Also, each Downlink the server is sent LinkAdrReq:

...
     {
                                "cid": "LinkADRReq",
                                "payload": {
                                    "dataRate": 4,
                                    "txPower": 2,
                                    "chMask": [
                                        false,
                                        false,
                                        false,
                                        false,
                                        false,
                                        false,
                                        false,
                                        false,
                                        true,
                                        true,
                                        true,
                                        true,
                                        true,
                                        true,
                                        true,
                                        true
                                    ],
                                    "redundancy": {
                                        "chMaskCntl": 0,
                                        "nbRep": 1
                                    }
                                }
                            }

But all devices answer back with false in “dataRateAck”:

"fOpts": [
                        {
                            "cid": "LinkADRReq",
                            "payload": {
                                "channelMaskAck": true,
                                "dataRateAck": false,
                                "powerAck": true
                            }
                        },
                        {
                            "cid": "LinkADRReq",
                            "payload": {
                                "channelMaskAck": true,
                                "dataRateAck": false,
                                "powerAck": true
                            }
                        }
                    ] 

Uplink FCtrl ADRACKReq bit is false:

"fCtrl": {
                        "adr": true,
                        "adrAckReq": false,
                        "ack": false,
                        "fPending": false,
                        "classB": false
                    },

So, my question is - what is wrong with ADR?
In my settings in loraserver or all 3 different devices just don’t want to use ADR?
BTW - all 3 devices is setup to use ADR…

Just did some experiments - set each device do not use ADR. The same settings on loraserver:

disable_adr=true

By default each device used DR=3. Works good - I don’t see any MAC messages and I can send Uplink more bytes in application payload.
As I understand I disable the most useful feature in loraserver, but I really cannot make it work.

Did somebody successfully use ADR feature?
Please share your experience and settings on bith sides - loraserver and motes!

Thanks.

@SDA,

Did you get more info arround nb_trans limitation to 1? I guess not otherwise I should write this down here!

@brocaar,

As @SDA said, I didn’t find informiton about low leve retransmission management in ADR algorithm.
Do you have some info about your network server implementation?

@e.salles, no information received…
@brocaar, can you give us update on that ? Thank you.

I had a look at this document:


I think the ADR algo is described here.
Questions:
  1. Is chirpstack using the latest revision of this?
  2. The document says installation margin should be implemented on a per-device basis, perhaps this could be a nice feature to request.
  3. Is repetition rate control implemented in chirpstack ADR?
    Cheers
    P

Hi Everybody, @brocaar Do you have documentation about ADR algorithm that chirpstack implements? Is thealgorithm that @subgig indicated in the comment before?. Also there is an API documentation?

Yes, that is the default ADR algorithm which is implemented.

Also there is an API documentation?

If you mean the ADR plugin feature, have a look at:

and

2 Likes

Hello,

I have a question about ADR.

I have like a dozen OTAA devices hanging on my gateway on a remote rural area. All of them are at dr5 as instructed by the network server. Some of them are loosing uplink data from time-to-time. I have changed the link_margin from 10 to 12dB and re-started the network server to decrease data loss. Unfortunatelly nothing changed in a couple of hours (data is sent uplink every 15 minutes). Then I changed the maximum data-rate in the service profile from dr5 to dr4. This time I have not re-started the network server. How long should I wait until the network server instructs the end devices to change uplink data-rate from dr5 to dr4? Or should I re-start the network server? Or nothing will happen until the devices do a join again?

Hello,

Some update.
After 3 days of operation, all the devices are now at datarate 0. Honestly I don’t understand why because they were perfectly working at datarate 5 and datarate 4 as well. Does anyone undestand why the ADR machine is instructing the devices to go to datarate 0 (consuming more battery), when communication is fine at datarate 5 and 4 as well?

Are you sure this isn’t because of the ADR backoff algorithm at the device-side? ChirpStack will never lower the data-rate of the device (at least not lower than the max DR set in the service-profile).

Hello Orne,

You are absolutelly right, it is the device that lowered the data-rate. Apparently I run into a problem I already solved a couple of years ago… If I understand well, due to the latency of the mobile Internet connection, the gateway is not able to respond in time to the request coming from the device. Which results in the lowering of the data-rate.

Nowadays I am using a Kerlink Wirnet with your gateway-bridge on it and the connection is made through a private APN. Still, it is a very slow connection.

In that case, you could increase the rx1_delay setting in the NS config so that you have a bit more roundtrip margin (e.g. set it to 3 instead of 1 second).

Thanks for your reply. I am already at 7(!) seconds, at 1-6 seconds downlink didn’t really work.

Hi, wouldn’t it be a good feature to have a round trip time per gateway and getting a warning or error in the logs (and/or error event) when the downlink window was missed?

Hi, @brocaar and guys/girls :slight_smile:
Can someone give me real life numbers for setting the DataRate according the received RSSI/SNR?
There is a Table 13 in SX1272 datasheet:
SpreadingFactor | LoRa Demodulator SNR
7 | -7.5 dB
8 | -10 dB
9 | -12.5 dB
10 | -15 dB
11 | -17.5 dB
12 | -20 dB
But I can not find such a table for the RSSI.

Update:
After some research I found that most providers of network servers use the default Semtech ADR algorithm, which uses the SNR only and do not take the RSSI.
Example: Adaptive Data Rate | The Things Network