<
From version < 4.3 >
edited by Xiaoling
on 2022/05/10 18:27
To version < 1.3 >
edited by Xiaoling
on 2022/05/10 16:14
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -7,10 +7,10 @@
7 7  
8 8  Dragino LoRaWAN End Node support two types of AT Commands and Downlink Commands:
9 9  
10 -* **Common Commands:** They should be available for each sensor, such as: change uplink interval, reset device.
11 -* **Sensor Related Commands:** Only for special sensor, such as control relay, poll RS485 device.
10 +* Common Commands: They should be available for each sensor, such as: change uplink interval, reset device.
11 +* Sensor Related Commands: Only for special sensor, such as control relay, poll RS485 device.
12 12  
13 -**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.**
13 +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.
14 14  
15 15  
16 16  = 2. How to use AT Commands or Downlink command =
... ... @@ -21,23 +21,26 @@
21 21  ** Use Base64 format to send a downlink: [[Chirpstack>>url:https://wiki.dragino.com/index.php/Notes_for_ChirpStack#Downlink]].
22 22  ** See use note for more serves [[Servers Note>>url:https://wiki.dragino.com/index.php/Main_Page#Use_Note_for_Server]]
23 23  
24 +
25 +\\
26 +
24 24  = 3. Support End Node and firmware version =
25 25  
26 -(% border="1" style="background-color:#ffffcc; color:green; width:957.222px" %)
27 -|=(% colspan="3" style="width: 954px;Alignment:center" %) Dragino STM32 base hardware Firmware / LoRaWAN stack list
28 -|(% style="width:198px" %)**Model**|(% style="width:311px" %)**Description**|(% style="width:444px" %)**Firmware Version <~-~-> Stack Version**
29 -|(% style="width:198px" %)[[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]],|(% style="width:311px" %)Open Source Generic LoRaWAN Sensor Node|(% style="width:444px" %)LSN50 v1.6.0 <~-~-> DR-LWS-003;(((
29 +|=(% colspan="3" %)Dragino STM32 base hardware Firmware / LoRaWAN stack list
30 +|**Model**|**Description**|**Firmware Version <~-~-> Stack Version**
31 +|[[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]],|Open Source Generic LoRaWAN Sensor Node|LSN50 v1.6.0 <~-~-> DR-LWS-003;(((
30 30  LSN50 v1.7.0 <~-~-> DR-LWS-005; ~-~-> Support since this version
31 31  )))
32 -|(% style="width:198px" %)[[LGT92>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/142-lgt-92.html]],|(% style="width:311px" %)LoRaWAN GPS Tracker|(% style="width:444px" %)LGT92 v1.6.3 <~-~-> DR-LWS-003;(((
34 +|[[LGT92>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/142-lgt-92.html]],|LoRaWAN GPS Tracker|LGT92 v1.6.3 <~-~-> DR-LWS-003;(((
33 33  LGT92 v1.6.4 <~-~-> DR-LWS-005;~-~-> Support since this version
34 34  )))
35 -|(% style="width:198px" %)[[LBT1>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/165-lbt1.html]],|(% style="width:311px" %)LoRaWAN BLE Indoor Tracker|(% style="width:444px" %)LBT1 v1.0 <~-~-> DR-LWS-005;
36 -|(% style="width:198px" %)[[RS485-LN>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/154-rs485-ln.html]],|(% style="width:311px" %)LoRaWAN RS485 Modbus Converter|(% style="width:444px" %)RS485-LN v1.3 <~-~-> DR-LWS-005;
37 -|(% style="width:198px" %)[[LHT65>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/151-lht65.html]],|(% style="width:311px" %)LoRaWAN Temperature & Humidity Sensor|(% style="width:444px" %)LHT65 v1.7 <~-~-> DR-LWS-003;(((
37 +|[[LBT1>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/165-lbt1.html]],|LoRaWAN BLE Indoor Tracker|LBT1 v1.0 <~-~-> DR-LWS-005;
38 +|[[RS485-LN>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/154-rs485-ln.html]],|LoRaWAN RS485 Modbus Converter|RS485-LN v1.3 <~-~-> DR-LWS-005;
39 +|[[LHT65>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/151-lht65.html]],|LoRaWAN Temperature & Humidity Sensor|LHT65 v1.7 <~-~-> DR-LWS-003;(((
38 38  LHT65 v1.8.0 <~-~-> DR-LWS-005;~-~-> Support since this version
39 39  )))
40 40  
43 +
41 41  = 4. System Management Commands =
42 42  
43 43  == 4.1 Change Uplink Interval ==
... ... @@ -44,57 +44,48 @@
44 44  
45 45  Feature: Change LoRaWAN End Node Transmit Interval.
46 46  
47 -(% class="box infomessage" %)
48 -(((
49 49  AT Command: AT+TDC
50 -)))
51 51  
52 -(% border="1" style="background-color:#ffffcc; color:green; width:727.222px" %)
53 -|=(% colspan="3" style="width: 724px;Alignment" %) AT+TDC
54 -|(% style="width:168px" %)**Command Example**|(% style="width:223px" %)**Function**|(% style="width:333px" %)**Response**
55 -|(% style="width:168px" %)AT+TDC=?|(% style="width:223px" %)Show current transmit Interval|(% style="width:333px" %)30000(((
52 +|=(% colspan="3" %)AT+TDC
53 +|**Command Example**|**Function**|**Response**
54 +|AT+TDC=?|Show current transmit Interval|30000(((
56 56  OK
57 57  
58 58  the interval is 30000ms = 30s
59 59  )))
60 -|(% style="width:168px" %)AT+TDC=60000|(% style="width:223px" %)Set Transmit Interval|(% style="width:333px" %)OK(((
59 +|AT+TDC=60000|Set Transmit Interval|OK(((
61 61  Set transmit interval to 60000ms = 60 seconds
62 62  )))
63 63  
64 -**Downlink Command: 0x01**
65 65  
64 +Downlink Command: 0x01
65 +
66 66  Format: Command Code (0x01) followed by 3 bytes time value.
67 67  
68 68  If the downlink payload=0100003C, it means set the END Node’s Transmit Interval to 0x00003C=60(S), while type code is 01.
69 69  
70 -* **Example 1**: Downlink Payload:** 0100001E** ~/~/ Set Transmit Interval (TDC) = 30 seconds
71 -* **Example 2**: Downlink Payload:** 0100003C** ~/~/ Set Transmit Interval (TDC) = 60 seconds
70 +* Example 1: Downlink Payload: 0100001E ~/~/ Set Transmit Interval (TDC) = 30 seconds
71 +* Example 2: Downlink Payload: 0100003C ~/~/ Set Transmit Interval (TDC) = 60 seconds
72 72  
73 73  == 4.2 Reboot End Node ==
74 74  
75 75  Feature: Reboot End Node to perform a new OTAA or ABP Join.
76 76  
77 -{{info}}
78 78  AT Command: ATZ
79 -{{/info}}
80 80  
81 -(% border="1" style="background-color:#ffffcc; color:green; width:727.222px" %)
82 82  |=(% colspan="3" %)ATZ: Trig a reset of the MCU
83 83  |**Command Example**|**Function**|**Response**
84 -|ATZ|Reset MCU|(((
85 -Device reset and show booting info
81 +|ATZ|Reset MCU|Device reset and show booting info
86 86  
87 -LSN50 Device/LoRa ST Module
88 -
83 +{{{LSN50 Device/LoRa ST Module
89 89  Image Version: XX
90 -
91 91  Frequency Band: XX
92 -
93 93  DevEui= XX XX XX XX XX XX XX XX
94 94  
95 95  <followed by the Tx and Rx information>
96 -)))
89 +}}}
97 97  
91 +
98 98  Downlink Command: 0x04
99 99  
100 100  Format: Command Code (0x04) followed by FF.
... ... @@ -134,7 +134,7 @@
134 134  
135 135  |=(% colspan="3" %)AT+VER: Image Version and Frequency Band
136 136  |**Command Example**|**Function**|**Response**
137 -|AT+VER=?|Show Image version and Frequency Band|
131 +|AT+VER=?|Show Image version and Frequency Band|
138 138  
139 139  {{{1.3 EU868
140 140  OK
... ... @@ -153,6 +153,7 @@
153 153  * 0x00 02: LBT1
154 154  * 0x00 03: LSE01/LDDS75/LDDS20/LSPH01/LLMS01/LSNPK01
155 155  
150 +
156 156  yy: Frequency Band:
157 157  
158 158  * 0x01: EU868
... ... @@ -179,7 +179,7 @@
179 179  
180 180  |=(% colspan="3" %)AT+CFG: Print all configurations
181 181  |**Command Example**|**Function**|**Response**
182 -|AT+CFG|Show all configures|
177 +|AT+CFG|Show all configures|
183 183  
184 184  {{{AT+DEUI = XX XX XX XX XX XX XX XX
185 185  AT+DADDR=XXXXXXXX
... ... @@ -205,6 +205,7 @@
205 205  )))
206 206  |AT+APPEUI=00 b3 d5 7e f0 00 4d 34|Set the Application EUI|OK
207 207  
203 +
208 208  == 5.2 Application Key ==
209 209  
210 210  Feature: Get or Set the Application Key.
... ... @@ -218,6 +218,7 @@
218 218  )))
219 219  |AT+APPKEY=00 35 55 55 22 23 55 53 43 24 23 42 34 35 35 35|Set the Application Key.|OK
220 220  
217 +
221 221  == 5.3 Application Session Key ==
222 222  
223 223  Feature: Get or Set the Application Session Key.
... ... @@ -233,6 +233,7 @@
233 233  OK
234 234  )))
235 235  
233 +
236 236  == 5.4 Device Address ==
237 237  
238 238  Feature: Get or Set the Device Address.
... ... @@ -248,6 +248,7 @@
248 248  )))
249 249  |AT+DADDR=A8 40 41 FF|Set the Application Session Key.|OK
250 250  
249 +
251 251  == 5.5 Device EUI ==
252 252  
253 253  Feature: Get or Set the Device EUI.
... ... @@ -263,6 +263,7 @@
263 263  OK
264 264  )))
265 265  
265 +
266 266  == 5.6 Network ID ==
267 267  
268 268  Feature: Get or Set the Network ID.(You can enter this command change only after successful network connection)
... ... @@ -276,6 +276,7 @@
276 276  )))
277 277  |AT+NWKID=A8 40 41 FF|Set the Network ID.|OK
278 278  
279 +
279 279  == 5.7 Network Session Key ==
280 280  
281 281  Feature: Get or Set the Network Session Key
... ... @@ -289,6 +289,7 @@
289 289  )))
290 290  |AT+NWKSKEY=A8 40 41 FF FF 12 34 56 00 01 02 04 05 06 06 07|Set the Network Session Key.|OK
291 291  
293 +
292 292  = 6. Joining and sending date on LoRaWAN network =
293 293  
294 294  == 6.1 Confirm Mode ==
... ... @@ -305,6 +305,7 @@
305 305  |AT+CFM=1|Set the confirmation mode|OK
306 306  |AT+CFM=2|Set the confirmation mode|While Error in format, return AT_PARAM_ERROR
307 307  
310 +
308 308  Downlink Command: 0x05
309 309  
310 310  Format: Command Code (0x05) followed by 2 bytes mode value.
... ... @@ -314,6 +314,7 @@
314 314  * Example 1: Downlink Payload: 0501 ~/~/ Set AT+CFM=1
315 315  * Example 2: Downlink Payload: 0500 ~/~/ Set AT+CFM=0
316 316  
320 +
317 317  == 6.2 Confirm Status ==
318 318  
319 319  Feature: Get confirmation status of the last AT+SEND (0-1).
... ... @@ -326,6 +326,7 @@
326 326  OK
327 327  )))
328 328  
333 +
329 329  == 6.3 Join LoRa® Network ==
330 330  
331 331  Feature: Join network.
... ... @@ -340,6 +340,7 @@
340 340  While Error in format, return AT_BUSY_ERROR
341 341  )))
342 342  
348 +
343 343  == 6.4 LoRa® Network Join Mode ==
344 344  
345 345  Feature: Get or Set the Network Join Mode. (0: ABP, 1: OTAA).
... ... @@ -354,6 +354,7 @@
354 354  |AT+NJM=0|Set the Network Join Mode|OK
355 355  |AT+NJM=2|Set the Network Join Mode|While Error in format, return AT_PARAM_ERROR
356 356  
363 +
357 357  Downlink Command: 0x20
358 358  
359 359  Format: Command Code (0x20) followed by 1 bytes mode value.
... ... @@ -363,6 +363,7 @@
363 363  * Example 1: Downlink Payload: 2000 ~/~/ Set AT+NJM=O
364 364  * Example 2: Downlink Payload: 2001 ~/~/ Set AT+NJM=1
365 365  
373 +
366 366  == 6.5 LoRa® Network Join Status ==
367 367  
368 368  Feature: LoRa® Network Join Status.
... ... @@ -375,6 +375,7 @@
375 375  OK
376 376  )))
377 377  
386 +
378 378  == 6.6 Print Last Received Data in Raw Format ==
379 379  
380 380  Feature: Print Last Received Data in Raw Format<port:data>.
... ... @@ -387,6 +387,7 @@
387 387  OK
388 388  )))
389 389  
399 +
390 390  == 6.7 Print Last Received Data in Binary Format ==
391 391  
392 392  Feature: Print Last Received Data in Binary Format<port:data>.
... ... @@ -399,6 +399,7 @@
399 399  OK
400 400  )))
401 401  
412 +
402 402  == 6.8 Send Text Data ==
403 403  
404 404  Feature: Send Text Data<port:data>.
... ... @@ -415,6 +415,7 @@
415 415  
416 416  )))
417 417  
429 +
418 418  == 6.9 Send Hexadecimal Data ==
419 419  
420 420  Feature: Send hexadecimal data along with the application port.
... ... @@ -430,6 +430,7 @@
430 430  
431 431  )))
432 432  
445 +
433 433  = 7. LoRaWAN network management =
434 434  
435 435  == 7.1 Adaptive Data Rate ==
... ... @@ -449,6 +449,7 @@
449 449  AT_PARAM_ERROR
450 450  )))
451 451  
465 +
452 452  Downlink Command: 0x22
453 453  
454 454  
... ... @@ -457,6 +457,7 @@
457 457  * Example 1: Downlink Payload: 2201 ~/~/ Set AT+ADR=1.
458 458  * Example 2: Downlink Payload: 2200FFFF ~/~/ Set AT+ADR=0.
459 459  
474 +
460 460  == 7.2 LoRa® Class ==
461 461  
462 462  Feature: Get or Set the Device Class(Currently only support class A, class C).
... ... @@ -472,6 +472,7 @@
472 472  
473 473  )))
474 474  
490 +
475 475  == 7.3 Duty Cycle Setting ==
476 476  
477 477  Feature: Get or Set the ETSI Duty Cycle setting - 0=disable, 1=enable - Only for testing.
... ... @@ -487,6 +487,7 @@
487 487  
488 488  )))
489 489  
506 +
490 490  == 7.4 Data Rate ==
491 491  
492 492  Feature: Get or Set the Data Rate. (0-7 corresponding to DR_X) . 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
... ... @@ -502,6 +502,7 @@
502 502  
503 503  )))
504 504  
522 +
505 505  Downlink Command: 0x2200aaFF
506 506  
507 507  
... ... @@ -510,6 +510,7 @@
510 510  * Example 1: Downlink Payload: 220001FF ~/~/ Set AT+DR=1.
511 511  * Example 2: Downlink Payload: 220000FF ~/~/ Set AT+DR=0.
512 512  
531 +
513 513  == 7.5 Frame Counter Downlink ==
514 514  
515 515  Feature: Get or Set the Frame Counter Downlink.
... ... @@ -527,6 +527,7 @@
527 527  
528 528  )))
529 529  
549 +
530 530  == 7.6 Frame Counter Uplink ==
531 531  
532 532  Feature: Get or Set the Frame Counter Uplink.
... ... @@ -542,6 +542,7 @@
542 542  
543 543  )))
544 544  
565 +
545 545  == 7.7 Join Accept Delay1 ==
546 546  
547 547  Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 1 in ms.
... ... @@ -557,6 +557,7 @@
557 557  
558 558  )))
559 559  
581 +
560 560  == 7.8 Join Accept Delay2 ==
561 561  
562 562  Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 2 in ms.
... ... @@ -572,6 +572,7 @@
572 572  
573 573  )))
574 574  
597 +
575 575  == 7.9 Public Network Mode ==
576 576  
577 577  Feature: Get or Set the public network mode. (0: off, 1: on)
... ... @@ -589,6 +589,7 @@
589 589  
590 590  )))
591 591  
615 +
592 592  == 7.10 Receive Delay1 ==
593 593  
594 594  Feature: Get or Set the delay between the end of the Tx and the Rx Window 1 in ms
... ... @@ -604,6 +604,7 @@
604 604  
605 605  )))
606 606  
631 +
607 607  == 7.11Receive Delay2 ==
608 608  
609 609  Feature: Get or Set the delay between the end of the Tx and the Rx Window 2 in ms
... ... @@ -619,6 +619,7 @@
619 619  
620 620  )))
621 621  
647 +
622 622  == 7.12 Rx2 Window Data Rate ==
623 623  
624 624  Feature: Get or Set the Rx2 window data rate (0-7 corresponding to DR_X)
... ... @@ -634,6 +634,7 @@
634 634  
635 635  )))
636 636  
663 +
637 637  == 7.13 Rx2 Window Frequency ==
638 638  
639 639  Feature: Get or Set the Rx2 window frequency
... ... @@ -649,6 +649,7 @@
649 649  
650 650  )))
651 651  
679 +
652 652  == 7.14 Transmit Power ==
653 653  
654 654  Feature: Get or Set the Transmit Power(0-5, MAX:0, MIN:5, according to LoRaWAN Spec, or 40=10dB, 41 = 11dB, …, 50 = 20dB which is out of LoRaWAN spec. )
... ... @@ -671,6 +671,7 @@
671 671  * Example 1: Downlink Payload: 22000102 ~/~/ Set AT+TXP=2.
672 672  * Example 2: Downlink Payload: 220000FF ~/~/ Set AT+TXP=0.
673 673  
702 +
674 674  == 7.15 RSSI of the Last Received Packet ==
675 675  
676 676  Feature: Get or Set the Rx2 window frequency
... ... @@ -683,6 +683,7 @@
683 683  OK
684 684  )))
685 685  
715 +
686 686  == 7.16 SNR of the Last Received Packet ==
687 687  
688 688  Feature: Get the SNR of the last received packet
... ... @@ -695,6 +695,7 @@
695 695  OK
696 696  )))
697 697  
728 +
698 698  == 7.17 Application Port ==
699 699  
700 700  Feature: Get or set the application port.
... ... @@ -708,6 +708,7 @@
708 708  )))
709 709  |AT+PORT=21|Set the application port|OK
710 710  
742 +
711 711  Downlink Command: 0x23
712 712  
713 713  Format: Command Code (0x23) followed by 1 bytes port value.
... ... @@ -717,6 +717,7 @@
717 717  * Example 1: Downlink Payload: 2301 ~/~/ set the application port to 1
718 718  * Example 2: Downlink Payload: 2305 ~/~/ set the application port to 5
719 719  
752 +
720 720  == 7.18 Single Channel Mode ==
721 721  
722 722  Feature:Get or Set Frequency (Unit: Hz) for Single Channel Mode.
... ... @@ -730,6 +730,7 @@
730 730  )))
731 731  |AT+CHS=868100000|Set Frequency for Single Channel Mode|OK
732 732  
766 +
733 733  == 7.19 Eight Channel Mode ==
734 734  
735 735  Feature: Get or Set eight channels mode,Only for US915,AU915,CN470.
... ... @@ -745,6 +745,7 @@
745 745  )))
746 746  |AT+CHE=1|Set eight channels mode|OK
747 747  
782 +
748 748  Downlink Command: 0x24
749 749  
750 750  Format: Command Code (0x24) followed by 1 bytes channel value.
... ... @@ -754,6 +754,7 @@
754 754  * Example 1: Downlink Payload: 2401 ~/~/ set channel mode to 1
755 755  * Example 2: Downlink Payload: 2405 ~/~/ set channel mode to 5
756 756  
792 +
757 757  == 7.20 Get or Set RXwindows1 timeout ==
758 758  
759 759  Feature:Get or Set the number of symbols to detect and timeout from RXwindow1(0 to 255).
... ... @@ -786,6 +786,7 @@
786 786  )))
787 787  |AT+RX2WTO=20|Set RXwindows2 timeout|OK
788 788  
825 +
789 789  == 7.22 Setting up uplinkdwelltime (as923, au915) ==
790 790  
791 791  Feature: Get or Set uplinkdwelltime
... ... @@ -799,6 +799,7 @@
799 799  )))
800 800  |AT+DWELLT=0|Set uplinkdwelltime|OK
801 801  
839 +
802 802  Downlink Command: 0x25
803 803  
804 804  Format: Command Code (0x25) followed by 1 bytes state value.
... ... @@ -808,6 +808,7 @@
808 808  * Example 1: Downlink Payload: 2501 ~/~/ set uplinkdwelltime to 1
809 809  * Example 2: Downlink Payload: 2500 ~/~/ set uplinkdwelltime to 0
810 810  
849 +
811 811  == 7.23 Set Packet Receiving Response Level ==
812 812  
813 813  Feature: Get or Set packet receiving response level. This feature is used to set compatible with different LoRaWAN servers. If RPL doesn;t match , user will see strange message in the server portal.
... ... @@ -826,6 +826,7 @@
826 826  * For Class C devices used in ChirpStack, need to set AT+RPL=4 because Chirpstack require immedietely reply message to MAC Command.
827 827  * 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.
828 828  
868 +
829 829  AT Command: AT+RPL
830 830  
831 831  |=(% colspan="3" %)AT+RPL
... ... @@ -835,6 +835,7 @@
835 835  )))
836 836  |AT+RPL=0|Set packet receiving response level|OK
837 837  
878 +
838 838  Downlink Command: 0x21
839 839  
840 840  Format: Command Code (0x21) followed by 1 bytes level value.
... ... @@ -844,6 +844,7 @@
844 844  * Example 1: Downlink Payload: 2101 ~/~/ set packet receiving response level to 1
845 845  * Example 2: Downlink Payload: 2102 ~/~/ set packet receiving response level to 2
846 846  
888 +
847 847  = 8. AT Commands Combination =
848 848  
849 849  == 8.1 Set a fix RX2DR for downlink window ==
... ... @@ -851,6 +851,7 @@
851 851  * AT+ADR=0 ~-~-> Disable ADR first
852 852  * AT+RX2DR=xxxx ~-~-> Set xxxx to your wanted DataRate
853 853  
896 +
854 854  == 8.2 Use Downlink Command to set a fix uplink DR ==
855 855  
856 856  Downlink Command: 0x22000500
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0