Issues with LinkADRReq (dr and nb_trans )

Hi @brocaar,

My Node (RN2483 based) is configured with ADR OFF, DataRate 0 (i.e., SF12)
After sending the first successful Downlink message to the node, I see an ADRrequest is being sent to the node by the server

loraserver[5349]: time=“2017-12-22T07:41:06Z” level=info msg=“adr request added to mac-command queue” dev_eui=0005a10a0033b5e2 dr=0 nb_trans=3 req_dr=5 req_nb_trans=3 req_tx_power_idx=3 tx_power=0

After this request, the following changes happened to my configuration:

  1. My node’s Datarate changes from 0 to 5.

  2. Each time my node does a transmission, it is being received 3 times by the app-server (as seen in the console logs as well as the GUI’s raw-frame-logs) with time-gaps of 2 seconds

lora-gateway-bridge[5231]: time=“2017-12-22T07:43:17Z” level=info msg=“backend: publishing packet” topic=“gateway/747800ff2d1068e8/rx”
lora-gateway-bridge[5231]: time=“2017-12-22T07:43:19Z” level=info msg=“backend: publishing packet” topic=“gateway/747800ff2d1068e8/rx”
lora-gateway-bridge[5231]: time=“2017-12-22T07:43:21Z” level=info msg=“backend: publishing packet” topic=“gateway/747800ff2d1068e8/rx”

  1. ADR is getting turned ON on my node ( I confirmed using “mac get adr” ),

The issue is: I don’t want any of these to happen. My application needs transmission with datarate 0 itself. and I don’t want an Uplink message to be transmitted 3 times to the app-server.

Questions:

1. How do I disable ADR request ? I browsed through the forum where people say that “ADRInterval = 0” disables ADR, but I don’t find this option anywhere in my configuration files or the User-Interface!! (I am using the latest version of the LoRa server)

The following is the screenshot of the fields in my"Service-profile" where there are only Min and Max DataRate fields for ADR. I don’t see any ADR interval !

2. I see in the logs that nb_trans = 3 and req_nb_trans = 3. What does this signify? If this is the reason for 3 Uplink messages to the app-server, how do I configure it to just 1 ?

Also, after these changes, I see downlink not working as expected. It works only once in a while ( I suspect the timing of 3 UL messages being sent by gateway-bridge instead of 1 )

3. If I cannot stop ADRRequest, how can I configure req_dr=0 instead of req_dr=5.

Kindly help!

Log snippet as follows:

loraserver[5349]: time=“2017-12-22T07:41:06Z” level=info msg=“mac-command block added to queue” cid=LinkADRReq dev_eui=0005a10a0033b5e2 frmpayload=false
loraserver[5349]: time=“2017-12-22T07:41:06Z” level=info msg=“adr request added to mac-command queue” dev_eui=0005a10a0033b5e2 dr=0 nb_trans=3 req_dr=5 req_nb_trans=3 req_tx_power_idx=3 tx_power=0
loraserver[5349]: time=“2017-12-22T07:41:06Z” level=info msg=“device-session saved” dev_addr=600defg7 dev_eui=0005a10a0033b5e2
loraserver[5349]: time=“2017-12-22T07:41:06Z” level=info msg=“pending mac-command block set” cid=LinkADRReq commands=1 dev_eui=0005a10a0033b5e2 frm_payload=false
loraserver[5349]: time=“2017-12-22T07:41:06Z” level=info msg=“mac-command block removed from queue” cid=LinkADRReq dev_eui=0005a10a0033b5e2
loraserver[5349]: time=“2017-12-22T07:41:06Z” level=info msg=“backend/gateway: publishing tx packet” topic=“gateway/747800ff2d1068e8/tx”
lora-gateway-bridge[5234]: time=“2017-12-22T07:41:06Z” level=info msg=“backend: packet received” topic=“gateway/747800ff2d1068e8/tx”

Could you post a screenshot of the raw uplink frame (LoRa App Server) with all the fields expanded. Just to make sure ADR is really turned off from your device side. There are a couple of bugs in the RN2483 firmware which cause the device to automatically turn from adr: off to adr: on.

(there is an issue with the nb_trans that it might increase too fast, I have a fix which I’m currently testing and which will be released soon: https://github.com/brocaar/loraserver/compare/nb_trans_fix)

@brocaar
The following is the screenshot of the raw uplink frame. You can see that ADR is false.
Could you please tell what does “nb_trans” mean?

The screenshot of the corresponding Downlink message is as follows:
It has adr: true.

Please let me know how to make this false? Can it be given as a payload in the downlink body along with data, while initiating a Downlink message from the API ? If yes, can you tell the format please?

This is not an issue. It only indicates that the network-server is capable of adaptive-datarate, it will only manage the device data-rate when the uplink adr: true. See also:

When adr is false, it will not perform any ADR logic.

@vss1 What type of node are using (besides having an RN2483)? I am asking because I have several Microchip LoRa Motes that sometimes (when batteries are not in shape) produce a very similar effect to the ones you listed.

@brocaar
The Uplink adr is false. Please check the screenshots.
The downlink adr is true. I have posted the screenshots of both uplink and downlink in the above two posts of mine. I gave the downlink screenshot as well, just for your reference.

Can you please check and comment again.