Changes for page End Device AT Commands and Downlink Command
Last modified by kai on 2024/09/06 10:00
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -14,7 +14,6 @@ 14 14 15 15 ((( 16 16 **This page shows the common commands since Dragino LoRaWAN stack DR-LWS-005. Make sure the end node support stack higher than DR-LWS-005 before checking this page.** 17 - 18 18 19 19 20 20 ))) ... ... @@ -22,14 +22,13 @@ 22 22 = 2. How to use AT Commands or Downlink command = 23 23 24 24 25 -* ForAT Command,See Devices User Manual forDevice. The user manual can be found in each product page of [[Dragino Official Website>>url:http://www.dragino.com/]]26 -* ForLoRaWAN Downlink: The gateway transfer downlink command in HEX format. This page shows theHEX format downlinkcodefor eachcommand. but some servers use base64 as downlink code. Below are reference for how to use downlink command: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 +* **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]]? 29 29 ** See use note for more serves [[Servers Note>>doc:Main.WebHome]](IoT LoRaWAN Server) 30 30 31 31 32 - 33 33 = 3. Support End Node and firmware version = 34 34 35 35 ... ... @@ -105,7 +105,6 @@ 105 105 ))) 106 106 107 107 108 - 109 109 = 4. System Management Commands = 110 110 111 111 == 4.1 Change Uplink Interval == ... ... @@ -144,7 +144,6 @@ 144 144 * **Example 2**: Downlink Payload:** 0100003C** ~/~/ Set Transmit Interval (TDC) = 60 seconds 145 145 146 146 147 - 148 148 == 4.2 Reboot End Node == 149 149 150 150 ... ... @@ -179,7 +179,6 @@ 179 179 ((( 180 180 If the downlink payload=**04FF**, the end node will reboot. 181 181 182 - 183 183 184 184 ))) 185 185 ... ... @@ -219,7 +219,6 @@ 219 219 ))) 220 220 221 221 222 - 223 223 == 4.4 Show Firmware Version == 224 224 225 225 ... ... @@ -250,7 +250,6 @@ 250 250 ((( 251 251 252 252 253 - 254 254 **xx: Software Type:** 255 255 ))) 256 256 ... ... @@ -284,7 +284,6 @@ 284 284 firmware version: v1.1.0 ~-~-> 110 285 285 286 286 287 - 288 288 == 4.5 Show System Configure == 289 289 290 290 ... ... @@ -311,7 +311,6 @@ 311 311 ))) 312 312 313 313 314 - 315 315 = 5. Keys, IDs and EUIs management = 316 316 317 317 == 5.1 Application EUI == ... ... @@ -331,7 +331,6 @@ 331 331 |(% style="width:305px" %)AT+APPEUI=00 b3 d5 7e f0 00 4d 34|(% style="width:186px" %)Set the Application EUI|(% style="width:191px" %)OK 332 332 333 333 334 - 335 335 == 5.2 Application Key == 336 336 337 337 ... ... @@ -349,7 +349,6 @@ 349 349 |(% style="width:441px" %)AT+APPKEY=00 35 55 55 22 23 55 53 43 24 23 42 34 35 35 35|(% style="width:180px" %)Set the Application Key|(% style="width:350px" %)OK 350 350 351 351 352 - 353 353 == 5.3 Application Session Key == 354 354 355 355 ... ... @@ -369,7 +369,6 @@ 369 369 ))) 370 370 371 371 372 - 373 373 == 5.4 Device Address == 374 374 375 375 ... ... @@ -389,7 +389,6 @@ 389 389 |(% style="width:192px" %)AT+DADDR=A8 40 41 FF|(% style="width:241px" %)Set the Application Session Key.|(% style="width:359px" %)OK 390 390 391 391 392 - 393 393 == 5.5 Device EUI == 394 394 395 395 ... ... @@ -409,7 +409,6 @@ 409 409 ))) 410 410 411 411 412 - 413 413 == 5.6 Network ID == 414 414 415 415 ... ... @@ -427,7 +427,6 @@ 427 427 |(% style="width:191px" %)AT+NWKID=A8 40 41 FF|(% style="width:153px" %)Set the Network ID.|(% style="width:101px" %)OK 428 428 429 429 430 - 431 431 == 5.7 Network Session Key == 432 432 433 433 ... ... @@ -445,7 +445,6 @@ 445 445 |(% style="width:455px" %)AT+NWKSKEY=A8 40 41 FF FF 12 34 56 00 01 02 04 05 06 06 07|(% style="width:215px" %)Set the Network Session Key.|(% style="width:343px" %)OK 446 446 447 447 448 - 449 449 = 6. Joining and sending date on LoRaWAN network = 450 450 451 451 == 6.1 Confirm Mode == ... ... @@ -477,7 +477,6 @@ 477 477 * **Example 2:** Downlink Payload: 0500 ~/~/ Set AT+CFM=0 478 478 479 479 480 - 481 481 === 6.1.2 AT+CFM command since DR-LWS007 software stack === 482 482 483 483 ... ... @@ -524,7 +524,6 @@ 524 524 * **Example 2:** Downlink Payload: 05000700 ~/~/ Set AT+CFM=0,7,0 525 525 526 526 527 - 528 528 == 6.2 Confirm Status == 529 529 530 530 ... ... @@ -533,15 +533,14 @@ 533 533 534 534 (% style="color:blue" %)**AT Command: AT+CFS** 535 535 536 -(% border="1" style="background-color:#ffffcc; color:green; width: 534.222px" %)537 -|=(% colspan="3" style="width: 531px;" %)AT+CFS538 -|(% style="width:156px" %)**Command Example**|(% style="width:193px" %)**Function**|(% style="width:17 8px" %)**Response**539 -|(% style="width:156px" %)AT+CFS=?|(% style="width:193px" %)Get confirmation status|(% style="width:17 8px" %)0(((518 +(% border="1" style="background-color:#ffffcc; color:green; width:463px" %) 519 +|=(% colspan="3" style="width: 460px;" %)AT+CFS 520 +|(% style="width:156px" %)**Command Example**|(% style="width:193px" %)**Function**|(% style="width:107px" %)**Response** 521 +|(% style="width:156px" %)AT+CFS=?|(% style="width:193px" %)Get confirmation status|(% style="width:107px" %)0((( 540 540 OK 541 541 ))) 542 542 543 543 544 - 545 545 == 6.3 Join LoRa® Network == 546 546 547 547 ... ... @@ -560,7 +560,6 @@ 560 560 ))) 561 561 562 562 563 - 564 564 == 6.4 LoRa® Network Join Mode == 565 565 566 566 ... ... @@ -588,7 +588,6 @@ 588 588 * **Example 2:** Downlink Payload: **2001** ~/~/ Set AT+NJM=1 589 589 590 590 591 - 592 592 == 6.5 LoRa® Network Join Status == 593 593 594 594 ... ... @@ -605,7 +605,6 @@ 605 605 ))) 606 606 607 607 608 - 609 609 == 6.6 Print Last Received Data in Raw Format == 610 610 611 611 ... ... @@ -622,7 +622,6 @@ 622 622 ))) 623 623 624 624 625 - 626 626 == 6.7 Print Last Received Data in Binary Format == 627 627 628 628 ... ... @@ -639,7 +639,6 @@ 639 639 ))) 640 640 641 641 642 - 643 643 == 6.8 Send Text Data == 644 644 645 645 ... ... @@ -660,7 +660,6 @@ 660 660 ))) 661 661 662 662 663 - 664 664 == 6.9 Send Hexadecimal Data == 665 665 666 666 ... ... @@ -680,7 +680,6 @@ 680 680 ))) 681 681 682 682 683 - 684 684 = 7. LoRaWAN network management = 685 685 686 686 == 7.1 Adaptive Data Rate == ... ... @@ -710,7 +710,6 @@ 710 710 * **Example 2**: Downlink Payload: **2200FFFF** ~/~/ Set AT+ADR=0. 711 711 712 712 713 - 714 714 == 7.2 LoRa® Class == 715 715 716 716 ... ... @@ -730,7 +730,6 @@ 730 730 ))) 731 731 732 732 733 - 734 734 == 7.3 Duty Cycle Setting == 735 735 736 736 ... ... @@ -750,7 +750,6 @@ 750 750 ))) 751 751 752 752 753 - 754 754 == 7.4 Data Rate == 755 755 756 756 ... ... @@ -757,9 +757,11 @@ 757 757 Feature: Get or Set the Data Rate. (0-7 corresponding to DR_X) . 758 758 759 759 (% style="color:red" %) 760 -Note: while set Data Rate, please use set Adptive Data Rate, ADR=0 first. otherwise device will response to server's ADR command and change the DR to the setting from server. 761 -(%%) 731 +**Notice:** 762 762 733 +* 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. 734 +* 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/]] 735 + 763 763 (% style="color:blue" %)**AT Command: AT+DR** 764 764 765 765 (% border="1" style="background-color:#ffffcc; color:green; width:466.222px" %) ... ... @@ -780,7 +780,6 @@ 780 780 * **Example 2**: Downlink Payload: **220000FF** ~/~/ Set AT+DR=0. 781 781 782 782 783 - 784 784 == 7.5 Frame Counter Downlink == 785 785 786 786 ... ... @@ -800,7 +800,6 @@ 800 800 ))) 801 801 802 802 803 - 804 804 == 7.6 Frame Counter Uplink == 805 805 806 806 Feature: Get or Set the Frame Counter Uplink. ... ... @@ -819,7 +819,6 @@ 819 819 ))) 820 820 821 821 822 - 823 823 == 7.7 Join Accept Delay1 == 824 824 825 825 ... ... @@ -839,7 +839,6 @@ 839 839 ))) 840 840 841 841 842 - 843 843 == 7.8 Join Accept Delay2 == 844 844 845 845 ... ... @@ -859,7 +859,6 @@ 859 859 ))) 860 860 861 861 862 - 863 863 == 7.9 Public Network Mode == 864 864 865 865 ... ... @@ -888,7 +888,6 @@ 888 888 |(% style="width:166px" %)AT+PNM=0|(% style="width:225px" %)Set to use private network autoset syncword=0x12|(% style="width:272px" %) 889 889 890 890 891 - 892 892 == 7.10 Receive Delay1 == 893 893 894 894 ... ... @@ -908,7 +908,6 @@ 908 908 ))) 909 909 910 910 911 - 912 912 == 7.11 Receive Delay2 == 913 913 914 914 ... ... @@ -928,7 +928,6 @@ 928 928 ))) 929 929 930 930 931 - 932 932 == 7.12 Rx2 Window Data Rate == 933 933 934 934 ... ... @@ -948,7 +948,6 @@ 948 948 ))) 949 949 950 950 951 - 952 952 == 7.13 Rx2 Window Frequency == 953 953 954 954 ... ... @@ -968,7 +968,6 @@ 968 968 ))) 969 969 970 970 971 - 972 972 == 7.14 Transmit Power == 973 973 974 974 ... ... @@ -997,7 +997,6 @@ 997 997 * **Example 2**: Downlink Payload: **220000FF** ~/~/ Set AT+TXP=0. 998 998 999 999 1000 - 1001 1001 == 7.15 RSSI of the Last Received Packet == 1002 1002 1003 1003 ... ... @@ -1014,7 +1014,6 @@ 1014 1014 ))) 1015 1015 1016 1016 1017 - 1018 1018 == 7.16 SNR of the Last Received Packet == 1019 1019 1020 1020 ... ... @@ -1031,7 +1031,6 @@ 1031 1031 ))) 1032 1032 1033 1033 1034 - 1035 1035 == 7.17 Application Port == 1036 1036 1037 1037 ... ... @@ -1058,7 +1058,6 @@ 1058 1058 * **Example 2**: Downlink Payload:** 2305** ~/~/ set the application port to 5 1059 1059 1060 1060 1061 - 1062 1062 == 7.18 Single Channel Mode == 1063 1063 1064 1064 ... ... @@ -1076,7 +1076,6 @@ 1076 1076 |(% style="width:182px" %)AT+CHS=868100000|(% style="width:295px" %)Set Frequency for Single Channel Mode|(% style="width:122px" %)OK 1077 1077 1078 1078 1079 - 1080 1080 == 7.19 Eight Channel Mode == 1081 1081 1082 1082 ... ... @@ -1095,7 +1095,7 @@ 1095 1095 ))) 1096 1096 |(% style="width:160px" %)AT+CHE=1|(% style="width:198px" %)Set eight channels mode|(% style="width:349px" %)OK 1097 1097 1098 -(% style="color:blue" %)**Downlink Command: 0x24** 1056 +(% style="color:blue" %)**Downlink Command: 0x24 (LHT65,LHT65N Downlink Command:0x07)** 1099 1099 1100 1100 Format: Command Code (0x24) followed by 1 bytes channel value. 1101 1101 ... ... @@ -1105,7 +1105,6 @@ 1105 1105 * **Example 2**: Downlink Payload: 2405 ~/~/ set channel mode to 5 1106 1106 1107 1107 1108 - 1109 1109 == 7.20 Get or Set RXwindows1 timeout == 1110 1110 1111 1111 ... ... @@ -1137,7 +1137,6 @@ 1137 1137 ((( 1138 1138 Increasing thisvalue is equal to extending the time that the receiving window is opened, butthe corresponding power consumption will also increase. Properly increasingthis value can increase the success rate of the downlink. 1139 1139 1140 - 1141 1141 1142 1142 ))) 1143 1143 ... ... @@ -1158,7 +1158,6 @@ 1158 1158 |(% style="width:190px" %)AT+RX2WTO=20|(% style="width:199px" %)Set RXwindows2 timeout|(% style="width:104px" %)OK 1159 1159 1160 1160 1161 - 1162 1162 == 7.22 Setting up uplinkdwelltime (as923, au915) == 1163 1163 1164 1164 ... ... @@ -1185,7 +1185,6 @@ 1185 1185 * **Example 2**: Downlink Payload: **2500** ~/~/ set uplinkdwelltime to 0 1186 1186 1187 1187 1188 - 1189 1189 == 7.23 Set Packet Receiving Response Level == 1190 1190 1191 1191 ... ... @@ -1226,7 +1226,6 @@ 1226 1226 * **Example 2**: Downlink Payload: **2102** ~/~/ set packet receiving response level to 2 1227 1227 1228 1228 1229 - 1230 1230 == 7.24 Controls NBTrans in unconfirmed uplink mode(LWS007 NBTrans:Set retransmission packets) == 1231 1231 1232 1232 ... ... @@ -1258,12 +1258,16 @@ 1258 1258 * Example 2: Downlink Payload: 330201 ~/~/ Set AT+SETMAXNBTRANS=2,1 1259 1259 1260 1260 1261 - 1262 1262 == 7.25 Device offline rejoining (LWS007) == 1263 1263 1264 1264 1265 1265 (% style="color:blue" %)**AT Command: AT+DDETECT** 1266 1266 1219 +AT+DDETECT=<Flag>,<ACK_Timout_1>,<ACK_Timout_2> (Default Value: AT+DDETECT=1,1440,2880) 1220 + 1221 +* ACK_Timout_1: Unit: min 1222 +* ACK_Timout_2: Unit: min 1223 + 1267 1267 (% border="1" style="background-color:#ffffcc; color:green; width:710.222px" %) 1268 1268 |=(% colspan="3" style="width: 707px;" %)AT+**DDETECT** 1269 1269 |(% style="width:160px" %)**Command Example**|(% style="width:198px" %)**Function**|(% style="width:349px" %)**Response** ... ... @@ -1295,16 +1295,19 @@ 1295 1295 OK 1296 1296 ))) 1297 1297 1298 -(% style="color:blue" %)**Downlink Command: 0x3 3**1255 +(% style="color:blue" %)**Downlink Command: 0x32** 1299 1299 1300 1300 Format: Command Code (0x32) followed by 2 bytes mode value. 1301 1301 1302 -If the downlink payload=320105A00B40, it means set end node to use confirm mode, while type code is 3 3.1259 +If the downlink payload=320105A00B40, it means set end node to use confirm mode, while type code is 32. 1303 1303 1304 -* **Example 1:** Downlink Payload: 320105A00B40 ~/~/ Set AT+DDETECT=1,1440,2880 1261 +* **Example 1:** Downlink Payload: 320105A00B40 ~/~/ Set AT+DDETECT=1,1440,2880 1262 +** 0x01 : Flag 1263 +** 0x05A0: ACK_Timout_1 : 1440minutes (24 hours) 1264 +** 0x0B40: ACK_Timout_2 : 2880minutes (48 hours) 1265 +** **Explain**: Enable Online Detect, if end node doesn't receive any downlink within ACK_Timout_1( 1440 minutes or 24 hours). End node will use confirmed uplink to send packets during ACK_Timout_1 (the 24th hour) to ACK_Timout_2 ( the 48th hour). If from the 24th to 48th hour, end node got an downlink from server, it will switch back to unconfirmed uplink. end node will restart ACK_Timout_1. If from the 24th to 48th hour, end node still not got any downlink, means device doesn't get ACK from server within last 48 hours. Device will process rejoin, rejoin request interval is AT+RJTDC period. For AU915/ US915, device will use the sub-band used for last join. 1305 1305 1306 1306 1307 - 1308 1308 == 7.26 Request the server to send an ACK == 1309 1309 1310 1310 ... ... @@ -1323,7 +1323,6 @@ 1323 1323 ))) 1324 1324 1325 1325 1326 - 1327 1327 == 7.27 Adjust network rejoining interval == 1328 1328 1329 1329 ... ... @@ -1332,13 +1332,13 @@ 1332 1332 (% border="1" style="background-color:#ffffcc; color:green; width:727.222px" %) 1333 1333 |=(% colspan="3" style="width: 724px;" %)AT+RJTDC 1334 1334 |(% style="width:165px" %)**Command Example**|(% style="width:227px" %)**Function**|(% style="width:329px" %)**Response** 1335 -|(% style="width:165px" %)AT+RJTDC=?|(% style="width:227px" %)Show the ReJoin data transmission interval in min|(% style="width:329px" %)30 000(((1294 +|(% style="width:165px" %)AT+RJTDC=?|(% style="width:227px" %)Show the ReJoin data transmission interval in min|(% style="width:329px" %)30((( 1336 1336 OK 1337 1337 1338 -the interval is 30 000ms= 30s1297 +the interval is 30 min 1339 1339 ))) 1340 -|(% style="width:165px" %)AT+RJTDC=60 000|(% style="width:227px" %)Set the ReJoin data transmission interval in min|(% style="width:329px" %)OK(((1341 -Set the ReJoin data transmission interval to 60 000ms= 60 seconds1299 +|(% style="width:165px" %)AT+RJTDC=60|(% style="width:227px" %)Set the ReJoin data transmission interval in min|(% style="width:329px" %)OK((( 1300 +Set the ReJoin data transmission interval to 60 min 1342 1342 ))) 1343 1343 1344 1344 (% style="color:blue" %)**Downlink Command: 0x26** ... ... @@ -1351,7 +1351,6 @@ 1351 1351 * **Example 2: **Downlink Payload: 260002 ~/~/ Set AT+RJTDC=2 1352 1352 1353 1353 1354 - 1355 1355 = 8. AT Commands Combination = 1356 1356 1357 1357 == 8.1 Set a fix RX2DR for downlink window == ... ... @@ -1361,7 +1361,6 @@ 1361 1361 * (% style="color:blue" %)**AT+RX2DR=xxxx** (%%) **~-~->** Set xxxx to your wanted DataRate 1362 1362 1363 1363 1364 - 1365 1365 == 8.2 Use Downlink Command to set a fix uplink DR == 1366 1366 1367 1367