Changes for page End Device AT Commands and Downlink Command
Last modified by kai on 2024/09/06 10:00
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -10,7 +10,6 @@ 10 10 Dragino LoRaWAN End Node support two types of AT Commands and Downlink Commands: 11 11 12 12 * (% style="color:blue" %)**Common Commands:** (%%) They should be available for each sensor, such as: change uplink interval, reset device. 13 - 14 14 * (% style="color:blue" %)**Sensor Related Commands:** (%%) Only for special sensor, such as control relay, poll RS485 device. 15 15 16 16 ((( ... ... @@ -22,7 +22,6 @@ 22 22 23 23 24 24 * **AT Command** : See Devices User Manual for how to connect to device via USB TTL adapter and use. The user manual can be found in each product page of [[Dragino Official Website>>url:http://www.dragino.com/]] 25 - 26 26 * **LoRaWAN Downlink Command**: The gateway transfer downlink command in HEX format. This page shows the Downlink Command In HEX format. Please note some LoRaWAN servers use base64 as downlink code so user need to convert HEX to Base64 and use. Below are references for how to use downlink command: 27 27 ** Use HEX format to send a downlink: [[TTN v3>>Notes for TTN]] 28 28 ** Use Base64 format to send a downlink: [[Chirpstack>>Notes for ChirpStack]], [[How to Convert>>http://wiki.dragino.com/xwiki/bin/view/Main/Notes%20for%20ChirpStack/#H4.1ConvertHEXtoBase64]]? ... ... @@ -36,7 +36,13 @@ 36 36 Dragino STM32 base hardware Firmware / LoRaWAN stack list 37 37 38 38 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:966px" %) 39 -|(% style="background-color:#4f81bd; color:white; width:187px" %)**Model**|(% style="background-color:#4f81bd; color:white; width:330px" %)**Description**|(% style="background-color:#4f81bd; color:white; width:445px" %)**Firmware Version <~-~-> Stack Version** 37 +|(% style="background-color:#4f81bd; color:white; width:187px" %)((( 38 +**Model** 39 +)))|(% style="background-color:#4f81bd; color:white; width:330px" %)((( 40 +**Description** 41 +)))|(% style="background-color:#4f81bd; color:white; width:445px" %)((( 42 +**Firmware Version <~-~-> Stack Version** 43 +))) 40 40 |(% style="width:187px" %)((( 41 41 [[LSN50-v1>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/128-lsn50.html]], [[LSN50-V2>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/155-lsn50-v2.html]], 42 42 )))|(% style="width:330px" %)((( ... ... @@ -109,7 +109,7 @@ 109 109 110 110 (% style="color:blue" %)**AT Command: AT+TDC** 111 111 112 -(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:727.222px" %)116 +(% border="1" style="background-color:#f2f2f2; width:727.222px" %) 113 113 |(% style="background-color:#4f81bd; color:white; width:165px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:227px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:329px" %)**Response** 114 114 |(% style="width:165px" %)AT+TDC=?|(% style="width:227px" %)Show current transmit Interval|(% style="width:329px" %)30000((( 115 115 OK ... ... @@ -131,7 +131,6 @@ 131 131 ))) 132 132 133 133 * **Example 1**: Downlink Payload:** 0100001E** ~/~/ Set Transmit Interval (TDC) = 30 seconds 134 - 135 135 * **Example 2**: Downlink Payload:** 0100003C** ~/~/ Set Transmit Interval (TDC) = 60 seconds 136 136 137 137 (% style="display:none" %) (%%) ... ... @@ -144,7 +144,7 @@ 144 144 145 145 (% style="color:blue" %)**AT Command: ATZ ~/~/ **(%%)Trig a reset of the MCU 146 146 147 -(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:546px" %)150 +(% border="1" style="background-color:#f2f2f2; width:546px" %) 148 148 |(% style="background-color:#4f81bd; color:white; width:157px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:92px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:294px" %)**Response** 149 149 |(% style="width:157px" %)ATZ|(% style="width:92px" %)Reset MCU|(% style="width:294px" %)((( 150 150 Device reset and show booting info ... ... @@ -179,7 +179,7 @@ 179 179 180 180 (% style="color:blue" %)**AT Command: AT+FDR ~/~/ **(%%)Reset to factory default 181 181 182 -(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:789px" %)185 +(% border="1" style="background-color:#f2f2f2; width:789px" %) 183 183 |(% style="background-color:#4f81bd; color:white; width:154px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:175px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:456px" %)**Response** 184 184 |(% style="width:154px" %)AT+FDR|(% style="width:175px" %)Reset to factory default|(% style="width:456px" %)((( 185 185 Device reset to factory default parameters and show booting info ... ... @@ -214,7 +214,7 @@ 214 214 215 215 (% style="color:blue" %)**AT Command: AT+VER ~/~/ **(%%)Image Version and Frequency Band 216 216 217 -(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:542px" %)220 +(% border="1" style="background-color:#f2f2f2; width:542px" %) 218 218 |(% style="background-color:#4f81bd; color:white; width:157px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:295px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:86px" %)**Response** 219 219 |(% style="width:157px" %)AT+VER=?|(% style="width:295px" %)Show Image version and Frequency Band|(% style="width:86px" %)((( 220 220 1.3 EU868 ... ... @@ -276,7 +276,7 @@ 276 276 277 277 (% style="color:blue" %)**AT Command: AT+CFG ~/~/ **(%%)Print all configurations 278 278 279 -(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:599.222px" %)282 +(% border="1" style="background-color:#f2f2f2; width:599.222px" %) 280 280 |(% style="background-color:#4f81bd; color:white; width:160px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:154px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:280px" %)**Response** 281 281 |(% style="width:160px" %)AT+CFG|(% style="width:154px" %)Show all configures|(% style="width:280px" %)((( 282 282 AT+DEUI = XX XX XX XX XX XX XX XX ... ... @@ -299,12 +299,12 @@ 299 299 300 300 (% style="color:blue" %)**AT Command: AT+APPEUI** 301 301 302 -(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:643px" %)303 -|(% style="background-color:#4f81bd; color:white; width: 272px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:182px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:184px" %)**Response**304 -|(% style="width: 272px" %)AT+APPEUI=?|(% style="width:182px" %)Get the Application EUI|(% style="width:184px" %)00 b3 d5 00 00 00 00 00(((305 +(% border="1" style="background-color:#f2f2f2; width:686.222px" %) 306 +|(% style="background-color:#4f81bd; color:white; width:305px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:186px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:191px" %)**Response** 307 +|(% style="width:305px" %)AT+APPEUI=?|(% style="width:186px" %)Get the Application EUI|(% style="width:191px" %)00 b3 d5 00 00 00 00 00((( 305 305 OK 306 306 ))) 307 -|(% style="width: 272px" %)AT+APPEUI=00 b3 d5 7e f0 00 4d 34|(% style="width:182px" %)Set the Application EUI|(% style="width:184px" %)OK310 +|(% style="width:305px" %)AT+APPEUI=00 b3 d5 7e f0 00 4d 34|(% style="width:186px" %)Set the Application EUI|(% style="width:191px" %)OK 308 308 309 309 (% style="display:none" %) (%%) 310 310 ... ... @@ -316,7 +316,7 @@ 316 316 317 317 (% style="color:blue" %)**AT Command: AT+APPKEY** 318 318 319 -(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:976.222px" %)322 +(% border="1" style="background-color:#f2f2f2; width:976.222px" %) 320 320 |(% style="background-color:#4f81bd; color:white; width:441px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:180px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:350px" %)**Response** 321 321 |(% style="width:441px" %)AT+APPKEY=?|(% style="width:180px" %)Get the Application Key|(% style="width:350px" %)00 35 55 55 22 23 55 53 43 24 23 42 34 35 35 35((( 322 322 OK ... ... @@ -333,7 +333,7 @@ 333 333 334 334 (% style="color:blue" %)**AT Command: AT+APPSKEY** 335 335 336 -(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:1040.22px" %)339 +(% border="1" style="background-color:#f2f2f2; width:1040.22px" %) 337 337 |(% style="background-color:#4f81bd; color:white; width:451px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:231px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:354px" %)**Response** 338 338 |(% style="width:451px" %)AT+APPSKEY=?|(% style="width:231px" %)Get the Application Session Key|(% style="width:354px" %)00 7d dc 73 33 d3 eb 9e 14 38 d5 a4 3e 62 5b e2((( 339 339 OK ... ... @@ -352,7 +352,7 @@ 352 352 353 353 (% style="color:blue" %)**AT Command: AT+DADDR** 354 354 355 -(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:795.222px" %)358 +(% border="1" style="background-color:#f2f2f2; width:795.222px" %) 356 356 |(% style="background-color:#4f81bd; color:white; width:192px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:241px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:359px" %)**Response** 357 357 |(% style="width:192px" %)AT+DADDR=?|(% style="width:241px" %)Get the Application Session Key.|(% style="width:359px" %)(While Error in format, return AT_PARAM_ERROR)((( 358 358 A8 40 41 FF ... ... @@ -371,7 +371,7 @@ 371 371 372 372 (% style="color:blue" %)**AT Command: AT+DEUI** 373 373 374 -(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:1035.22px" %)377 +(% border="1" style="background-color:#f2f2f2; width:1035.22px" %) 375 375 |(% style="background-color:#4f81bd; color:white; width:250px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:147px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:634px" %)**Response** 376 376 |(% style="width:250px" %)AT+DEUI=?|(% style="width:147px" %)Get the Device EUI.|(% style="width:634px" %)00 44 34 22 33 45 55 55((( 377 377 OK ... ... @@ -390,7 +390,7 @@ 390 390 391 391 (% style="color:blue" %)**AT Command: AT+NWKID** 392 392 393 -(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:448.222px" %)396 +(% border="1" style="background-color:#f2f2f2; width:448.222px" %) 394 394 |(% style="background-color:#4f81bd; color:white; width:191px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:153px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:101px" %)**Response** 395 395 |(% style="width:191px" %)AT+NWKID=?|(% style="width:153px" %)Get the Network ID.|(% style="width:101px" %)a8 40 41 ff((( 396 396 OK ... ... @@ -407,7 +407,7 @@ 407 407 408 408 (% style="color:blue" %)**AT Command: AT+NWKSKEY** 409 409 410 -(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:1017.22px" %)413 +(% border="1" style="background-color:#f2f2f2; width:1017.22px" %) 411 411 |(% style="background-color:#4f81bd; color:white; width:455px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:215px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:343px" %)**Response** 412 412 |(% style="width:455px" %)AT+NWKSKEY=?|(% style="width:215px" %)Get the Network Session Key.|(% style="width:343px" %)00 4f 19 25 52 ce 97 09 d7 fa 84 71 db 51 02 92((( 413 413 OK ... ... @@ -428,7 +428,7 @@ 428 428 429 429 (% style="color:blue" %)**AT Command: AT+CFM** 430 430 431 -(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:710.222px" %)434 +(% border="1" style="background-color:#f2f2f2; width:710.222px" %) 432 432 |(% style="background-color:#4f81bd; color:white; width:155px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:205px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:346px" %)**Response** 433 433 |(% style="width:155px" %)AT+CFM=?|(% style="width:205px" %)Get the confirmation mode|(% style="width:346px" %)0((( 434 434 OK ... ... @@ -443,7 +443,6 @@ 443 443 If the downlink payload=0501, it means set end node to use confirm mode, while type code is 05. 444 444 445 445 * **Example 1:** Downlink Payload: 0501 ~/~/ Set AT+CFM=1 446 - 447 447 * **Example 2:** Downlink Payload: 0500 ~/~/ Set AT+CFM=0 448 448 449 449 (% style="display:none" %) (%%) ... ... @@ -490,7 +490,6 @@ 490 490 If the downlink payload=05010101, it means set end node to use confirm mode, while type code is 05. 491 491 492 492 * **Example 1:** Downlink Payload: 05010101 ~/~/ Set AT+CFM=1,1,1 493 - 494 494 * **Example 2:** Downlink Payload: 05000700 ~/~/ Set AT+CFM=0,7,0 495 495 496 496 (% style="display:none" %) (%%) ... ... @@ -551,7 +551,6 @@ 551 551 If the downlink payload=2000, it means set the Network Join Mode, while type code is 20. 552 552 553 553 * **Example 1: **Downlink Payload: **2000 ** ~/~/ Set AT+NJM=0 554 - 555 555 * **Example 2:** Downlink Payload: **2001** ~/~/ Set AT+NJM=1 556 556 557 557 (% style="display:none" %) (%%) ... ... @@ -663,7 +663,6 @@ 663 663 If the downlink payload=2201, it means setting the adaptive data rate to 1, while type code is 22. 664 664 665 665 * **Example 1**: Downlink Payload: **2201** ~/~/ Set AT+ADR=1. 666 - 667 667 * **Example 2**: Downlink Payload: **2200FFFF** ~/~/ Set AT+ADR=0. 668 668 669 669 (% style="display:none" %) (%%) ... ... @@ -720,7 +720,6 @@ 720 720 **Notice:** 721 721 722 722 * User need to set Adaptive Data Rate(ADR)=0 first. otherwise device will respond to server's ADR command and change the DR according to server auto-adjustment. 723 - 724 724 * Data Rate specifies Spreading Factor. The mapping varies in different frequency bands. User can check this link for detail. [[rp2-1.0.3-lorawan-regional-parameters.pdf>>https://lora-alliance.org/resource_hub/rp2-1-0-3-lorawan-regional-parameters/]] 725 725 726 726 (% style="color:blue" %)**AT Command: AT+DR** ... ... @@ -739,7 +739,6 @@ 739 739 If the downlink payload=220001FF, it means setting the data rate to 1, while type code is 22 00 aa FF. 740 740 741 741 * **Example 1**: Downlink Payload: **220001FF** ~/~/ Set AT+DR=1. 742 - 743 743 * **Example 2**: Downlink Payload: **220000FF** ~/~/ Set AT+DR=0. 744 744 745 745 (% style="display:none" %) (%%) ... ... @@ -947,7 +947,6 @@ 947 947 If the downlink payload=22000100, it means setting the TXP to 0. 948 948 949 949 * **Example 1**: Downlink Payload: **22000102** ~/~/ Set AT+TXP=2. 950 - 951 951 * **Example 2**: Downlink Payload: **22000000** ~/~/ Set AT+TXP=0. 952 952 953 953 (% style="display:none" %) (%%) ... ... @@ -1006,7 +1006,6 @@ 1006 1006 If the downlink payload=2301, it means set the application port to 1, while type code is 23. 1007 1007 1008 1008 * **Example 1**: Downlink Payload: **2301** ~/~/ set the application port to 1 1009 - 1010 1010 * **Example 2**: Downlink Payload:** 2305** ~/~/ set the application port to 5 1011 1011 1012 1012 (% style="display:none" %) (%%) ... ... @@ -1052,7 +1052,6 @@ 1052 1052 If the downlink payload=2401, it means set channel mode to 1, while type code is 24. 1053 1053 1054 1054 * **Example 1**: Downlink Payload: 2401 ~/~/ set channel mode to 1 1055 - 1056 1056 * **Example 2**: Downlink Payload: 2405 ~/~/ set channel mode to 5 1057 1057 1058 1058 (% style="display:none" %) (%%) ... ... @@ -1124,7 +1124,6 @@ 1124 1124 If the downlink payload=2501, it means set uplinkdwelltime to 1, while type code is 25. 1125 1125 1126 1126 * **Example 1**: Downlink Payload: **2501** ~/~/ set uplinkdwelltime to 1 1127 - 1128 1128 * **Example 2**: Downlink Payload: **2500** ~/~/ set uplinkdwelltime to 0 1129 1129 1130 1130 (% style="display:none" %) (%%) ... ... @@ -1138,21 +1138,15 @@ 1138 1138 (% style="color:blue" %)**RPL value:** 1139 1139 1140 1140 * **AT+RPL=0:** Device won't immediately reply any downlink commands from platform. 1141 - 1142 1142 * **AT+RPL=1:** Device will immediately reply message to Unconfirmed Data Down. Payload is 0x00. 1143 - 1144 1144 * **AT+RPL=2:** Device will immediately reply message to Confirmed Data Down. Payload is 0x00 and requied response header for this command. 1145 - 1146 1146 * **AT+RPL=3:** Device will immediately reply message to MAC Command. Payload is 0x00 and requied response header for this command. 1147 - 1148 1148 * **AT+RPL=4: **Device will immediately reply message to Confirmed Data Down & MAC Command. Payload is 0x00 and requied response header for these two commands. 1149 1149 1150 1150 (% style="color:blue" %)**Case Analyes:** 1151 1151 1152 1152 * For Class A devices, AT+RPL=0 is ok. that is defaut settings in software. 1153 - 1154 1154 * For Class C devices used in ChirpStack, need to set AT+RPL=4 because Chirpstack require immedietely reply message to MAC Command. 1155 - 1156 1156 * For Class C devices used in TTI, need to set AT+RPL=4 because TTI require immediately reply message to Confirmed Data Down & MAC Command. 1157 1157 1158 1158 (% style="color:blue" %)**AT Command: AT+RPL** ... ... @@ -1171,7 +1171,6 @@ 1171 1171 If the downlink payload=2101, it means set packet receiving response level to 1, while type code is 21. 1172 1172 1173 1173 * **Example 1**: Downlink Payload: **2101** ~/~/ set packet receiving response level to 1 1174 - 1175 1175 * **Example 2**: Downlink Payload: **2102** ~/~/ set packet receiving response level to 2 1176 1176 1177 1177 (% style="display:none" %) (%%) ... ... @@ -1203,7 +1203,6 @@ 1203 1203 If the downlink payload=330100, it means set end node to use confirm mode, while type code is 33. 1204 1204 1205 1205 * Example 1: Downlink Payload: 330100 ~/~/ Set AT+SETMAXNBTRANS=1,0 1206 - 1207 1207 * Example 2: Downlink Payload: 330201 ~/~/ Set AT+SETMAXNBTRANS=2,1 1208 1208 1209 1209 (% style="display:none" %) (%%) ... ... @@ -1255,8 +1255,6 @@ 1255 1255 If the downlink payload=320105A00B40, it means set end node to use confirm mode, while type code is 32. 1256 1256 1257 1257 * **Example 1:** Downlink Payload: 320105A00B40 ~/~/ Set AT+DDETECT=1,1440,2880 1258 - 1259 -* 1260 1260 ** 0x01 : Flag 1261 1261 ** 0x05A0: ACK_Timout_1 : 1440minutes (24 hours) 1262 1262 ** 0x0B40: ACK_Timout_2 : 2880minutes (48 hours) ... ... @@ -1304,7 +1304,6 @@ 1304 1304 If the downlink payload=26000A, it means set end node to use confirm mode, while type code is 26. 1305 1305 1306 1306 * **Example 1:** Downlink Payload: 26000A ~/~/ Set AT+RJTDC=10 1307 - 1308 1308 * **Example 2: **Downlink Payload: 260002 ~/~/ Set AT+RJTDC=2 1309 1309 1310 1310 (% style="display:none" %) (%%)