The LinkADRReq payload enables unexpected uplink channels

Hi, first thanks for the great software.

I’ve been using your server with some success but have run into issues with the ADR feature.

i’m trying to use ADR for node,so first, i’m enabled the ADR flags on node. second, i’m always configured the ADR interval, Installation margin (dB) option in [Advanced network settings], ADR interval value is 4, Installation margin is 5dB.

and now, the node can received the LinkADRReq mac command, but the payload was strange, the payload’s value such as following Hexadecimal data:[53ffff01], the command asking node enabled the 470.3MHz-471.7MHz channels to uplink, but i never enabled the channels in node, the node default’s uplink cahnnles list 475.1-476.5MHz.

so I can’t understand the ADR feature. Could you help me?


node’s default enabled channels is
LoRaMacParamsDefaults.ChannelsMask [1] = 0x00ff;

Your using the CN 470-510MHz Band? Please note that you can control the enabled channels using the --enable-uplink-channels. config flag.

I am sorry for my late reply. Thanks for your reply, I trying to use the --enable-uplink-channels. config flag. But still does not work.

if we enabled --enable-uplink-channels config flag on loraserver,the ADR feature will can’t work, I don’t know why, maybe i can’t understand the enabled-uplink-channels flag means what.
–enable-uplink-channels value enable only a given sub-set of channels (e.g. ‘0-7,8-15’), in my opinion the given sub-set of channels will be used to ADR feature?

i don’t understand why the ADRRreq command’s payload enables upexpected uplink channels, Chmask always be set 0xffff, ChMaskCntl always be set 0, the Chmask and ChMaskCntl’s values will enabled the invalid uplink channels , but the gateway never listening these channels.

i think this is a problem on loraserver.

What is the vendor and type of your device? And could you post a screenshot of the relevant raw frame-logs (please expand the fOpts key so we can see the content of the Mac-commands).

OK, The gateway and node is our own designed. node’s source code based on the following linksLoRaMac-node, node run in classA.

And i’ll post later, thank you for your reply.

i add the log’s printf in handleUplinkMACCommands function, and adr.HandleADR function, they will printf the uplink’s mac-commands and LinkADRReq mac-command.

and the log’s of loraserver

INFO[0000] hello this is main func
INFO[0000] starting LoRa Server band=“CN_470_510” docs=“https://docs.loraserver.io/” net_id=010203 version=0.21.0-8-gce5d8d4
INFO[0000] setup redis connection pool url=“redis://localhost:6379”
INFO[0000] connecting to postgresql
INFO[0000] backend/gateway: connecting to mqtt broker server=“tcp://localhost:1883”
INFO[0000] connecting to application-server ca-cert= server=“127.0.0.1:8001” tls-cert= tls-key=
INFO[0000] no network-controller configured
INFO[0000] starting api server bind=“0.0.0.0:8000” ca-cert= tls-cert= tls-key=
INFO[0000] starting gateway api server bind=“0.0.0.0:8002” ca-cert= tls-cert= tls-key=
INFO[0000] backend/gateway: connected to mqtt server
INFO[0000] backend/gateway: subscribing to rx topic topic=“gateway/+/rx”
INFO[0000] backend/gateway: subscribing to stats topic topic=“gateway/+/stats”
INFO[0002] backend/gateway: rx packet received
2017/11/17 10:04:25 len(FHDR) = 7 fOptsLen=0
INFO[0002] backend/gateway: rx packet received
2017/11/17 10:04:25 len(FHDR) = 7 fOptsLen=0
INFO[0003] backend/gateway: rx packet received
2017/11/17 10:04:25 len(FHDR) = 7 fOptsLen=0
2017/11/17 10:04:25 len(FHDR) = 7 fOptsLen=0
2017/11/17 10:04:25 len(FHDR) = 7 fOptsLen=0
INFO[0003] hello this is setContextFromDataPHYPayload func, ctx.phyload {{ConfirmedDataUp LoRaWANR1} 0xc4206ea320 3c8efbd0}rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1028647916 472700000 4 0 1 4/5 -37 13.5 39 {LORA 12 125 0}} {1c40e80081fefffe 0001-01-01 00:00:00 +0000 UTC 3497655764 472700000 4 0 1 4/5 -107 -11.5 39 {LORA 12 125 0}}]
INFO[0003] hello this is getNodeSessionForDataUp func
INFO[0003] hello this is GetNodeSessionForPHYPayload func, {57f97cbf {true false false false 0} 72 []}
INFO[0003] the FCnt is valid, validate the MIC
INFO[0003] micok = true err =
INFO[0003] hello this is logDataFramesCollected func
INFO[0003] packet(s) collected dev_eui=9bf728017a881379 gw_count=2 gw_macs=“1c40e800403dfffe, 1c40e80081fefffe” mtype=ConfirmedDataUp
INFO[0003] hello this is decryptFRMPayloadMACCommands func
INFO[0003] hello this is sendRXInfoToNetworkController func, rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1028647916 472700000 4 0 1 4/5 -37 13.5 39 {LORA 12 125 0}} {1c40e80081fefffe 0001-01-01 00:00:00 +0000 UTC 3497655764 472700000 4 0 1 4/5 -107 -11.5 39 {LORA 12 125 0}}]
INFO[0003] rx info sent to network-controller dev_eui=9bf728017a881379
INFO[0003] hello this is handleFOptsMACCommands func
INFO[0003] hello this is handleFRMPayloadMACCommands func
INFO[0003] hello this is sendFRMPayloadToApplicationServer func
INFO[0003] hello this is handleChannelReconfiguration func
INFO[0003] hello this hs handleADR func
INFO[0003] xxxxxxxxxxxxxxxxxxxxxx on HandleADR func
INFO[0003] LinkADRReq’s Payload CID=LinkADRReq ChMask=[true true true true true true true true true true true true true true true true] ChMaskCntl=0 DataRate=5 NbRep=2 TXPower=4
INFO[0003] mac-command block added to queue cid=LinkADRReq dev_eui=9bf728017a881379 frmpayload=false
INFO[0003] adr request added to mac-command queue dev_eui=9bf728017a881379 dr=0 nb_trans=1 req_dr=5 req_nb_trans=2 req_tx_power_idx=4 tx_power=0
INFO[0003] hello this is setLastRXInfoSet func
INFO[0003] hello this is syncUplinkFCnt func
INFO[0003] hello this is saveNodeSession func
INFO[0003] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0003] hello this is handleUplinkACK func
INFO[0003] hello this is handleDownlink func
INFO[0003] pending mac-command block set cid=LinkADRReq commands=1 dev_eui=9bf728017a881379 frm_payload=false
INFO[0003] mac-command block removed from queue cid=LinkADRReq dev_eui=9bf728017a881379
INFO[0003] backend/gateway: publishing tx packet topic=“gateway/1c40e800403dfffe/tx”
INFO[0003] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0006] backend/gateway: gateway stats packet received mac=1c40e80081fefffe
INFO[0006] gateway updated mac=1c40e80081fefffe
INFO[0009] backend/gateway: gateway stats packet received mac=1c40e800403dfffe
INFO[0009] gateway updated mac=1c40e800403dfffe
INFO[0014] backend/gateway: rx packet received
2017/11/17 10:04:37 len(FHDR) = 9 fOptsLen=2
INFO[0014] backend/gateway: rx packet received
2017/11/17 10:04:37 len(FHDR) = 9 fOptsLen=2
2017/11/17 10:04:37 len(FHDR) = 9 fOptsLen=2
2017/11/17 10:04:37 len(FHDR) = 9 fOptsLen=2
INFO[0014] hello this is setContextFromDataPHYPayload func, ctx.phyload {{ConfirmedDataUp LoRaWANR1} 0xc4206ebf90 96437c3a}rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1040258540 473100000 6 0 1 4/5 -37 9.3 41 {LORA 7 125 0}} {1c40e80081fefffe 0001-01-01 00:00:00 +0000 UTC 3509266396 473100000 6 0 1 4/5 -107 -4 41 {LORA 7 125 0}}]
INFO[0014] hello this is getNodeSessionForDataUp func
INFO[0014] hello this is GetNodeSessionForPHYPayload func, {57f97cbf {true false false false 2} 73 [{LinkADRReq 0xc4202c9f73}]}
INFO[0014] the FCnt is valid, validate the MIC
INFO[0014] micok = true err =
INFO[0014] hello this is logDataFramesCollected func
INFO[0014] packet(s) collected dev_eui=9bf728017a881379 gw_count=2 gw_macs=“1c40e800403dfffe, 1c40e80081fefffe” mtype=ConfirmedDataUp
INFO[0014] hello this is decryptFRMPayloadMACCommands func
INFO[0014] hello this is sendRXInfoToNetworkController func, rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1040258540 473100000 6 0 1 4/5 -37 9.3 41 {LORA 7 125 0}} {1c40e80081fefffe 0001-01-01 00:00:00 +0000 UTC 3509266396 473100000 6 0 1 4/5 -107 -4 41 {LORA 7 125 0}}]
INFO[0014] rx info sent to network-controller dev_eui=9bf728017a881379
INFO[0014] hello this is handleFOptsMACCommands func
INFO[0014] hello this is handleUplinkMACCommands func
INFO[0014] FOpts info cid=LinkADRReq dev_eui=9bf728017a881379 payload=&{true true true}
INFO[0014] printf Fpots key
INFO[0014] mac-command block removed from pending cid=LinkADRReq dev_eui=9bf728017a881379
INFO[0014] link_adr request acknowledged dev_eui=9bf728017a881379 dr=5 enabled_channels=[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95] nb_trans=2 tx_power_idx=4
INFO[0014] hello this is handleFRMPayloadMACCommands func
INFO[0014] hello this is sendFRMPayloadToApplicationServer func
INFO[0014] hello this is handleChannelReconfiguration func
INFO[0014] hello this hs handleADR func
INFO[0014] hello this is setLastRXInfoSet func
INFO[0014] hello this is syncUplinkFCnt func
INFO[0014] hello this is saveNodeSession func
INFO[0014] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0014] hello this is handleUplinkACK func
INFO[0014] hello this is handleDownlink func
INFO[0014] backend/gateway: publishing tx packet topic=“gateway/1c40e800403dfffe/tx”
INFO[0014] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0016] backend/gateway: rx packet received
2017/11/17 10:04:38 len(FHDR) = 7 fOptsLen=0
INFO[0016] backend/gateway: rx packet received
2017/11/17 10:04:38 len(FHDR) = 7 fOptsLen=0
2017/11/17 10:04:39 len(FHDR) = 7 fOptsLen=0
2017/11/17 10:04:39 len(FHDR) = 7 fOptsLen=0
INFO[0016] hello this is setContextFromDataPHYPayload func, ctx.phyload {{ConfirmedDataUp LoRaWANR1} 0xc4202f1180 88709c92}rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1042042284 472900000 5 0 1 4/5 -35 7.8 39 {LORA 7 125 0}} {1c40e80081fefffe 0001-01-01 00:00:00 +0000 UTC 3511050140 472900000 5 0 1 4/5 -107 -7 39 {LORA 7 125 0}}]
INFO[0016] hello this is getNodeSessionForDataUp func
INFO[0016] hello this is GetNodeSessionForPHYPayload func, {57f97cbf {true false false false 0} 74 []}
INFO[0016] the FCnt is valid, validate the MIC
INFO[0016] micok = true err =
INFO[0016] hello this is logDataFramesCollected func
INFO[0016] packet(s) collected dev_eui=9bf728017a881379 gw_count=2 gw_macs=“1c40e800403dfffe, 1c40e80081fefffe” mtype=ConfirmedDataUp
INFO[0016] hello this is decryptFRMPayloadMACCommands func
INFO[0016] hello this is sendRXInfoToNetworkController func, rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1042042284 472900000 5 0 1 4/5 -35 7.8 39 {LORA 7 125 0}} {1c40e80081fefffe 0001-01-01 00:00:00 +0000 UTC 3511050140 472900000 5 0 1 4/5 -107 -7 39 {LORA 7 125 0}}]
INFO[0016] rx info sent to network-controller dev_eui=9bf728017a881379
INFO[0016] hello this is handleFOptsMACCommands func
INFO[0016] hello this is handleFRMPayloadMACCommands func
INFO[0016] hello this is sendFRMPayloadToApplicationServer func
INFO[0016] hello this is handleChannelReconfiguration func
INFO[0016] hello this hs handleADR func
INFO[0016] hello this is setLastRXInfoSet func
INFO[0016] hello this is syncUplinkFCnt func
INFO[0016] hello this is saveNodeSession func
INFO[0016] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0016] hello this is handleUplinkACK func
INFO[0016] hello this is handleDownlink func
INFO[0016] backend/gateway: publishing tx packet topic=“gateway/1c40e800403dfffe/tx”
INFO[0016] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0023] backend/gateway: rx packet received
2017/11/17 10:04:46 len(FHDR) = 7 fOptsLen=0
INFO[0023] backend/gateway: rx packet received
2017/11/17 10:04:46 len(FHDR) = 7 fOptsLen=0
2017/11/17 10:04:46 len(FHDR) = 7 fOptsLen=0
2017/11/17 10:04:46 len(FHDR) = 7 fOptsLen=0
INFO[0023] hello this is setContextFromDataPHYPayload func, ctx.phyload {{ConfirmedDataUp LoRaWANR1} 0xc4203280f0 fabc3273}rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1049300523 472500000 3 0 1 4/5 -36 9 39 {LORA 7 125 0}} {1c40e80081fefffe 0001-01-01 00:00:00 +0000 UTC 3518308379 472500000 3 0 1 4/5 -107 -6.3 39 {LORA 7 125 0}}]
INFO[0023] hello this is getNodeSessionForDataUp func
INFO[0023] hello this is GetNodeSessionForPHYPayload func, {57f97cbf {true false false false 0} 75 []}
INFO[0023] the FCnt is valid, validate the MIC
INFO[0023] micok = true err =
INFO[0023] hello this is logDataFramesCollected func
INFO[0023] packet(s) collected dev_eui=9bf728017a881379 gw_count=2 gw_macs=“1c40e800403dfffe, 1c40e80081fefffe” mtype=ConfirmedDataUp
INFO[0023] hello this is decryptFRMPayloadMACCommands func
INFO[0023] hello this is sendRXInfoToNetworkController func, rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1049300523 472500000 3 0 1 4/5 -36 9 39 {LORA 7 125 0}} {1c40e80081fefffe 0001-01-01 00:00:00 +0000 UTC 3518308379 472500000 3 0 1 4/5 -107 -6.3 39 {LORA 7 125 0}}]
INFO[0023] rx info sent to network-controller dev_eui=9bf728017a881379
INFO[0023] hello this is handleFOptsMACCommands func
INFO[0023] hello this is handleFRMPayloadMACCommands func
INFO[0023] hello this is sendFRMPayloadToApplicationServer func
INFO[0023] hello this is handleChannelReconfiguration func
INFO[0023] hello this hs handleADR func
INFO[0023] hello this is setLastRXInfoSet func
INFO[0023] hello this is syncUplinkFCnt func
INFO[0023] hello this is saveNodeSession func
INFO[0023] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0023] hello this is handleUplinkACK func
INFO[0023] hello this is handleDownlink func
INFO[0023] backend/gateway: publishing tx packet topic=“gateway/1c40e800403dfffe/tx”
INFO[0023] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0034] backend/gateway: rx packet received
2017/11/17 10:04:57 len(FHDR) = 7 fOptsLen=0
INFO[0034] backend/gateway: rx packet received
2017/11/17 10:04:57 len(FHDR) = 7 fOptsLen=0
2017/11/17 10:04:57 len(FHDR) = 7 fOptsLen=0
2017/11/17 10:04:57 len(FHDR) = 7 fOptsLen=0
INFO[0035] hello this is setContextFromDataPHYPayload func, ctx.phyload {{ConfirmedDataUp LoRaWANR1} 0xc4203290e0 363aac74}rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1060674380 473100000 6 0 1 4/5 -32 9.5 39 {LORA 7 125 0}} {1c40e80081fefffe 0001-01-01 00:00:00 +0000 UTC 3529682236 473100000 6 0 1 4/5 -108 -4.3 39 {LORA 7 125 0}}]
INFO[0035] hello this is getNodeSessionForDataUp func
INFO[0035] hello this is GetNodeSessionForPHYPayload func, {57f97cbf {true false false false 0} 76 []}
INFO[0035] the FCnt is valid, validate the MIC
INFO[0035] micok = true err =
INFO[0035] hello this is logDataFramesCollected func
INFO[0035] packet(s) collected dev_eui=9bf728017a881379 gw_count=2 gw_macs=“1c40e800403dfffe, 1c40e80081fefffe” mtype=ConfirmedDataUp
INFO[0035] hello this is decryptFRMPayloadMACCommands func
INFO[0035] hello this is sendRXInfoToNetworkController func, rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1060674380 473100000 6 0 1 4/5 -32 9.5 39 {LORA 7 125 0}} {1c40e80081fefffe 0001-01-01 00:00:00 +0000 UTC 3529682236 473100000 6 0 1 4/5 -108 -4.3 39 {LORA 7 125 0}}]
INFO[0035] rx info sent to network-controller dev_eui=9bf728017a881379
INFO[0035] hello this is handleFOptsMACCommands func
INFO[0035] hello this is handleFRMPayloadMACCommands func
INFO[0035] hello this is sendFRMPayloadToApplicationServer func
INFO[0035] hello this is handleChannelReconfiguration func
INFO[0035] hello this hs handleADR func
INFO[0035] xxxxxxxxxxxxxxxxxxxxxx on HandleADR func
INFO[0035] LinkADRReq’s Payload CID=LinkADRReq ChMask=[true true true true true true true true true true true true true true true true] ChMaskCntl=0 DataRate=5 NbRep=3 TXPower=7
INFO[0035] mac-command block added to queue cid=LinkADRReq dev_eui=9bf728017a881379 frmpayload=false
INFO[0035] adr request added to mac-command queue dev_eui=9bf728017a881379 dr=5 nb_trans=2 req_dr=5 req_nb_trans=3 req_tx_power_idx=7 tx_power=4
INFO[0035] hello this is setLastRXInfoSet func
INFO[0035] hello this is syncUplinkFCnt func
INFO[0035] hello this is saveNodeSession func
INFO[0035] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0035] hello this is handleUplinkACK func
INFO[0035] hello this is handleDownlink func
INFO[0035] pending mac-command block set cid=LinkADRReq commands=1 dev_eui=9bf728017a881379 frm_payload=false
INFO[0035] mac-command block removed from queue cid=LinkADRReq dev_eui=9bf728017a881379
INFO[0035] backend/gateway: publishing tx packet topic=“gateway/1c40e800403dfffe/tx”
INFO[0035] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0036] backend/gateway: gateway stats packet received mac=1c40e80081fefffe
INFO[0036] gateway updated mac=1c40e80081fefffe
INFO[0039] backend/gateway: gateway stats packet received mac=1c40e800403dfffe
INFO[0039] gateway updated mac=1c40e800403dfffe
INFO[0054] backend/gateway: rx packet received
2017/11/17 10:05:16 len(FHDR) = 9 fOptsLen=2
2017/11/17 10:05:17 len(FHDR) = 9 fOptsLen=2
INFO[0054] hello this is setContextFromDataPHYPayload func, ctx.phyload {{ConfirmedDataUp LoRaWANR1} 0xc4203767d0 2054500b}rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1080104332 471900000 2 1 1 4/5 -79 8.8 41 {LORA 8 125 0}}]
INFO[0054] hello this is getNodeSessionForDataUp func
INFO[0054] hello this is GetNodeSessionForPHYPayload func, {57f97cbf {true false false false 2} 77 [{LinkADRReq 0xc420375813}]}
INFO[0054] the FCnt is valid, validate the MIC
INFO[0054] micok = true err =
INFO[0054] hello this is logDataFramesCollected func
INFO[0054] packet(s) collected dev_eui=9bf728017a881379 gw_count=1 gw_macs=1c40e800403dfffe mtype=ConfirmedDataUp
INFO[0054] hello this is decryptFRMPayloadMACCommands func
INFO[0054] hello this is sendRXInfoToNetworkController func, rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1080104332 471900000 2 1 1 4/5 -79 8.8 41 {LORA 8 125 0}}]
INFO[0054] rx info sent to network-controller dev_eui=9bf728017a881379
INFO[0054] hello this is handleFOptsMACCommands func
INFO[0054] hello this is handleUplinkMACCommands func
INFO[0054] FOpts info cid=LinkADRReq dev_eui=9bf728017a881379 payload=&{true true true}
INFO[0054] printf Fpots key
INFO[0054] mac-command block removed from pending cid=LinkADRReq dev_eui=9bf728017a881379
INFO[0054] link_adr request acknowledged dev_eui=9bf728017a881379 dr=5 enabled_channels=[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95] nb_trans=3 tx_power_idx=7
INFO[0054] hello this is handleFRMPayloadMACCommands func
INFO[0054] hello this is sendFRMPayloadToApplicationServer func
INFO[0054] hello this is handleChannelReconfiguration func
INFO[0054] hello this hs handleADR func
INFO[0054] hello this is setLastRXInfoSet func
INFO[0054] hello this is syncUplinkFCnt func
INFO[0054] hello this is saveNodeSession func
INFO[0054] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0054] hello this is handleUplinkACK func
INFO[0054] hello this is handleDownlink func
INFO[0054] backend/gateway: publishing tx packet topic=“gateway/1c40e800403dfffe/tx”
INFO[0054] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0061] backend/gateway: rx packet received
2017/11/17 10:05:24 len(FHDR) = 7 fOptsLen=0
2017/11/17 10:05:24 len(FHDR) = 7 fOptsLen=0
INFO[0061] hello this is setContextFromDataPHYPayload func, ctx.phyload {{ConfirmedDataUp LoRaWANR1} 0xc420377810 68a567e3}rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1087507604 473100000 6 0 1 4/5 -47 11.8 39 {LORA 8 125 0}}]
INFO[0061] hello this is getNodeSessionForDataUp func
INFO[0061] hello this is GetNodeSessionForPHYPayload func, {57f97cbf {true false false false 0} 78 []}
INFO[0061] the FCnt is valid, validate the MIC
INFO[0061] micok = true err =
INFO[0061] hello this is logDataFramesCollected func
INFO[0061] packet(s) collected dev_eui=9bf728017a881379 gw_count=1 gw_macs=1c40e800403dfffe mtype=ConfirmedDataUp
INFO[0062] hello this is decryptFRMPayloadMACCommands func
INFO[0062] hello this is sendRXInfoToNetworkController func, rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1087507604 473100000 6 0 1 4/5 -47 11.8 39 {LORA 8 125 0}}]
INFO[0062] rx info sent to network-controller dev_eui=9bf728017a881379
INFO[0062] hello this is handleFOptsMACCommands func
INFO[0062] hello this is handleFRMPayloadMACCommands func
INFO[0062] hello this is sendFRMPayloadToApplicationServer func
INFO[0062] hello this is handleChannelReconfiguration func
INFO[0062] hello this hs handleADR func
INFO[0062] hello this is setLastRXInfoSet func
INFO[0062] hello this is syncUplinkFCnt func
INFO[0062] hello this is saveNodeSession func
INFO[0062] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0062] hello this is handleUplinkACK func
INFO[0062] hello this is handleDownlink func
INFO[0062] backend/gateway: publishing tx packet topic=“gateway/1c40e800403dfffe/tx”
INFO[0062] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0066] backend/gateway: gateway stats packet received mac=1c40e80081fefffe
INFO[0066] gateway updated mac=1c40e80081fefffe
INFO[0069] backend/gateway: gateway stats packet received mac=1c40e800403dfffe
INFO[0069] gateway updated mac=1c40e800403dfffe
INFO[0074] backend/gateway: rx packet received
2017/11/17 10:05:37 len(FHDR) = 7 fOptsLen=0
2017/11/17 10:05:37 len(FHDR) = 7 fOptsLen=0
INFO[0075] hello this is setContextFromDataPHYPayload func, ctx.phyload {{ConfirmedDataUp LoRaWANR1} 0xc4203bcaa0 2e13ee44}rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1100672268 473300000 7 0 1 4/5 -48 11.5 39 {LORA 8 125 0}}]
INFO[0075] hello this is getNodeSessionForDataUp func
INFO[0075] hello this is GetNodeSessionForPHYPayload func, {57f97cbf {true false false false 0} 79 []}
INFO[0075] the FCnt is valid, validate the MIC
INFO[0075] micok = true err =
INFO[0075] hello this is logDataFramesCollected func
INFO[0075] packet(s) collected dev_eui=9bf728017a881379 gw_count=1 gw_macs=1c40e800403dfffe mtype=ConfirmedDataUp
INFO[0075] hello this is decryptFRMPayloadMACCommands func
INFO[0075] hello this is sendRXInfoToNetworkController func, rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1100672268 473300000 7 0 1 4/5 -48 11.5 39 {LORA 8 125 0}}]
INFO[0075] rx info sent to network-controller dev_eui=9bf728017a881379
INFO[0075] hello this is handleFOptsMACCommands func
INFO[0075] hello this is handleFRMPayloadMACCommands func
INFO[0075] hello this is sendFRMPayloadToApplicationServer func
INFO[0075] hello this is handleChannelReconfiguration func
INFO[0075] hello this hs handleADR func
INFO[0075] hello this is setLastRXInfoSet func
INFO[0075] hello this is syncUplinkFCnt func
INFO[0075] hello this is saveNodeSession func
INFO[0075] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0075] hello this is handleUplinkACK func
INFO[0075] hello this is handleDownlink func
INFO[0075] backend/gateway: publishing tx packet topic=“gateway/1c40e800403dfffe/tx”
INFO[0075] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0081] backend/gateway: rx packet received
2017/11/17 10:05:44 len(FHDR) = 7 fOptsLen=0
2017/11/17 10:05:44 len(FHDR) = 7 fOptsLen=0
INFO[0081] hello this is setContextFromDataPHYPayload func, ctx.phyload {{ConfirmedDataUp LoRaWANR1} 0xc4203bd810 cf87955c}rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1107399580 472500000 3 0 1 4/5 -42 10.8 39 {LORA 8 125 0}}]
INFO[0081] hello this is getNodeSessionForDataUp func
INFO[0081] hello this is GetNodeSessionForPHYPayload func, {57f97cbf {true false false false 0} 80 []}
INFO[0081] the FCnt is valid, validate the MIC
INFO[0081] micok = true err =
INFO[0081] hello this is logDataFramesCollected func
INFO[0081] packet(s) collected dev_eui=9bf728017a881379 gw_count=1 gw_macs=1c40e800403dfffe mtype=ConfirmedDataUp
INFO[0081] hello this is decryptFRMPayloadMACCommands func
INFO[0081] hello this is sendRXInfoToNetworkController func, rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1107399580 472500000 3 0 1 4/5 -42 10.8 39 {LORA 8 125 0}}]
INFO[0081] rx info sent to network-controller dev_eui=9bf728017a881379
INFO[0081] hello this is handleFOptsMACCommands func
INFO[0081] hello this is handleFRMPayloadMACCommands func
INFO[0081] hello this is sendFRMPayloadToApplicationServer func
INFO[0081] hello this is handleChannelReconfiguration func
INFO[0081] hello this hs handleADR func
INFO[0081] xxxxxxxxxxxxxxxxxxxxxx on HandleADR func
INFO[0081] LinkADRReq’s Payload CID=LinkADRReq ChMask=[true true true true true true true true true true true true true true true true] ChMaskCntl=0 DataRate=5 NbRep=3 TXPower=5
INFO[0081] mac-command block added to queue cid=LinkADRReq dev_eui=9bf728017a881379 frmpayload=false
INFO[0081] adr request added to mac-command queue dev_eui=9bf728017a881379 dr=4 nb_trans=3 req_dr=5 req_nb_trans=3 req_tx_power_idx=5 tx_power=0
INFO[0081] hello this is setLastRXInfoSet func
INFO[0081] hello this is syncUplinkFCnt func
INFO[0081] hello this is saveNodeSession func
INFO[0081] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0081] hello this is handleUplinkACK func
INFO[0081] hello this is handleDownlink func
INFO[0082] pending mac-command block set cid=LinkADRReq commands=1 dev_eui=9bf728017a881379 frm_payload=false
INFO[0082] mac-command block removed from queue cid=LinkADRReq dev_eui=9bf728017a881379
INFO[0082] backend/gateway: publishing tx packet topic=“gateway/1c40e800403dfffe/tx”
INFO[0082] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379
INFO[0096] backend/gateway: gateway stats packet received mac=1c40e80081fefffe
INFO[0096] gateway updated mac=1c40e80081fefffe
INFO[0099] backend/gateway: gateway stats packet received mac=1c40e800403dfffe
INFO[0099] gateway updated mac=1c40e800403dfffe
INFO[0102] backend/gateway: rx packet received
2017/11/17 10:06:05 len(FHDR) = 9 fOptsLen=2
INFO[0102] backend/gateway: rx packet received
2017/11/17 10:06:05 len(FHDR) = 9 fOptsLen=2
2017/11/17 10:06:05 len(FHDR) = 9 fOptsLen=2
2017/11/17 10:06:05 len(FHDR) = 9 fOptsLen=2
INFO[0102] hello this is setContextFromDataPHYPayload func, ctx.phyload {{ConfirmedDataUp LoRaWANR1} 0xc42006a1e0 75cc1896}rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1128493468 473100000 6 0 1 4/5 -41 11.8 41 {LORA 8 125 0}} {1c40e80081fefffe 0001-01-01 00:00:00 +0000 UTC 3597501332 473100000 6 0 1 4/5 -107 -7.8 41 {LORA 8 125 0}}]
INFO[0102] hello this is getNodeSessionForDataUp func
INFO[0102] hello this is GetNodeSessionForPHYPayload func, {57f97cbf {true false false false 2} 81 [{LinkADRReq 0xc420014c53}]}
INFO[0102] the FCnt is valid, validate the MIC
INFO[0102] micok = true err =
INFO[0102] hello this is logDataFramesCollected func
INFO[0102] packet(s) collected dev_eui=9bf728017a881379 gw_count=2 gw_macs=“1c40e800403dfffe, 1c40e80081fefffe” mtype=ConfirmedDataUp
INFO[0102] hello this is decryptFRMPayloadMACCommands func
INFO[0102] hello this is sendRXInfoToNetworkController func, rxinfo [{1c40e800403dfffe 0001-01-01 00:00:00 +0000 UTC 1128493468 473100000 6 0 1 4/5 -41 11.8 41 {LORA 8 125 0}} {1c40e80081fefffe 0001-01-01 00:00:00 +0000 UTC 3597501332 473100000 6 0 1 4/5 -107 -7.8 41 {LORA 8 125 0}}]
INFO[0102] rx info sent to network-controller dev_eui=9bf728017a881379
INFO[0102] hello this is handleFOptsMACCommands func
INFO[0102] hello this is handleUplinkMACCommands func
INFO[0102] FOpts info cid=LinkADRReq dev_eui=9bf728017a881379 payload=&{true true true}
INFO[0102] printf Fpots key
INFO[0102] mac-command block removed from pending cid=LinkADRReq dev_eui=9bf728017a881379
INFO[0102] link_adr request acknowledged dev_eui=9bf728017a881379 dr=5 enabled_channels=[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95] nb_trans=3 tx_power_idx=5
INFO[0102] hello this is handleFRMPayloadMACCommands func
INFO[0102] hello this is sendFRMPayloadToApplicationServer func
INFO[0102] hello this is handleChannelReconfiguration func
INFO[0102] hello this hs handleADR func
INFO[0102] hello this is setLastRXInfoSet func
INFO[0102] hello this is syncUplinkFCnt func
INFO[0102] hello this is saveNodeSession func
INFO[0102] node-session saved dev_addr=57f97cbf dev_eui=9bf728017a881379

and the screenshot of loraserver are there.





i have a another question, why node does not support adr feature when they run on classA and OTAA?

I might not understand raw frame-logs what does means. i post som raw frame-logs of loraserver. maybe you want to this?

What do you have in your LoRa Server --enable-uplink-channels / ENABLE_UPLINK_CHANNELS configuration? See also https://docs.loraserver.io/loraserver/install/config/

As you can see in the logs, LoRa Server is activating the following channels on purpose (either by misconfiguration or bug):

INFO[0102] link_adr request acknowledged dev_eui=9bf728017a881379 dr=5 enabled_channels=[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95] nb_trans=3 tx_power_idx=5

in my LoRa Server --enable-uplink-channels=“8-15,24-31”。

this is my fault about the --enable-uplink-channels option doesn’t work.

I wrote the error format for --enable-uplink-channels [–enable-uplink-channels=8-15,24-31]

correct format must be wrote [–enable-uplink-channels=“8-15,24-31”]

Now this option can be used for ADR feature, But they still can’t change the node’s uplinkChannels. change channels [8-15] to channels [24-31], when the best gateway was be closed, the best gateway be configuration listening channels are [8-15].

Example command: loraserver --enable-uplink-channels=0-7 should result in something like this in the logs:

INFO[0000] disabling all channels
INFO[0000] enabling channel block                        first_channel=0 last_channel=7

If not, then the config params are incorrect. When you re-activate your node (OTAA), you will see that LoRa Server will enable these channels on your node and disable all other channels. This is not just for ADR! Even for nodes with ADR turned off, LoRa Server will re-configure the channels.

yes, you’re right. --enable-uplink-channels option can change node’s channels. thanks your reply,:kissing:, i fix my problem.

1 Like

But i have a another question, why node does not support adr feature when they run on classA and OTAA?

ADR should work for ClassA nodes activated with OTAA. But in case of questions, please create a separate topic :slight_smile:

emm, okay, thanks. :grin:

Hi, I seem to be having a similar issue. I’m using the US_902_928 band with ADR enabled on the network server and on my end nodes (mDot). My gateway and end nodes are configured for sub-band 1. However, after the LinkADRReq is received, the end node begins using FSB1 and FSB2 (16 channels) which causes 50% of the uplinks to fail.

If I set ENABLE_UPLINK_CHANNELS=0-7 then ADR attempts to disable all channels (all chMask values are false). The mDot rejects this with an error “[WARNING] Rejecting ADR command to disable all channels”.

So it seems the channel mask is either all or nothing. How can I use ADR with only 8 uplink channels?

Thank you!

I believe LoRa Server sends two maccommands. One to turn everything off, the other to turn on a selected set of channels. The device must handle this block of commands atomically (thus not turn everything off, then turn 0-7 on but every channel other than 0-7 off).