<
From version < 4.2 >
edited by Xiaoling
on 2022/05/10 17:34
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,41 +44,35 @@
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 -
82 82  |=(% colspan="3" %)ATZ: Trig a reset of the MCU
83 83  |**Command Example**|**Function**|**Response**
84 84  |ATZ|Reset MCU|Device reset and show booting info
... ... @@ -131,7 +131,7 @@
131 131  
132 132  |=(% colspan="3" %)AT+VER: Image Version and Frequency Band
133 133  |**Command Example**|**Function**|**Response**
134 -|AT+VER=?|Show Image version and Frequency Band|
131 +|AT+VER=?|Show Image version and Frequency Band|
135 135  
136 136  {{{1.3 EU868
137 137  OK
... ... @@ -150,6 +150,7 @@
150 150  * 0x00 02: LBT1
151 151  * 0x00 03: LSE01/LDDS75/LDDS20/LSPH01/LLMS01/LSNPK01
152 152  
150 +
153 153  yy: Frequency Band:
154 154  
155 155  * 0x01: EU868
... ... @@ -176,7 +176,7 @@
176 176  
177 177  |=(% colspan="3" %)AT+CFG: Print all configurations
178 178  |**Command Example**|**Function**|**Response**
179 -|AT+CFG|Show all configures|
177 +|AT+CFG|Show all configures|
180 180  
181 181  {{{AT+DEUI = XX XX XX XX XX XX XX XX
182 182  AT+DADDR=XXXXXXXX
... ... @@ -202,6 +202,7 @@
202 202  )))
203 203  |AT+APPEUI=00 b3 d5 7e f0 00 4d 34|Set the Application EUI|OK
204 204  
203 +
205 205  == 5.2 Application Key ==
206 206  
207 207  Feature: Get or Set the Application Key.
... ... @@ -215,6 +215,7 @@
215 215  )))
216 216  |AT+APPKEY=00 35 55 55 22 23 55 53 43 24 23 42 34 35 35 35|Set the Application Key.|OK
217 217  
217 +
218 218  == 5.3 Application Session Key ==
219 219  
220 220  Feature: Get or Set the Application Session Key.
... ... @@ -230,6 +230,7 @@
230 230  OK
231 231  )))
232 232  
233 +
233 233  == 5.4 Device Address ==
234 234  
235 235  Feature: Get or Set the Device Address.
... ... @@ -245,6 +245,7 @@
245 245  )))
246 246  |AT+DADDR=A8 40 41 FF|Set the Application Session Key.|OK
247 247  
249 +
248 248  == 5.5 Device EUI ==
249 249  
250 250  Feature: Get or Set the Device EUI.
... ... @@ -260,6 +260,7 @@
260 260  OK
261 261  )))
262 262  
265 +
263 263  == 5.6 Network ID ==
264 264  
265 265  Feature: Get or Set the Network ID.(You can enter this command change only after successful network connection)
... ... @@ -273,6 +273,7 @@
273 273  )))
274 274  |AT+NWKID=A8 40 41 FF|Set the Network ID.|OK
275 275  
279 +
276 276  == 5.7 Network Session Key ==
277 277  
278 278  Feature: Get or Set the Network Session Key
... ... @@ -286,6 +286,7 @@
286 286  )))
287 287  |AT+NWKSKEY=A8 40 41 FF FF 12 34 56 00 01 02 04 05 06 06 07|Set the Network Session Key.|OK
288 288  
293 +
289 289  = 6. Joining and sending date on LoRaWAN network =
290 290  
291 291  == 6.1 Confirm Mode ==
... ... @@ -302,6 +302,7 @@
302 302  |AT+CFM=1|Set the confirmation mode|OK
303 303  |AT+CFM=2|Set the confirmation mode|While Error in format, return AT_PARAM_ERROR
304 304  
310 +
305 305  Downlink Command: 0x05
306 306  
307 307  Format: Command Code (0x05) followed by 2 bytes mode value.
... ... @@ -311,6 +311,7 @@
311 311  * Example 1: Downlink Payload: 0501 ~/~/ Set AT+CFM=1
312 312  * Example 2: Downlink Payload: 0500 ~/~/ Set AT+CFM=0
313 313  
320 +
314 314  == 6.2 Confirm Status ==
315 315  
316 316  Feature: Get confirmation status of the last AT+SEND (0-1).
... ... @@ -323,6 +323,7 @@
323 323  OK
324 324  )))
325 325  
333 +
326 326  == 6.3 Join LoRa® Network ==
327 327  
328 328  Feature: Join network.
... ... @@ -337,6 +337,7 @@
337 337  While Error in format, return AT_BUSY_ERROR
338 338  )))
339 339  
348 +
340 340  == 6.4 LoRa® Network Join Mode ==
341 341  
342 342  Feature: Get or Set the Network Join Mode. (0: ABP, 1: OTAA).
... ... @@ -351,6 +351,7 @@
351 351  |AT+NJM=0|Set the Network Join Mode|OK
352 352  |AT+NJM=2|Set the Network Join Mode|While Error in format, return AT_PARAM_ERROR
353 353  
363 +
354 354  Downlink Command: 0x20
355 355  
356 356  Format: Command Code (0x20) followed by 1 bytes mode value.
... ... @@ -360,6 +360,7 @@
360 360  * Example 1: Downlink Payload: 2000 ~/~/ Set AT+NJM=O
361 361  * Example 2: Downlink Payload: 2001 ~/~/ Set AT+NJM=1
362 362  
373 +
363 363  == 6.5 LoRa® Network Join Status ==
364 364  
365 365  Feature: LoRa® Network Join Status.
... ... @@ -372,6 +372,7 @@
372 372  OK
373 373  )))
374 374  
386 +
375 375  == 6.6 Print Last Received Data in Raw Format ==
376 376  
377 377  Feature: Print Last Received Data in Raw Format<port:data>.
... ... @@ -384,6 +384,7 @@
384 384  OK
385 385  )))
386 386  
399 +
387 387  == 6.7 Print Last Received Data in Binary Format ==
388 388  
389 389  Feature: Print Last Received Data in Binary Format<port:data>.
... ... @@ -396,6 +396,7 @@
396 396  OK
397 397  )))
398 398  
412 +
399 399  == 6.8 Send Text Data ==
400 400  
401 401  Feature: Send Text Data<port:data>.
... ... @@ -412,6 +412,7 @@
412 412  
413 413  )))
414 414  
429 +
415 415  == 6.9 Send Hexadecimal Data ==
416 416  
417 417  Feature: Send hexadecimal data along with the application port.
... ... @@ -427,6 +427,7 @@
427 427  
428 428  )))
429 429  
445 +
430 430  = 7. LoRaWAN network management =
431 431  
432 432  == 7.1 Adaptive Data Rate ==
... ... @@ -446,6 +446,7 @@
446 446  AT_PARAM_ERROR
447 447  )))
448 448  
465 +
449 449  Downlink Command: 0x22
450 450  
451 451  
... ... @@ -454,6 +454,7 @@
454 454  * Example 1: Downlink Payload: 2201 ~/~/ Set AT+ADR=1.
455 455  * Example 2: Downlink Payload: 2200FFFF ~/~/ Set AT+ADR=0.
456 456  
474 +
457 457  == 7.2 LoRa® Class ==
458 458  
459 459  Feature: Get or Set the Device Class(Currently only support class A, class C).
... ... @@ -469,6 +469,7 @@
469 469  
470 470  )))
471 471  
490 +
472 472  == 7.3 Duty Cycle Setting ==
473 473  
474 474  Feature: Get or Set the ETSI Duty Cycle setting - 0=disable, 1=enable - Only for testing.
... ... @@ -484,6 +484,7 @@
484 484  
485 485  )))
486 486  
506 +
487 487  == 7.4 Data Rate ==
488 488  
489 489  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
... ... @@ -499,6 +499,7 @@
499 499  
500 500  )))
501 501  
522 +
502 502  Downlink Command: 0x2200aaFF
503 503  
504 504  
... ... @@ -507,6 +507,7 @@
507 507  * Example 1: Downlink Payload: 220001FF ~/~/ Set AT+DR=1.
508 508  * Example 2: Downlink Payload: 220000FF ~/~/ Set AT+DR=0.
509 509  
531 +
510 510  == 7.5 Frame Counter Downlink ==
511 511  
512 512  Feature: Get or Set the Frame Counter Downlink.
... ... @@ -524,6 +524,7 @@
524 524  
525 525  )))
526 526  
549 +
527 527  == 7.6 Frame Counter Uplink ==
528 528  
529 529  Feature: Get or Set the Frame Counter Uplink.
... ... @@ -539,6 +539,7 @@
539 539  
540 540  )))
541 541  
565 +
542 542  == 7.7 Join Accept Delay1 ==
543 543  
544 544  Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 1 in ms.
... ... @@ -554,6 +554,7 @@
554 554  
555 555  )))
556 556  
581 +
557 557  == 7.8 Join Accept Delay2 ==
558 558  
559 559  Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 2 in ms.
... ... @@ -569,6 +569,7 @@
569 569  
570 570  )))
571 571  
597 +
572 572  == 7.9 Public Network Mode ==
573 573  
574 574  Feature: Get or Set the public network mode. (0: off, 1: on)
... ... @@ -586,6 +586,7 @@
586 586  
587 587  )))
588 588  
615 +
589 589  == 7.10 Receive Delay1 ==
590 590  
591 591  Feature: Get or Set the delay between the end of the Tx and the Rx Window 1 in ms
... ... @@ -601,6 +601,7 @@
601 601  
602 602  )))
603 603  
631 +
604 604  == 7.11Receive Delay2 ==
605 605  
606 606  Feature: Get or Set the delay between the end of the Tx and the Rx Window 2 in ms
... ... @@ -616,6 +616,7 @@
616 616  
617 617  )))
618 618  
647 +
619 619  == 7.12 Rx2 Window Data Rate ==
620 620  
621 621  Feature: Get or Set the Rx2 window data rate (0-7 corresponding to DR_X)
... ... @@ -631,6 +631,7 @@
631 631  
632 632  )))
633 633  
663 +
634 634  == 7.13 Rx2 Window Frequency ==
635 635  
636 636  Feature: Get or Set the Rx2 window frequency
... ... @@ -646,6 +646,7 @@
646 646  
647 647  )))
648 648  
679 +
649 649  == 7.14 Transmit Power ==
650 650  
651 651  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. )
... ... @@ -668,6 +668,7 @@
668 668  * Example 1: Downlink Payload: 22000102 ~/~/ Set AT+TXP=2.
669 669  * Example 2: Downlink Payload: 220000FF ~/~/ Set AT+TXP=0.
670 670  
702 +
671 671  == 7.15 RSSI of the Last Received Packet ==
672 672  
673 673  Feature: Get or Set the Rx2 window frequency
... ... @@ -680,6 +680,7 @@
680 680  OK
681 681  )))
682 682  
715 +
683 683  == 7.16 SNR of the Last Received Packet ==
684 684  
685 685  Feature: Get the SNR of the last received packet
... ... @@ -692,6 +692,7 @@
692 692  OK
693 693  )))
694 694  
728 +
695 695  == 7.17 Application Port ==
696 696  
697 697  Feature: Get or set the application port.
... ... @@ -705,6 +705,7 @@
705 705  )))
706 706  |AT+PORT=21|Set the application port|OK
707 707  
742 +
708 708  Downlink Command: 0x23
709 709  
710 710  Format: Command Code (0x23) followed by 1 bytes port value.
... ... @@ -714,6 +714,7 @@
714 714  * Example 1: Downlink Payload: 2301 ~/~/ set the application port to 1
715 715  * Example 2: Downlink Payload: 2305 ~/~/ set the application port to 5
716 716  
752 +
717 717  == 7.18 Single Channel Mode ==
718 718  
719 719  Feature:Get or Set Frequency (Unit: Hz) for Single Channel Mode.
... ... @@ -727,6 +727,7 @@
727 727  )))
728 728  |AT+CHS=868100000|Set Frequency for Single Channel Mode|OK
729 729  
766 +
730 730  == 7.19 Eight Channel Mode ==
731 731  
732 732  Feature: Get or Set eight channels mode,Only for US915,AU915,CN470.
... ... @@ -742,6 +742,7 @@
742 742  )))
743 743  |AT+CHE=1|Set eight channels mode|OK
744 744  
782 +
745 745  Downlink Command: 0x24
746 746  
747 747  Format: Command Code (0x24) followed by 1 bytes channel value.
... ... @@ -751,6 +751,7 @@
751 751  * Example 1: Downlink Payload: 2401 ~/~/ set channel mode to 1
752 752  * Example 2: Downlink Payload: 2405 ~/~/ set channel mode to 5
753 753  
792 +
754 754  == 7.20 Get or Set RXwindows1 timeout ==
755 755  
756 756  Feature:Get or Set the number of symbols to detect and timeout from RXwindow1(0 to 255).
... ... @@ -783,6 +783,7 @@
783 783  )))
784 784  |AT+RX2WTO=20|Set RXwindows2 timeout|OK
785 785  
825 +
786 786  == 7.22 Setting up uplinkdwelltime (as923, au915) ==
787 787  
788 788  Feature: Get or Set uplinkdwelltime
... ... @@ -796,6 +796,7 @@
796 796  )))
797 797  |AT+DWELLT=0|Set uplinkdwelltime|OK
798 798  
839 +
799 799  Downlink Command: 0x25
800 800  
801 801  Format: Command Code (0x25) followed by 1 bytes state value.
... ... @@ -805,6 +805,7 @@
805 805  * Example 1: Downlink Payload: 2501 ~/~/ set uplinkdwelltime to 1
806 806  * Example 2: Downlink Payload: 2500 ~/~/ set uplinkdwelltime to 0
807 807  
849 +
808 808  == 7.23 Set Packet Receiving Response Level ==
809 809  
810 810  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.
... ... @@ -823,6 +823,7 @@
823 823  * For Class C devices used in ChirpStack, need to set AT+RPL=4 because Chirpstack require immedietely reply message to MAC Command.
824 824  * 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.
825 825  
868 +
826 826  AT Command: AT+RPL
827 827  
828 828  |=(% colspan="3" %)AT+RPL
... ... @@ -832,6 +832,7 @@
832 832  )))
833 833  |AT+RPL=0|Set packet receiving response level|OK
834 834  
878 +
835 835  Downlink Command: 0x21
836 836  
837 837  Format: Command Code (0x21) followed by 1 bytes level value.
... ... @@ -841,6 +841,7 @@
841 841  * Example 1: Downlink Payload: 2101 ~/~/ set packet receiving response level to 1
842 842  * Example 2: Downlink Payload: 2102 ~/~/ set packet receiving response level to 2
843 843  
888 +
844 844  = 8. AT Commands Combination =
845 845  
846 846  == 8.1 Set a fix RX2DR for downlink window ==
... ... @@ -848,6 +848,7 @@
848 848  * AT+ADR=0 ~-~-> Disable ADR first
849 849  * AT+RX2DR=xxxx ~-~-> Set xxxx to your wanted DataRate
850 850  
896 +
851 851  == 8.2 Use Downlink Command to set a fix uplink DR ==
852 852  
853 853  Downlink Command: 0x22000500
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0