<
From version < 56.1 >
edited by Edwin Chen
on 2022/10/16 07:44
To version < 60.6 >
edited by Xiaoling
on 2023/03/27 14:04
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Edwin
1 +XWiki.Xiaoling
Content
... ... @@ -14,20 +14,20 @@
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 -
20 20  )))
21 21  
19 +
22 22  = 2. How to use AT Commands or Downlink command =
23 23  
24 24  
25 -* For AT Command , See Devices User Manual for Device. The user manual can be found in each product page of [[Dragino Official Website>>url:http://www.dragino.com/]]
26 -* For LoRaWAN Downlink: The gateway transfer downlink command in HEX format. This page shows the HEX format downlink code for each command. but some servers use base64 as downlink code. Below are reference for how to use downlink command:
23 +* **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/]]
24 +* **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  
29 +(% style="display:none" %) (%%)
30 +
31 31  = 3. Support End Node and firmware version =
32 32  
33 33  
... ... @@ -102,6 +102,8 @@
102 102  )))
103 103  )))
104 104  
105 +(% style="display:none" %) (%%)
106 +
105 105  = 4. System Management Commands =
106 106  
107 107  == 4.1 Change Uplink Interval ==
... ... @@ -139,6 +139,8 @@
139 139  * **Example 1**: Downlink Payload:** 0100001E**  ~/~/ Set Transmit Interval (TDC) = 30 seconds
140 140  * **Example 2**: Downlink Payload:** 0100003C**  ~/~/ Set Transmit Interval (TDC) = 60 seconds
141 141  
144 +(% style="display:none" %) (%%)
145 +
142 142  == 4.2 Reboot End Node ==
143 143  
144 144  
... ... @@ -171,12 +171,10 @@
171 171  )))
172 172  
173 173  (((
174 -If the downlink payload=**04FF**, the end node will reboot.
175 -
176 -
177 -
178 +If the downlink payload=**04FF**, the end node will reboot.
178 178  )))
179 179  
181 +
180 180  == 4.3 Reset to factory Default ==
181 181  
182 182  
... ... @@ -213,7 +213,6 @@
213 213  )))
214 214  
215 215  
216 -
217 217  == 4.4 Show Firmware Version ==
218 218  
219 219  
... ... @@ -244,7 +244,6 @@
244 244  (((
245 245  
246 246  
247 -
248 248  **xx: Software Type:**
249 249  )))
250 250  
... ... @@ -278,7 +278,6 @@
278 278  firmware version: v1.1.0 ~-~-> 110
279 279  
280 280  
281 -
282 282  == 4.5 Show System Configure ==
283 283  
284 284  
... ... @@ -322,6 +322,8 @@
322 322  )))
323 323  |(% style="width:305px" %)AT+APPEUI=00 b3 d5 7e f0 00 4d 34|(% style="width:186px" %)Set the Application EUI|(% style="width:191px" %)OK
324 324  
324 +(% style="display:none" %) (%%)
325 +
325 325  == 5.2 Application Key ==
326 326  
327 327  
... ... @@ -338,6 +338,8 @@
338 338  )))
339 339  |(% 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
340 340  
342 +(% style="display:none" %) (%%)
343 +
341 341  == 5.3 Application Session Key ==
342 342  
343 343  
... ... @@ -356,6 +356,8 @@
356 356  OK
357 357  )))
358 358  
362 +(% style="display:none" %) (%%)
363 +
359 359  == 5.4 Device Address ==
360 360  
361 361  
... ... @@ -374,6 +374,8 @@
374 374  )))
375 375  |(% style="width:192px" %)AT+DADDR=A8 40 41 FF|(% style="width:241px" %)Set the Application Session Key.|(% style="width:359px" %)OK
376 376  
382 +(% style="display:none" %) (%%)
383 +
377 377  == 5.5 Device EUI ==
378 378  
379 379  
... ... @@ -392,6 +392,8 @@
392 392  OK
393 393  )))
394 394  
402 +(% style="display:none" %) (%%)
403 +
395 395  == 5.6 Network ID ==
396 396  
397 397  
... ... @@ -408,6 +408,8 @@
408 408  )))
409 409  |(% style="width:191px" %)AT+NWKID=A8 40 41 FF|(% style="width:153px" %)Set the Network ID.|(% style="width:101px" %)OK
410 410  
420 +(% style="display:none" %) (%%)
421 +
411 411  == 5.7 Network Session Key ==
412 412  
413 413  
... ... @@ -424,6 +424,8 @@
424 424  )))
425 425  |(% 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
426 426  
438 +(% style="display:none" %) (%%)
439 +
427 427  = 6. Joining and sending date on LoRaWAN network =
428 428  
429 429  == 6.1 Confirm Mode ==
... ... @@ -454,6 +454,8 @@
454 454  * **Example 1:** Downlink Payload: 0501  ~/~/ Set AT+CFM=1
455 455  * **Example 2:** Downlink Payload: 0500  ~/~/ Set AT+CFM=0
456 456  
470 +(% style="display:none" %) (%%)
471 +
457 457  === 6.1.2  AT+CFM command since DR-LWS007 software stack ===
458 458  
459 459  
... ... @@ -499,6 +499,8 @@
499 499  * **Example 1:** Downlink Payload: 05010101  ~/~/ Set AT+CFM=1,1,1
500 500  * **Example 2:** Downlink Payload: 05000700  ~/~/ Set AT+CFM=0,7,0
501 501  
517 +(% style="display:none" %) (%%)
518 +
502 502  == 6.2 Confirm Status ==
503 503  
504 504  
... ... @@ -507,10 +507,10 @@
507 507  
508 508  (% style="color:blue" %)**AT Command: AT+CFS**
509 509  
510 -(% border="1" style="background-color:#ffffcc; color:green; width:534.222px" %)
511 -|=(% colspan="3" style="width: 531px;" %)AT+CFS
512 -|(% style="width:156px" %)**Command Example**|(% style="width:193px" %)**Function**|(% style="width:178px" %)**Response**
513 -|(% style="width:156px" %)AT+CFS=?|(% style="width:193px" %)Get confirmation status|(% style="width:178px" %)0(((
527 +(% border="1" style="background-color:#ffffcc; color:green; width:463px" %)
528 +|=(% colspan="3" style="width: 460px;" %)AT+CFS
529 +|(% style="width:156px" %)**Command Example**|(% style="width:193px" %)**Function**|(% style="width:107px" %)**Response**
530 +|(% style="width:156px" %)AT+CFS=?|(% style="width:193px" %)Get confirmation status|(% style="width:107px" %)0(((
514 514  OK
515 515  )))
516 516  
... ... @@ -557,6 +557,8 @@
557 557  * **Example 1: **Downlink Payload: **2000                  ** ~/~/ Set AT+NJM=0
558 558  * **Example 2:** Downlink Payload: **2001**  ~/~/ Set AT+NJM=1
559 559  
577 +(% style="display:none" %) (%%)
578 +
560 560  == 6.5 LoRa® Network Join Status ==
561 561  
562 562  
... ... @@ -572,6 +572,8 @@
572 572  OK
573 573  )))
574 574  
594 +(% style="display:none" %) (%%)
595 +
575 575  == 6.6 Print Last Received Data in Raw Format ==
576 576  
577 577  
... ... @@ -587,6 +587,8 @@
587 587  OK
588 588  )))
589 589  
611 +(% style="display:none" %) (%%)
612 +
590 590  == 6.7 Print Last Received Data in Binary Format ==
591 591  
592 592  
... ... @@ -602,6 +602,8 @@
602 602  OK
603 603  )))
604 604  
628 +(% style="display:none" %) (%%)
629 +
605 605  == 6.8 Send Text Data ==
606 606  
607 607  
... ... @@ -615,12 +615,11 @@
615 615  |(% style="width:201px" %)**Command Example**|(% style="width:340px" %)**Function**|(% style="width:446px" %)**Response**
616 616  |(% style="width:201px" %)AT+SEND=12:hello world|(% style="width:340px" %)Send text data along with the application port.|(% style="width:446px" %)OK(((
617 617  While Error in format, return
618 -
619 619  AT_BUSY_ERROR/AT_BUSY_ERROR/AT_NO_NETWORK_JOINED
620 -
621 -
622 622  )))
623 623  
646 +(% style="display:none" %) (%%)
647 +
624 624  == 6.9 Send Hexadecimal Data ==
625 625  
626 626  
... ... @@ -634,11 +634,11 @@
634 634  |(% style="width:257px" %)**Command Example**|(% style="width:394px" %)**Function**|(% style="width:446px" %)**Response**
635 635  |(% style="width:257px" %)AT+SENDB=12:abcdef0123456789|(% style="width:394px" %)Send hexadecimal data along with the application port.|(% style="width:446px" %)OK
636 636  |(% 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(((
637 -AT_PARAM_ERROR AT_BUSY_ERROR/AT_NO_NETWORK_JOINED
638 -
639 -
661 +AT_PARAM_ERROR AT_BUSY_ERROR/AT_NO_NETWORK_JOINED
640 640  )))
641 641  
664 +(% style="display:none" %) (%%)
665 +
642 642  = 7. LoRaWAN network management =
643 643  
644 644  == 7.1 Adaptive Data Rate ==
... ... @@ -667,6 +667,7 @@
667 667  * **Example 1**: Downlink Payload: **2201**  ~/~/ Set AT+ADR=1.
668 668  * **Example 2**: Downlink Payload: **2200FFFF**  ~/~/ Set AT+ADR=0.
669 669  
694 +(% style="display:none" %) (%%)
670 670  
671 671  == 7.2 LoRa® Class ==
672 672  
... ... @@ -683,9 +683,10 @@
683 683  OK
684 684  )))
685 685  |(% style="width:163px" %)AT+CLASS=C|(% style="width:166px" %)Set the Device Class.|(% style="width:175px" %)OK(((
686 -
687 687  )))
688 688  
713 +(% style="display:none" %) (%%)
714 +
689 689  == 7.3 Duty Cycle Setting ==
690 690  
691 691  
... ... @@ -701,9 +701,10 @@
701 701  OK
702 702  )))
703 703  |(% style="width:165px" %)AT+DCS=1|(% style="width:239px" %)Set the ETSI Duty Cycle setting.|(% style="width:107px" %)OK(((
704 -
705 705  )))
706 706  
732 +(% style="display:none" %) (%%)
733 +
707 707  == 7.4 Data Rate ==
708 708  
709 709  
... ... @@ -734,6 +734,7 @@
734 734  * **Example 1**: Downlink Payload: **220001FF**  ~/~/ Set AT+DR=1.
735 735  * **Example 2**: Downlink Payload: **220000FF**  ~/~/ Set AT+DR=0.
736 736  
764 +(% style="display:none" %) (%%)
737 737  
738 738  == 7.5 Frame Counter Downlink ==
739 739  
... ... @@ -767,9 +767,10 @@
767 767  OK
768 768  )))
769 769  |(% style="width:177px" %)AT+FCU=10|(% style="width:239px" %)Set the Frame Counter Uplink.|(% style="width:113px" %)OK(((
770 -
771 771  )))
772 772  
800 +(% style="display:none" %) (%%)
801 +
773 773  == 7.7 Join Accept Delay1 ==
774 774  
775 775  
... ... @@ -785,9 +785,10 @@
785 785  OK
786 786  )))
787 787  |(% style="width:164px" %)AT+JN1DL=10000|(% style="width:229px" %)Set the Join Accept Delay.|(% style="width:140px" %)OK(((
788 -
789 789  )))
790 790  
819 +(% style="display:none" %) (%%)
820 +
791 791  == 7.8 Join Accept Delay2 ==
792 792  
793 793  
... ... @@ -803,9 +803,10 @@
803 803  OK
804 804  )))
805 805  |(% style="width:160px" %)AT+JN2DL=20000|(% style="width:228px" %)Set the Join Accept Delay.|(% style="width:146px" %)OK(((
806 -
807 807  )))
808 808  
838 +(% style="display:none" %) (%%)
839 +
809 809  == 7.9 Public Network Mode ==
810 810  
811 811  
... ... @@ -833,6 +833,8 @@
833 833  )))
834 834  |(% style="width:166px" %)AT+PNM=0|(% style="width:225px" %)Set to use private network autoset syncword=0x12|(% style="width:272px" %)
835 835  
867 +(% style="display:none" %) (%%)
868 +
836 836  == 7.10 Receive Delay1 ==
837 837  
838 838  
... ... @@ -848,9 +848,10 @@
848 848  OK
849 849  )))
850 850  |(% style="width:155px" %)AT+RX1DL=1500|(% style="width:128px" %)Set the delay.|(% style="width:122px" %)OK(((
851 -
852 852  )))
853 853  
886 +(% style="display:none" %) (%%)
887 +
854 854  == 7.11 Receive Delay2 ==
855 855  
856 856  
... ... @@ -866,9 +866,10 @@
866 866  OK
867 867  )))
868 868  |(% style="width:175px" %)AT+RX2DL=2500|(% style="width:152px" %)Set the delay.|(% style="width:150px" %)OK(((
869 -
870 870  )))
871 871  
905 +(% style="display:none" %) (%%)
906 +
872 872  == 7.12 Rx2 Window Data Rate ==
873 873  
874 874  
... ... @@ -884,9 +884,10 @@
884 884  OK
885 885  )))
886 886  |(% style="width:160px" %)AT+RX2DR=6|(% style="width:232px" %)Set the Rx2 window data rate.|(% style="width:130px" %)OK(((
887 -
888 888  )))
889 889  
924 +(% style="display:none" %) (%%)
925 +
890 890  == 7.13 Rx2 Window Frequency ==
891 891  
892 892  
... ... @@ -902,9 +902,10 @@
902 902  OK
903 903  )))
904 904  |(% style="width:183px" %)AT+RX2FQ=434665000|(% style="width:240px" %)Set the Rx2 window frequency.|(% style="width:160px" %)OK(((
905 -
906 906  )))
907 907  
943 +(% style="display:none" %) (%%)
944 +
908 908  == 7.14 Transmit Power ==
909 909  
910 910  
... ... @@ -922,7 +922,6 @@
922 922  OK
923 923  )))
924 924  |(% style="width:161px" %)AT+TXP=1|(% style="width:189px" %)Set the Transmit Power.|(% style="width:112px" %)OK(((
925 -
926 926  )))
927 927  
928 928  Downlink Payload. The 4th byte of 0x22 downlink.
... ... @@ -932,6 +932,8 @@
932 932  * **Example 1**: Downlink Payload: **22000102**  ~/~/ Set AT+TXP=2.
933 933  * **Example 2**: Downlink Payload: **220000FF**  ~/~/ Set AT+TXP=0.
934 934  
971 +(% style="display:none" %) (%%)
972 +
935 935  == 7.15 RSSI of the Last Received Packet ==
936 936  
937 937  
... ... @@ -947,6 +947,8 @@
947 947  OK
948 948  )))
949 949  
988 +(% style="display:none" %) (%%)
989 +
950 950  == 7.16 SNR of the Last Received Packet ==
951 951  
952 952  
... ... @@ -962,6 +962,8 @@
962 962  OK
963 963  )))
964 964  
1005 +(% style="display:none" %) (%%)
1006 +
965 965  == 7.17 Application Port ==
966 966  
967 967  
... ... @@ -987,6 +987,8 @@
987 987  * **Example 1**: Downlink Payload: **2301**  ~/~/ set the application port to 1
988 988  * **Example 2**: Downlink Payload:** 2305**  ~/~/ set the application port to 5
989 989  
1032 +(% style="display:none" %) (%%)
1033 +
990 990  == 7.18 Single Channel Mode ==
991 991  
992 992  
... ... @@ -1003,6 +1003,8 @@
1003 1003  )))
1004 1004  |(% style="width:182px" %)AT+CHS=868100000|(% style="width:295px" %)Set Frequency for Single Channel Mode|(% style="width:122px" %)OK
1005 1005  
1050 +(% style="display:none" %) (%%)
1051 +
1006 1006  == 7.19 Eight Channel Mode ==
1007 1007  
1008 1008  
... ... @@ -1021,7 +1021,7 @@
1021 1021  )))
1022 1022  |(% style="width:160px" %)AT+CHE=1|(% style="width:198px" %)Set eight channels mode|(% style="width:349px" %)OK
1023 1023  
1024 -(% style="color:blue" %)**Downlink Command: 0x24**
1070 +(% style="color:blue" %)**Downlink Command: 0x24 (LHT65,LHT65N Downlink Command:0x07)**
1025 1025  
1026 1026  Format: Command Code (0x24) followed by 1 bytes channel value.
1027 1027  
... ... @@ -1030,6 +1030,8 @@
1030 1030  * **Example 1**: Downlink Payload: 2401  ~/~/ set channel mode to 1
1031 1031  * **Example 2**: Downlink Payload: 2405  ~/~/ set channel mode to 5
1032 1032  
1079 +(% style="display:none" %) (%%)
1080 +
1033 1033  == 7.20 Get or Set RXwindows1 timeout ==
1034 1034  
1035 1035  
... ... @@ -1046,25 +1046,18 @@
1046 1046  )))
1047 1047  |(% style="width:163px" %)AT+RX1WTO=60|(% style="width:201px" %)Set RXwindows1 timeout|(% style="width:93px" %)OK
1048 1048  
1097 +(% style="display:none" %) (%%)
1049 1049  (((
1050 -
1051 -
1052 -
1053 1053  (% 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.
1054 -
1055 -
1056 1056  )))
1057 1057  
1058 1058  [[image:image-20220526162535-1.png]]
1059 1059  
1060 -
1061 1061  (((
1062 1062  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.
1063 -
1064 -
1065 -
1066 1066  )))
1067 1067  
1108 +
1068 1068  == 7.21 Get or Set RXwindows2 timeout ==
1069 1069  
1070 1070  
... ... @@ -1180,6 +1180,11 @@
1180 1180  
1181 1181  (% style="color:blue" %)**AT Command: AT+DDETECT**
1182 1182  
1224 +AT+DDETECT=<Flag>,<ACK_Timout_1>,<ACK_Timout_2> (Default Value: AT+DDETECT=1,1440,2880)
1225 +
1226 +* ACK_Timout_1: Unit: min
1227 +* ACK_Timout_2: Unit: min
1228 +
1183 1183  (% border="1" style="background-color:#ffffcc; color:green; width:710.222px" %)
1184 1184  |=(% colspan="3" style="width: 707px;" %)AT+**DDETECT**
1185 1185  |(% style="width:160px" %)**Command Example**|(% style="width:198px" %)**Function**|(% style="width:349px" %)**Response**
... ... @@ -1211,13 +1211,17 @@
1211 1211  OK
1212 1212  )))
1213 1213  
1214 -(% style="color:blue" %)**Downlink Command: 0x33**
1260 +(% style="color:blue" %)**Downlink Command: 0x32**
1215 1215  
1216 1216  Format: Command Code (0x32) followed by 2 bytes mode value.
1217 1217  
1218 -If the downlink payload=320105A00B40, it means set end node to use confirm mode, while type code is 33.
1264 +If the downlink payload=320105A00B40, it means set end node to use confirm mode, while type code is 32.
1219 1219  
1220 -* **Example 1:** Downlink Payload: 320105A00B40  ~/~/ Set AT+DDETECT=1,1440,2880
1266 +* **Example 1:** Downlink Payload: 320105A00B40  ~/~/ Set AT+DDETECT=1,1440,2880
1267 +** 0x01 : Flag
1268 +** 0x05A0: ACK_Timout_1 : 1440minutes (24 hours)
1269 +** 0x0B40: ACK_Timout_2 : 2880minutes (48 hours)
1270 +** **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.
1221 1221  
1222 1222  == 7.26 Request the server to send an ACK ==
1223 1223  
... ... @@ -1244,13 +1244,13 @@
1244 1244  (% border="1" style="background-color:#ffffcc; color:green; width:727.222px" %)
1245 1245  |=(% colspan="3" style="width: 724px;" %)AT+RJTDC
1246 1246  |(% style="width:165px" %)**Command Example**|(% style="width:227px" %)**Function**|(% style="width:329px" %)**Response**
1247 -|(% style="width:165px" %)AT+RJTDC=?|(% style="width:227px" %)Show the ReJoin data transmission interval in min|(% style="width:329px" %)30000(((
1297 +|(% style="width:165px" %)AT+RJTDC=?|(% style="width:227px" %)Show the ReJoin data transmission interval in min|(% style="width:329px" %)30(((
1248 1248  OK
1249 1249  
1250 -the interval is 30000ms = 30s
1300 +the interval is 30 min
1251 1251  )))
1252 -|(% style="width:165px" %)AT+RJTDC=60000|(% style="width:227px" %)Set the ReJoin data transmission interval in min|(% style="width:329px" %)OK(((
1253 -Set the ReJoin data transmission interval to 60000ms = 60 seconds
1302 +|(% style="width:165px" %)AT+RJTDC=60|(% style="width:227px" %)Set the ReJoin data transmission interval in min|(% style="width:329px" %)OK(((
1303 +Set the ReJoin data transmission interval to 60 min
1254 1254  )))
1255 1255  
1256 1256  (% style="color:blue" %)**Downlink Command: 0x26**
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0