<
From version < 59.2 >
edited by Xiaoling
on 2023/01/29 11:16
To version < 60.11 >
edited by Xiaoling
on 2023/03/27 14:10
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -14,10 +14,9 @@
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 -
19 19  )))
20 20  
19 +
21 21  = 2. How to use AT Commands or Downlink command =
22 22  
23 23  
... ... @@ -27,8 +27,8 @@
27 27  ** 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]]?
28 28  ** See use note for more serves [[Servers Note>>doc:Main.WebHome]](IoT LoRaWAN Server)
29 29  
29 +(% style="display:none" %) (%%)
30 30  
31 -
32 32  = 3. Support End Node and firmware version =
33 33  
34 34  
... ... @@ -103,8 +103,8 @@
103 103  )))
104 104  )))
105 105  
105 +(% style="display:none" %) (%%)
106 106  
107 -
108 108  = 4. System Management Commands =
109 109  
110 110  == 4.1 Change Uplink Interval ==
... ... @@ -142,8 +142,8 @@
142 142  * **Example 1**: Downlink Payload:** 0100001E**  ~/~/ Set Transmit Interval (TDC) = 30 seconds
143 143  * **Example 2**: Downlink Payload:** 0100003C**  ~/~/ Set Transmit Interval (TDC) = 60 seconds
144 144  
144 +(% style="display:none" %) (%%)
145 145  
146 -
147 147  == 4.2 Reboot End Node ==
148 148  
149 149  
... ... @@ -176,11 +176,10 @@
176 176  )))
177 177  
178 178  (((
179 -If the downlink payload=**04FF**, the end node will reboot.
180 -
181 -
178 +If the downlink payload=**04FF**, the end node will reboot.
182 182  )))
183 183  
181 +
184 184  == 4.3 Reset to factory Default ==
185 185  
186 186  
... ... @@ -293,20 +293,15 @@
293 293  |(% style="width:160px" %)**Command Example**|(% style="width:154px" %)**Function**|(% style="width:280px" %)**Response**
294 294  |(% style="width:160px" %)AT+CFG|(% style="width:154px" %)Show all configures|(% style="width:280px" %)(((
295 295  AT+DEUI = XX XX XX XX XX XX XX XX
296 -
297 297  AT+DADDR=XXXXXXXX
298 -
299 299  ……….
300 -
301 301  AT+RX2WTO=X
302 -
303 303  AT+CHS=868100000
304 -
305 305  OK
306 306  )))
307 307  
301 +(% style="display:none" %) (%%)
308 308  
309 -
310 310  = 5. Keys, IDs and EUIs management =
311 311  
312 312  == 5.1 Application EUI ==
... ... @@ -325,8 +325,8 @@
325 325  )))
326 326  |(% style="width:305px" %)AT+APPEUI=00 b3 d5 7e f0 00 4d 34|(% style="width:186px" %)Set the Application EUI|(% style="width:191px" %)OK
327 327  
321 +(% style="display:none" %) (%%)
328 328  
329 -
330 330  == 5.2 Application Key ==
331 331  
332 332  
... ... @@ -343,8 +343,8 @@
343 343  )))
344 344  |(% 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
345 345  
339 +(% style="display:none" %) (%%)
346 346  
347 -
348 348  == 5.3 Application Session Key ==
349 349  
350 350  
... ... @@ -363,8 +363,8 @@
363 363  OK
364 364  )))
365 365  
359 +(% style="display:none" %) (%%)
366 366  
367 -
368 368  == 5.4 Device Address ==
369 369  
370 370  
... ... @@ -383,8 +383,8 @@
383 383  )))
384 384  |(% style="width:192px" %)AT+DADDR=A8 40 41 FF|(% style="width:241px" %)Set the Application Session Key.|(% style="width:359px" %)OK
385 385  
379 +(% style="display:none" %) (%%)
386 386  
387 -
388 388  == 5.5 Device EUI ==
389 389  
390 390  
... ... @@ -403,8 +403,8 @@
403 403  OK
404 404  )))
405 405  
399 +(% style="display:none" %) (%%)
406 406  
407 -
408 408  == 5.6 Network ID ==
409 409  
410 410  
... ... @@ -421,8 +421,8 @@
421 421  )))
422 422  |(% style="width:191px" %)AT+NWKID=A8 40 41 FF|(% style="width:153px" %)Set the Network ID.|(% style="width:101px" %)OK
423 423  
417 +(% style="display:none" %) (%%)
424 424  
425 -
426 426  == 5.7 Network Session Key ==
427 427  
428 428  
... ... @@ -439,8 +439,8 @@
439 439  )))
440 440  |(% 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
441 441  
435 +(% style="display:none" %) (%%)
442 442  
443 -
444 444  = 6. Joining and sending date on LoRaWAN network =
445 445  
446 446  == 6.1 Confirm Mode ==
... ... @@ -471,8 +471,8 @@
471 471  * **Example 1:** Downlink Payload: 0501  ~/~/ Set AT+CFM=1
472 472  * **Example 2:** Downlink Payload: 0500  ~/~/ Set AT+CFM=0
473 473  
467 +(% style="display:none" %) (%%)
474 474  
475 -
476 476  === 6.1.2  AT+CFM command since DR-LWS007 software stack ===
477 477  
478 478  
... ... @@ -518,8 +518,8 @@
518 518  * **Example 1:** Downlink Payload: 05010101  ~/~/ Set AT+CFM=1,1,1
519 519  * **Example 2:** Downlink Payload: 05000700  ~/~/ Set AT+CFM=0,7,0
520 520  
514 +(% style="display:none" %) (%%)
521 521  
522 -
523 523  == 6.2 Confirm Status ==
524 524  
525 525  
... ... @@ -535,8 +535,8 @@
535 535  OK
536 536  )))
537 537  
531 +(% style="display:none" %) (%%)
538 538  
539 -
540 540  == 6.3 Join LoRa® Network ==
541 541  
542 542  
... ... @@ -550,12 +550,11 @@
550 550  |(% style="width:163px" %)**Command Example**|(% style="width:147px" %)**Function**|(% style="width:334px" %)**Response**
551 551  |(% style="width:163px" %)AT+JOIN ?|(% style="width:147px" %)Get imformation.|(% style="width:334px" %)AT+JOIN: Join network(((
552 552  OK
553 -
554 554  While Error in format, return AT_BUSY_ERROR
555 555  )))
556 556  
549 +(% style="display:none" %) (%%)
557 557  
558 -
559 559  == 6.4 LoRa® Network Join Mode ==
560 560  
561 561  
... ... @@ -582,8 +582,8 @@
582 582  * **Example 1: **Downlink Payload: **2000                  ** ~/~/ Set AT+NJM=0
583 583  * **Example 2:** Downlink Payload: **2001**  ~/~/ Set AT+NJM=1
584 584  
577 +(% style="display:none" %) (%%)
585 585  
586 -
587 587  == 6.5 LoRa® Network Join Status ==
588 588  
589 589  
... ... @@ -599,8 +599,8 @@
599 599  OK
600 600  )))
601 601  
594 +(% style="display:none" %) (%%)
602 602  
603 -
604 604  == 6.6 Print Last Received Data in Raw Format ==
605 605  
606 606  
... ... @@ -616,8 +616,8 @@
616 616  OK
617 617  )))
618 618  
611 +(% style="display:none" %) (%%)
619 619  
620 -
621 621  == 6.7 Print Last Received Data in Binary Format ==
622 622  
623 623  
... ... @@ -633,8 +633,8 @@
633 633  OK
634 634  )))
635 635  
628 +(% style="display:none" %) (%%)
636 636  
637 -
638 638  == 6.8 Send Text Data ==
639 639  
640 640  
... ... @@ -648,14 +648,11 @@
648 648  |(% style="width:201px" %)**Command Example**|(% style="width:340px" %)**Function**|(% style="width:446px" %)**Response**
649 649  |(% style="width:201px" %)AT+SEND=12:hello world|(% style="width:340px" %)Send text data along with the application port.|(% style="width:446px" %)OK(((
650 650  While Error in format, return
651 -
652 652  AT_BUSY_ERROR/AT_BUSY_ERROR/AT_NO_NETWORK_JOINED
653 -
654 -
655 655  )))
656 656  
646 +(% style="display:none" %) (%%)
657 657  
658 -
659 659  == 6.9 Send Hexadecimal Data ==
660 660  
661 661  
... ... @@ -669,13 +669,11 @@
669 669  |(% style="width:257px" %)**Command Example**|(% style="width:394px" %)**Function**|(% style="width:446px" %)**Response**
670 670  |(% style="width:257px" %)AT+SENDB=12:abcdef0123456789|(% style="width:394px" %)Send hexadecimal data along with the application port.|(% style="width:446px" %)OK
671 671  |(% style="width:257px" %)AT+SENDB=abcdef0123456789|(% style="width:394px" %)Send hexadecimal data along with the application port.|(% style="width:446px" %)While Error in format, return(((
672 -AT_PARAM_ERROR AT_BUSY_ERROR/AT_NO_NETWORK_JOINED
673 -
674 -
661 +AT_PARAM_ERROR AT_BUSY_ERROR/AT_NO_NETWORK_JOINED
675 675  )))
676 676  
664 +(% style="display:none" %) (%%)
677 677  
678 -
679 679  = 7. LoRaWAN network management =
680 680  
681 681  == 7.1 Adaptive Data Rate ==
... ... @@ -704,8 +704,8 @@
704 704  * **Example 1**: Downlink Payload: **2201**  ~/~/ Set AT+ADR=1.
705 705  * **Example 2**: Downlink Payload: **2200FFFF**  ~/~/ Set AT+ADR=0.
706 706  
694 +(% style="display:none" %) (%%)
707 707  
708 -
709 709  == 7.2 LoRa® Class ==
710 710  
711 711  
... ... @@ -724,8 +724,8 @@
724 724  
725 725  )))
726 726  
714 +(% style="display:none" %) (%%)
727 727  
728 -
729 729  == 7.3 Duty Cycle Setting ==
730 730  
731 731  
... ... @@ -744,8 +744,8 @@
744 744  
745 745  )))
746 746  
734 +(% style="display:none" %) (%%)
747 747  
748 -
749 749  == 7.4 Data Rate ==
750 750  
751 751  
... ... @@ -776,8 +776,8 @@
776 776  * **Example 1**: Downlink Payload: **220001FF**  ~/~/ Set AT+DR=1.
777 777  * **Example 2**: Downlink Payload: **220000FF**  ~/~/ Set AT+DR=0.
778 778  
766 +(% style="display:none" %) (%%)
779 779  
780 -
781 781  == 7.5 Frame Counter Downlink ==
782 782  
783 783  
... ... @@ -796,8 +796,6 @@
796 796  OK
797 797  )))
798 798  
799 -
800 -
801 801  == 7.6 Frame Counter Uplink ==
802 802  
803 803  Feature: Get or Set the Frame Counter Uplink.
... ... @@ -815,8 +815,8 @@
815 815  
816 816  )))
817 817  
803 +(% style="display:none" %) (%%)
818 818  
819 -
820 820  == 7.7 Join Accept Delay1 ==
821 821  
822 822  
... ... @@ -835,8 +835,8 @@
835 835  
836 836  )))
837 837  
823 +(% style="display:none" %) (%%)
838 838  
839 -
840 840  == 7.8 Join Accept Delay2 ==
841 841  
842 842  
... ... @@ -855,8 +855,8 @@
855 855  
856 856  )))
857 857  
843 +(% style="display:none" %) (%%)
858 858  
859 -
860 860  == 7.9 Public Network Mode ==
861 861  
862 862  
... ... @@ -884,8 +884,8 @@
884 884  )))
885 885  |(% style="width:166px" %)AT+PNM=0|(% style="width:225px" %)Set to use private network autoset syncword=0x12|(% style="width:272px" %)
886 886  
872 +(% style="display:none" %) (%%)
887 887  
888 -
889 889  == 7.10 Receive Delay1 ==
890 890  
891 891  
... ... @@ -904,8 +904,8 @@
904 904  
905 905  )))
906 906  
892 +(% style="display:none" %) (%%)
907 907  
908 -
909 909  == 7.11 Receive Delay2 ==
910 910  
911 911  
... ... @@ -924,8 +924,8 @@
924 924  
925 925  )))
926 926  
912 +(% style="display:none" %) (%%)
927 927  
928 -
929 929  == 7.12 Rx2 Window Data Rate ==
930 930  
931 931  
... ... @@ -944,8 +944,8 @@
944 944  
945 945  )))
946 946  
932 +(% style="display:none" %) (%%)
947 947  
948 -
949 949  == 7.13 Rx2 Window Frequency ==
950 950  
951 951  
... ... @@ -964,8 +964,8 @@
964 964  
965 965  )))
966 966  
952 +(% style="display:none" %) (%%)
967 967  
968 -
969 969  == 7.14 Transmit Power ==
970 970  
971 971  
... ... @@ -993,8 +993,8 @@
993 993  * **Example 1**: Downlink Payload: **22000102**  ~/~/ Set AT+TXP=2.
994 994  * **Example 2**: Downlink Payload: **220000FF**  ~/~/ Set AT+TXP=0.
995 995  
981 +(% style="display:none" %) (%%)
996 996  
997 -
998 998  == 7.15 RSSI of the Last Received Packet ==
999 999  
1000 1000  
... ... @@ -1010,8 +1010,8 @@
1010 1010  OK
1011 1011  )))
1012 1012  
998 +(% style="display:none" %) (%%)
1013 1013  
1014 -
1015 1015  == 7.16 SNR of the Last Received Packet ==
1016 1016  
1017 1017  
... ... @@ -1027,8 +1027,8 @@
1027 1027  OK
1028 1028  )))
1029 1029  
1015 +(% style="display:none" %) (%%)
1030 1030  
1031 -
1032 1032  == 7.17 Application Port ==
1033 1033  
1034 1034  
... ... @@ -1054,8 +1054,8 @@
1054 1054  * **Example 1**: Downlink Payload: **2301**  ~/~/ set the application port to 1
1055 1055  * **Example 2**: Downlink Payload:** 2305**  ~/~/ set the application port to 5
1056 1056  
1042 +(% style="display:none" %) (%%)
1057 1057  
1058 -
1059 1059  == 7.18 Single Channel Mode ==
1060 1060  
1061 1061  
... ... @@ -1072,8 +1072,8 @@
1072 1072  )))
1073 1073  |(% style="width:182px" %)AT+CHS=868100000|(% style="width:295px" %)Set Frequency for Single Channel Mode|(% style="width:122px" %)OK
1074 1074  
1060 +(% style="display:none" %) (%%)
1075 1075  
1076 -
1077 1077  == 7.19 Eight Channel Mode ==
1078 1078  
1079 1079  
... ... @@ -1101,8 +1101,8 @@
1101 1101  * **Example 1**: Downlink Payload: 2401  ~/~/ set channel mode to 1
1102 1102  * **Example 2**: Downlink Payload: 2405  ~/~/ set channel mode to 5
1103 1103  
1089 +(% style="display:none" %) (%%)
1104 1104  
1105 -
1106 1106  == 7.20 Get or Set RXwindows1 timeout ==
1107 1107  
1108 1108  
... ... @@ -1119,24 +1119,19 @@
1119 1119  )))
1120 1120  |(% style="width:163px" %)AT+RX1WTO=60|(% style="width:201px" %)Set RXwindows1 timeout|(% style="width:93px" %)OK
1121 1121  
1122 -(((
1123 -
1107 +(% style="display:none" %) (%%)
1124 1124  
1125 -
1109 +(((
1126 1126  (% style="color:blue" %)**AT+RX1WTO**(%%) is theRxSingle timeout value of receive window 1. If it is not set, then the queriedvalue is the default value. If it is set, then the queried value is the setvalue. AT+RX2TWO is thesame as above. The definitionof RxSingle timeout is as described in the following paragraph.
1127 -
1128 -
1129 1129  )))
1130 1130  
1131 1131  [[image:image-20220526162535-1.png]]
1132 1132  
1133 -
1134 1134  (((
1135 1135  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.
1136 -
1137 -
1138 1138  )))
1139 1139  
1119 +
1140 1140  == 7.21 Get or Set RXwindows2 timeout ==
1141 1141  
1142 1142  
... ... @@ -1153,8 +1153,8 @@
1153 1153  )))
1154 1154  |(% style="width:190px" %)AT+RX2WTO=20|(% style="width:199px" %)Set RXwindows2 timeout|(% style="width:104px" %)OK
1155 1155  
1136 +(% style="display:none" %) (%%)
1156 1156  
1157 -
1158 1158  == 7.22 Setting up uplinkdwelltime (as923, au915) ==
1159 1159  
1160 1160  
... ... @@ -1180,8 +1180,8 @@
1180 1180  * **Example 1**: Downlink Payload: **2501**  ~/~/ set uplinkdwelltime to 1
1181 1181  * **Example 2**: Downlink Payload: **2500**  ~/~/ set uplinkdwelltime to 0
1182 1182  
1163 +(% style="display:none" %) (%%)
1183 1183  
1184 -
1185 1185  == 7.23 Set Packet Receiving Response Level ==
1186 1186  
1187 1187  
... ... @@ -1221,8 +1221,8 @@
1221 1221  * **Example 1**: Downlink Payload: **2101**  ~/~/ set packet receiving response level to 1
1222 1222  * **Example 2**: Downlink Payload: **2102**  ~/~/ set packet receiving response level to 2
1223 1223  
1204 +(% style="display:none" %) (%%)
1224 1224  
1225 -
1226 1226  == 7.24 Controls NBTrans in unconfirmed uplink mode(LWS007 NBTrans:Set retransmission packets) ==
1227 1227  
1228 1228  
... ... @@ -1253,13 +1253,18 @@
1253 1253  * Example 1: Downlink Payload: 330100  ~/~/ Set AT+SETMAXNBTRANS=1,0
1254 1254  * Example 2: Downlink Payload: 330201  ~/~/ Set AT+SETMAXNBTRANS=2,1
1255 1255  
1236 +(% style="display:none" %) (%%)
1256 1256  
1257 -
1258 1258  == 7.25 Device offline rejoining (LWS007) ==
1259 1259  
1260 1260  
1261 1261  (% style="color:blue" %)**AT Command: AT+DDETECT**
1262 1262  
1243 +AT+DDETECT=<Flag>,<ACK_Timout_1>,<ACK_Timout_2> (Default Value: AT+DDETECT=1,1440,2880)
1244 +
1245 +* ACK_Timout_1: Unit: min
1246 +* ACK_Timout_2: Unit: min
1247 +
1263 1263  (% border="1" style="background-color:#ffffcc; color:green; width:710.222px" %)
1264 1264  |=(% colspan="3" style="width: 707px;" %)AT+**DDETECT**
1265 1265  |(% style="width:160px" %)**Command Example**|(% style="width:198px" %)**Function**|(% style="width:349px" %)**Response**
... ... @@ -1291,16 +1291,20 @@
1291 1291  OK
1292 1292  )))
1293 1293  
1294 -(% style="color:blue" %)**Downlink Command: 0x33**
1279 +(% style="color:blue" %)**Downlink Command: 0x32**
1295 1295  
1296 1296  Format: Command Code (0x32) followed by 2 bytes mode value.
1297 1297  
1298 -If the downlink payload=320105A00B40, it means set end node to use confirm mode, while type code is 33.
1283 +If the downlink payload=320105A00B40, it means set end node to use confirm mode, while type code is 32.
1299 1299  
1300 -* **Example 1:** Downlink Payload: 320105A00B40  ~/~/ Set AT+DDETECT=1,1440,2880
1285 +* **Example 1:** Downlink Payload: 320105A00B40  ~/~/ Set AT+DDETECT=1,1440,2880
1286 +** 0x01 : Flag
1287 +** 0x05A0: ACK_Timout_1 : 1440minutes (24 hours)
1288 +** 0x0B40: ACK_Timout_2 : 2880minutes (48 hours)
1289 +** **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.
1301 1301  
1291 +(% style="display:none" %) (%%)
1302 1302  
1303 -
1304 1304  == 7.26 Request the server to send an ACK ==
1305 1305  
1306 1306  
... ... @@ -1314,12 +1314,11 @@
1314 1314  )))
1315 1315  |(% style="width:160px" %)**AT+PNACKMD=0**|(% style="width:263px" %)off request the server to send an ACK|(% style="width:109px" %)(((
1316 1316  0
1317 -
1318 1318  OK
1319 1319  )))
1320 1320  
1309 +(% style="display:none" %) (%%)
1321 1321  
1322 -
1323 1323  == 7.27 Adjust network rejoining interval ==
1324 1324  
1325 1325  
... ... @@ -1346,8 +1346,8 @@
1346 1346  * **Example 1:** Downlink Payload: 26000A  ~/~/ Set AT+RJTDC=10
1347 1347  * **Example 2: **Downlink Payload: 260002  ~/~/ Set AT+RJTDC=2
1348 1348  
1337 +(% style="display:none" %) (%%)
1349 1349  
1350 -
1351 1351  = 8. AT Commands Combination =
1352 1352  
1353 1353  == 8.1 Set a fix RX2DR for downlink window ==
... ... @@ -1354,10 +1354,11 @@
1354 1354  
1355 1355  
1356 1356  * (% style="color:blue" %)**AT+ADR=0             **(%%) **~-~->**  Disable ADR first
1345 +
1357 1357  * (% style="color:blue" %)**AT+RX2DR=xxxx**   (%%) **~-~->**  Set xxxx to your wanted DataRate
1358 1358  
1348 +(% style="display:none" %) (%%)
1359 1359  
1360 -
1361 1361  == 8.2 Use Downlink Command to set a fix uplink DR ==
1362 1362  
1363 1363  
... ... @@ -1366,7 +1366,9 @@
1366 1366  **Same as:**
1367 1367  
1368 1368  * AT+ADR=0  [[Reference>>||anchor="H7.1AdaptiveDataRate"]]
1358 +
1369 1369  * AT+DR=5  [[Reference>>||anchor="H7.4DataRate"]]
1360 +
1370 1370  * AT+TXP=0  [[Reference>>||anchor="H7.14TransmitPower"]]
1371 1371  
1372 1372  
Copyright ©2010-2024 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0