Enabling ADR on the mdot and conduit issue!
Tagged: adr, AEP Conduit, mDot
- This topic has 10 replies, 3 voices, and was last updated 8 years, 1 month ago by
Mike Fiore.
-
AuthorPosts
-
March 1, 2017 at 1:27 pm #17594
Ajay K
ParticipantI have enabled ADR on mdot using the API call m_dot->setAdr(true), and on the AEP model Conduit I have just used the default setting for the ADR. I am using the MTAC-LORA-915 card on the conduit. Is there anything else I need to do to support ADR?
1) The reason I ask, is that my mdot and conduit are just a few feet away and at this range, shouldn’t it be allowing me to send a payload at the max data rate allowed for US915 frequencies and not just 11 bytes which is least data rate and if I am guessing right is the SF_10 spread factor?
2) Also should I be setting any default data rate, even though I have setup ADR, such as the least TxDataRate in US is SF_10 spread factor?
3) I have set the transmission power to max allowable transmission power of 20dbm on the mdot.
4) Is there any conduit settings/mdot settings that I am missing, that I should enable in addition to the default settings for ADR?
Thanks,
AjayMarch 1, 2017 at 1:33 pm #17595Mike Fiore
BlockedAjay,
Enabling ADR on both sides should be all you need to do.
See the ADR section on the page below:
The gateway must RX enough packets to get a good sample before it will request the end device make any changes to TX datarate or power.
You can find more info about ADR in the LoRaWan specification.
Cheers,
MikeMarch 1, 2017 at 1:46 pm #17596Leon Lindenfelser
ModeratorHi Ajay,
One other thing to keep in mind as you are testing… With the mDot and Conduit in close proximity, the signal may be too large for the receivers causing signal degradation. If they are a couple feet away, you can remove one or both antennas.
Kind regards,
LeonMarch 1, 2017 at 2:09 pm #17597Ajay K
ParticipantHi Leon,
Thanks for your response. I will remove the antenna’s and try testing it.
I send a heartbeat packet every minute to the conduit and so there should have been enough packets exchanged for the determination to be made. I am guessing it uses the uplink packets to determine what data rate to operate in correct? As there are very few downlink packets being transmitted.However one of the other questions I had should be setting any default data rate at all even though the ADR is enabled on the mdot? Currently I am setting a data rate of SF_10 assuming the longest range when I initialize the LORA network settings in the mdot, is that step even necessary?
Thanks,
AjayMarch 1, 2017 at 3:13 pm #17603Mike Fiore
BlockedAjay,
Yes, the uplink packets (dot->gateway) are what are used in the ADR algorithm.
It is better to set your initial datarate to something you know will work based on the placement of the device and the gateway. Then ADR can change it to the most efficient setting from there.
Cheers,
MikeMarch 1, 2017 at 3:55 pm #17616Ajay K
ParticipantHi Mike/Leon,
I removed the antenna first on the mdot and then I removed it on the conduit as well. But no matter what, the data rate stays at dr0 (SF_10) and I have it running for about 30 minutes now and that would mean I have sent close to 30 uplink packets and the data rate remained at SF_10, which I am guessing DR0. I have captured both the node-red input nodes message object to see what the RSSI and lsnr values in the debug o/p and also the debug/trace information from the mdot.
Also Is there a minimum distance between the conduit and the mdot that would help the ADR feature to be tested better. Let me know if you would like me to provide any other data point that will help you resolve this?
debug o/p from the node-red LORA input node, just a few off them, I have captured it for almost 30 minutes.
[msg] : object { "chan": 0, "cls": 0, "codr": "4/5", "datr": "SF10BW125", "freq": "907.1", "lsnr": "-7.2", "mhdr": "8002000000000800", "modu": "LORA", "opts": "", "port": 1, "rfch": 0, "rssi": -116, "seqn": 8, "size": 4, "timestamp": "2017-03-01T21:30:12.083536Z", "tmst": 611201364, "payload": [ 116 ], "eui": "00-80-00-00-00-00-cf-72", "_msgid": "4887831.fb7787c" } 3/1/2017 12:57:36 PM[feb26526.71c398] [msg] : object { "chan": 1, "cls": 0, "codr": "4/5", "datr": "SF10BW125", "freq": "907.3", "lsnr": "-6.2", "mhdr": "8002000000000900", "modu": "LORA", "opts": "", "port": 1, "rfch": 0, "rssi": -116, "seqn": 9, "size": 4, "timestamp": "2017-03-01T21:31:16.421838Z", "tmst": 675537036, "payload": [ 116 ], "eui": "00-80-00-00-00-00-cf-72", "_msgid": "c4c68899.3b3978" } 3/1/2017 12:58:40 PM[feb26526.71c398] [msg] : object { "chan": 7, "cls": 0, "codr": "4/5", "datr": "SF10BW125", "freq": "908.5", "lsnr": "-3.8", "mhdr": "8002000000000a00", "modu": "LORA", "opts": "", "port": 1, "rfch": 1, "rssi": -117, "seqn": 10, "size": 4, "timestamp": "2017-03-01T21:32:20.762888Z", "tmst": 739872716, "payload": [ 116 ], "eui": "00-80-00-00-00-00-cf-72", "_msgid": "645fe2c4.9ba01c" } 3/1/2017 12:59:45 PM[feb26526.71c398] [msg] : object { "chan": 7, "cls": 0, "codr": "4/5", "datr": "SF10BW125", "freq": "908.5", "lsnr": "-6.8", "mhdr": "8002000000000b00", "modu": "LORA", "opts": "", "port": 1, "rfch": 1, "rssi": -118, "seqn": 11, "size": 4, "timestamp": "2017-03-01T21:33:25.084493Z", "tmst": 804208364, "payload": [ 116 ], "eui": "00-80-00-00-00-00-cf-72", "_msgid": "92a3b4d4.6d5c48" } 3/1/2017 1:00:49 PM[feb26526.71c398]
Debug o/p coming from the mdot, a few of the packets.
3/1/2017 12:57:35 PM: [TRACE] Generating Heart Beat Packet.... 3/1/2017 12:57:35 PM: [TRACE] Queueing Heart Beat Packet.... 3/1/2017 12:57:35 PM: [TRACE] Max Packet Frame Length: 11 3/1/2017 12:57:35 PM: [DEBUG] Check if connected to the network..... 3/1/2017 12:57:35 PM: [DEBUG] Sending LORA Packets. 3/1/2017 12:57:35 PM: [DEBUG] Send with tx timeout 5000 3/1/2017 12:57:35 PM: [INFO] Preparing frame 3/1/2017 12:57:35 PM: [TRACE] NA: 00000002 3/1/2017 12:57:35 PM: [TRACE] NSK: 0cbd3d8d907fd27a9349e1522d36c53a 3/1/2017 12:57:35 PM: [TRACE] DSK: f9b7392fb4b6f2574c3d23db347a0109 3/1/2017 12:57:35 PM: [TRACE] Adding MIC to frame 3/1/2017 12:57:35 PM: [TRACE] Sending 14 bytes 3/1/2017 12:57:35 PM: [TRACE] Number of available channels: 8 3/1/2017 12:57:35 PM: [DEBUG] Using channel 24 : 907100000 3/1/2017 12:57:35 PM: [INFO] Configure radio for TX 3/1/2017 12:57:35 PM: [DEBUG] Session pwr: 20 ant: 3 max: 21 3/1/2017 12:57:35 PM: [DEBUG] Radio Power index: 20 output: 19 total: 22 3/1/2017 12:57:35 PM: [DEBUG] TX PWR: 20 DR: 0 SF: 10 BW: 0 CR: 1 PL: 8 CRC: 1 IQ: 0 3/1/2017 12:57:35 PM: [INFO] Configure radio for TX 3/1/2017 12:57:35 PM: [DEBUG] Session pwr: 20 ant: 3 max: 21 3/1/2017 12:57:35 PM: [DEBUG] Radio Power index: 20 output: 19 total: 22 3/1/2017 12:57:35 PM: [DEBUG] TX PWR: 20 DR: 0 SF: 10 BW: 0 CR: 1 PL: 8 CRC: 1 IQ: 0 3/1/2017 12:57:35 PM: [DEBUG] mDotEvent - TxDone 3/1/2017 12:57:35 PM: [TRACE] Event: OK 3/1/2017 12:57:35 PM: [TRACE] Flags Tx: 1 Rx: 0 RxData: 0 RxSlot: 0 LinkCheck: 0 JoinAccept: 0 3/1/2017 12:57:35 PM: [TRACE] Info: Status: 0 ACK: 0 Retries: 0 TxDR: 0 RxPort: 0 RxSize: 0 RSSI: 0 SNR: 0 Energy: 0 Margin: 0 Gateways: 0 3/1/2017 12:57:36 PM: [TRACE] RX1 on freq: 925100000 3/1/2017 12:57:36 PM: [TRACE] RX DR: 10 SF: 10 BW: 2 CR: 1 PL: 8 STO: 12 CRC: 1 IQ: 1 3/1/2017 12:57:36 PM: [TRACE] Stats: Up: 10 Down: 9 DupTx: 0 CRC Errors: 0 3/1/2017 12:57:36 PM: [INFO] Rx Window 1 3/1/2017 12:57:36 PM: [INFO] RxDone 12 bytes RSSI: -116 dB SNR: -20 cB 3/1/2017 12:57:36 PM: [TRACE] Payload: 600200000020080026de82af 3/1/2017 12:57:36 PM: [INFO] Packet for 00000002 3/1/2017 12:57:36 PM: [TRACE] Check downlink counter 00000008 3/1/2017 12:57:36 PM: [TRACE] Ack received 3/1/2017 12:57:36 PM: [TRACE] Empty payload 3/1/2017 12:57:36 PM: [INFO] Packet Received : Port: 0 FCnt: 00000008 Size: 0 ACK: 1 DUP: 0 3/1/2017 12:57:36 PM: [DEBUG] mDotEvent - PacketRx 3/1/2017 12:57:36 PM: [TRACE] Payload: 3/1/2017 12:57:36 PM: [TRACE] Event: OK 3/1/2017 12:57:36 PM: [TRACE] Flags Tx: 0 Rx: 1 RxData: 0 RxSlot: 1 LinkCheck: 0 JoinAccept: 0 3/1/2017 12:57:36 PM: [TRACE] Info: Status: 0 ACK: 1 Retries: 0 TxDR: 0 RxPort: 0 RxSize: 0 RSSI: -116 SNR: 236 Energy: 0 Margin: 0 Gateways: 0 3/1/2017 12:57:36 PM: [DEBUG] Rx 0 bytes 3/1/2017 12:57:36 PM: [INFO] Packet RSSI: -116 dB SNR: -20 cB 3/1/2017 12:57:36 PM: [DEBUG] mDotEvent - RxDone 3/1/2017 12:57:36 PM: [TRACE] successfully sent data to gateway 3/1/2017 12:57:36 PM: [DEBUG] Uplink Transmission Complete.... 3/1/2017 12:57:36 PM: [INFO] RxDone 12 bytes RSSI: -116 dB SNR: -20 cB 3/1/2017 12:57:36 PM: [TRACE] Payload: 600200000020080026de82af 3/1/2017 12:57:36 PM: [INFO] Packet for 00000002 3/1/2017 12:57:36 PM: [TRACE] Check downlink counter 00000008 3/1/2017 12:57:36 PM: [TRACE] Ack received 3/1/2017 12:57:36 PM: [TRACE] Empty payload 3/1/2017 12:57:36 PM: [INFO] Packet Received : Port: 0 FCnt: 00000008 Size: 0 ACK: 1 DUP: 0 3/1/2017 12:57:36 PM: [DEBUG] mDotEvent - PacketRx 3/1/2017 12:57:36 PM: [TRACE] Payload: 3/1/2017 12:57:36 PM: [TRACE] Event: OK 3/1/2017 12:57:36 PM: [TRACE] Flags Tx: 0 Rx: 1 RxData: 0 RxSlot: 1 LinkCheck: 0 JoinAccept: 0 3/1/2017 12:57:36 PM: [TRACE] Info: Status: 0 ACK: 1 Retries: 0 TxDR: 0 RxPort: 0 RxSize: 0 RSSI: -116 SNR: 236 Energy: 0 Margin: 0 Gateways: 0 3/1/2017 12:57:36 PM: [DEBUG] Rx 0 bytes 3/1/2017 12:57:36 PM: [INFO] Packet RSSI: -116 dB SNR: -20 cB 3/1/2017 12:57:36 PM: [DEBUG] mDotEvent - RxDone 3/1/2017 12:57:36 PM: [TRACE] successfully sent data to gateway 3/1/2017 12:57:36 PM: [DEBUG] Uplink Transmission Complete.... 3/1/2017 12:57:34 PM: [TRACE] configuring RTC Alarm A to wakeup 60 seconds from now??[DEBUG] Session restored from flash 3/1/2017 12:57:35 PM: [TRACE] Generating Heart Beat Packet.... 3/1/2017 12:57:35 PM: [TRACE] Queueing Heart Beat Packet.... 3/1/2017 12:57:35 PM: [TRACE] Max Packet Frame Length: 11 3/1/2017 12:57:35 PM: [DEBUG] Check if connected to the network..... 3/1/2017 12:57:35 PM: [DEBUG] Sending LORA Packets. 3/1/2017 12:57:35 PM: [DEBUG] Send with tx timeout 5000 3/1/2017 12:57:35 PM: [INFO] Preparing frame 3/1/2017 12:57:35 PM: [TRACE] NA: 00000002 3/1/2017 12:57:35 PM: [TRACE] NSK: 0cbd3d8d907fd27a9349e1522d36c53a 3/1/2017 12:57:35 PM: [TRACE] DSK: f9b7392fb4b6f2574c3d23db347a0109 3/1/2017 12:57:35 PM: [TRACE] Adding MIC to frame 3/1/2017 12:57:35 PM: [TRACE] Sending 14 bytes 3/1/2017 12:57:35 PM: [TRACE] Number of available channels: 8 3/1/2017 12:57:35 PM: [DEBUG] Using channel 24 : 907100000 3/1/2017 12:57:35 PM: [INFO] Configure radio for TX 3/1/2017 12:57:35 PM: [DEBUG] Session pwr: 20 ant: 3 max: 21 3/1/2017 12:57:35 PM: [DEBUG] Radio Power index: 20 output: 19 total: 22 3/1/2017 12:57:35 PM: [DEBUG] TX PWR: 20 DR: 0 SF: 10 BW: 0 CR: 1 PL: 8 CRC: 1 IQ: 0 3/1/2017 12:57:35 PM: [INFO] Configure radio for TX 3/1/2017 12:57:35 PM: [DEBUG] Session pwr: 20 ant: 3 max: 21 3/1/2017 12:57:35 PM: [DEBUG] Radio Power index: 20 output: 19 total: 22 3/1/2017 12:57:35 PM: [DEBUG] TX PWR: 20 DR: 0 SF: 10 BW: 0 CR: 1 PL: 8 CRC: 1 IQ: 0 3/1/2017 12:57:35 PM: [DEBUG] mDotEvent - TxDone 3/1/2017 12:57:35 PM: [TRACE] Event: OK 3/1/2017 12:57:35 PM: [TRACE] Flags Tx: 1 Rx: 0 RxData: 0 RxSlot: 0 LinkCheck: 0 JoinAccept: 0 3/1/2017 12:57:35 PM: [TRACE] Info: Status: 0 ACK: 0 Retries: 0 TxDR: 0 RxPort: 0 RxSize: 0 RSSI: 0 SNR: 0 Energy: 0 Margin: 0 Gateways: 0 3/1/2017 12:57:36 PM: [TRACE] RX1 on freq: 925100000 3/1/2017 12:57:36 PM: [TRACE] RX DR: 10 SF: 10 BW: 2 CR: 1 PL: 8 STO: 12 CRC: 1 IQ: 1 3/1/2017 12:57:36 PM: [TRACE] Stats: Up: 10 Down: 9 DupTx: 0 CRC Errors: 0 3/1/2017 12:57:36 PM: [INFO] Rx Window 1 3/1/2017 12:57:36 PM: [INFO] RxDone 12 bytes RSSI: -116 dB SNR: -20 cB 3/1/2017 12:57:36 PM: [TRACE] Payload: 600200000020080026de82af 3/1/2017 12:57:36 PM: [INFO] Packet for 00000002 3/1/2017 12:57:36 PM: [TRACE] Check downlink counter 00000008 3/1/2017 12:57:36 PM: [TRACE] Ack received 3/1/2017 12:57:36 PM: [TRACE] Empty payload 3/1/2017 12:57:36 PM: [INFO] Packet Received : Port: 0 FCnt: 00000008 Size: 0 ACK: 1 DUP: 0 3/1/2017 12:57:36 PM: [DEBUG] mDotEvent - PacketRx 3/1/2017 12:57:36 PM: [TRACE] Payload: 3/1/2017 12:57:36 PM: [TRACE] Event: OK 3/1/2017 12:57:36 PM: [TRACE] Flags Tx: 0 Rx: 1 RxData: 0 RxSlot: 1 LinkCheck: 0 JoinAccept: 0 3/1/2017 12:57:36 PM: [TRACE] Info: Status: 0 ACK: 1 Retries: 0 TxDR: 0 RxPort: 0 RxSize: 0 RSSI: -116 SNR: 236 Energy: 0 Margin: 0 Gateways: 0 3/1/2017 12:57:36 PM: [DEBUG] Rx 0 bytes 3/1/2017 12:57:36 PM: [INFO] Packet RSSI: -116 dB SNR: -20 cB 3/1/2017 12:57:36 PM: [DEBUG] mDotEvent - RxDone 3/1/2017 12:57:36 PM: [TRACE] successfully sent data to gateway 3/1/2017 12:57:36 PM: [DEBUG] Uplink Transmission Complete.... 3/1/2017 12:57:36 PM: [INFO] RxDone 12 bytes RSSI: -116 dB SNR: -20 cB 3/1/2017 12:57:36 PM: [TRACE] Payload: 600200000020080026de82af 3/1/2017 12:57:36 PM: [INFO] Packet for 00000002 3/1/2017 12:57:36 PM: [TRACE] Check downlink counter 00000008 3/1/2017 12:57:36 PM: [TRACE] Ack received 3/1/2017 12:57:36 PM: [TRACE] Empty payload 3/1/2017 12:57:36 PM: [INFO] Packet Received : Port: 0 FCnt: 00000008 Size: 0 ACK: 1 DUP: 0 3/1/2017 12:57:36 PM: [DEBUG] mDotEvent - PacketRx 3/1/2017 12:57:36 PM: [TRACE] Payload: 3/1/2017 12:57:36 PM: [TRACE] Event: OK 3/1/2017 12:57:36 PM: [TRACE] Flags Tx: 0 Rx: 1 RxData: 0 RxSlot: 1 LinkCheck: 0 JoinAccept: 0 3/1/2017 12:57:36 PM: [TRACE] Info: Status: 0 ACK: 1 Retries: 0 TxDR: 0 RxPort: 0 RxSize: 0 RSSI: -116 SNR: 236 Energy: 0 Margin: 0 Gateways: 0 3/1/2017 12:57:36 PM: [DEBUG] Rx 0 bytes 3/1/2017 12:57:36 PM: [INFO] Packet RSSI: -116 dB SNR: -20 cB 3/1/2017 12:57:36 PM: [DEBUG] mDotEvent - RxDone 3/1/2017 12:57:36 PM: [TRACE] successfully sent data to gateway 3/1/2017 12:57:36 PM: [DEBUG] Uplink Transmission Complete.... 3/1/2017 12:57:36 PM: |74| 3/1/2017 12:57:37 PM: [WARNING] This mDot hardware version does not support deep sleep... using sleep.
Thanks,
AjayMarch 2, 2017 at 9:20 am #17624Mike Fiore
BlockedAjay,
Based on the packets your GW is receiving, your endpoint isn’t requesting ADR.
The snippet “mhdr”: “8002000000000800” is actually the MAC header and Frame header from the packet. The MAC header is the first byte and the Frame header is the next 7 bytes. I’ve dissected below:
MAC header Device Address Frame Control Uplink Counter
80 02000000 00 0800If your endpoint had ADR enabled, the Frame Control byte would be 80 instead of 00.
Also, with lsnr in the -6/-7 range and rssi in the -115 range, I don’t think the gateway would increase the datarate anyway.
Hope this helps!
Cheers,
MikeMarch 2, 2017 at 12:10 pm #17628Ajay K
ParticipantHi Mike,
Thanks of your response. I am guessing is this happening because i am using AUTO_OTA mode and whatever I had configured earlier in terms of network settings, is saved in the flash and now that my previous settings have not changed, I am probably not even calling the piece of code below.
m_dot->setAdr(true)
Thanks Mike for confirming that the ADR is not being set to begin with in the mdot. I am guessing if I use the code below all the previous session and network information will be removed from the flash?
m_dot->resetConfig(); m_dot->resetNetworkSession();
Thanks,
Ajay-
This reply was modified 8 years, 1 month ago by
Ajay K.
March 2, 2017 at 12:25 pm #17631Mike Fiore
BlockedAjay,
ADR is independent of the join mode you’re using. It will work for MANUAL, OTA, or AUTO_OTA.
Whether or not ADR is enabled is stored in the configuration, and the default is to have ADR disabled. Calling mDot::resetConfig() will disable ADR.
Cheers,
MikeMarch 2, 2017 at 3:46 pm #17636Ajay K
ParticipantThanks Mike it works now. I just had to reset my Config and called the setAdr at the right place in the code and works well right now. Thanks for breaking up the Mac Header and frame details, that helped me to validate the ADR was enabled.
Thanks,
Ajay.March 2, 2017 at 3:54 pm #17638Mike Fiore
BlockedAjay,
Glad everything is straightened out!
Cheers,
Mike -
This reply was modified 8 years, 1 month ago by
-
AuthorPosts
- You must be logged in to reply to this topic.