<
From version < 1.4 >
edited by Xiaoling
on 2022/05/10 17:05
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
... ... @@ -1,8 +1,6 @@
1 1  Contens
2 2  
3 3  {{toc/}}
4 -{{velocity}}$xwiki.ssfx.use("js/xwiki/table/table.css")
5 -$xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js", true){{/velocity}}
6 6  
7 7  
8 8  = 1. Introduction =
... ... @@ -9,10 +9,10 @@
9 9  
10 10  Dragino LoRaWAN End Node support two types of AT Commands and Downlink Commands:
11 11  
12 -* **Common Commands:** They should be available for each sensor, such as: change uplink interval, reset device.
13 -* **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.
14 14  
15 -**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.
16 16  
17 17  
18 18  = 2. How to use AT Commands or Downlink command =
... ... @@ -24,10 +24,11 @@
24 24  ** See use note for more serves [[Servers Note>>url:https://wiki.dragino.com/index.php/Main_Page#Use_Note_for_Server]]
25 25  
26 26  
25 +\\
26 +
27 27  = 3. Support End Node and firmware version =
28 28  
29 -(% style="background-color:#ffffcc; color:green; margin-left:auto; margin-right:auto" %)
30 -|=(% colspan="3" %) Dragino STM32 base hardware Firmware / LoRaWAN stack list
29 +|=(% colspan="3" %)Dragino STM32 base hardware Firmware / LoRaWAN stack list
31 31  |**Model**|**Description**|**Firmware Version <~-~-> Stack Version**
32 32  |[[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;(((
33 33  LSN50 v1.7.0 <~-~-> DR-LWS-005; ~-~-> Support since this version
... ... @@ -41,6 +41,7 @@
41 41  LHT65 v1.8.0 <~-~-> DR-LWS-005;~-~-> Support since this version
42 42  )))
43 43  
43 +
44 44  = 4. System Management Commands =
45 45  
46 46  == 4.1 Change Uplink Interval ==
... ... @@ -60,6 +60,7 @@
60 60  Set transmit interval to 60000ms = 60 seconds
61 61  )))
62 62  
63 +
63 63  Downlink Command: 0x01
64 64  
65 65  Format: Command Code (0x01) followed by 3 bytes time value.
... ... @@ -127,7 +127,7 @@
127 127  
128 128  |=(% colspan="3" %)AT+VER: Image Version and Frequency Band
129 129  |**Command Example**|**Function**|**Response**
130 -|AT+VER=?|Show Image version and Frequency Band|
131 +|AT+VER=?|Show Image version and Frequency Band|
131 131  
132 132  {{{1.3 EU868
133 133  OK
... ... @@ -146,6 +146,7 @@
146 146  * 0x00 02: LBT1
147 147  * 0x00 03: LSE01/LDDS75/LDDS20/LSPH01/LLMS01/LSNPK01
148 148  
150 +
149 149  yy: Frequency Band:
150 150  
151 151  * 0x01: EU868
... ... @@ -172,7 +172,7 @@
172 172  
173 173  |=(% colspan="3" %)AT+CFG: Print all configurations
174 174  |**Command Example**|**Function**|**Response**
175 -|AT+CFG|Show all configures|
177 +|AT+CFG|Show all configures|
176 176  
177 177  {{{AT+DEUI = XX XX XX XX XX XX XX XX
178 178  AT+DADDR=XXXXXXXX
... ... @@ -198,6 +198,7 @@
198 198  )))
199 199  |AT+APPEUI=00 b3 d5 7e f0 00 4d 34|Set the Application EUI|OK
200 200  
203 +
201 201  == 5.2 Application Key ==
202 202  
203 203  Feature: Get or Set the Application Key.
... ... @@ -211,6 +211,7 @@
211 211  )))
212 212  |AT+APPKEY=00 35 55 55 22 23 55 53 43 24 23 42 34 35 35 35|Set the Application Key.|OK
213 213  
217 +
214 214  == 5.3 Application Session Key ==
215 215  
216 216  Feature: Get or Set the Application Session Key.
... ... @@ -226,6 +226,7 @@
226 226  OK
227 227  )))
228 228  
233 +
229 229  == 5.4 Device Address ==
230 230  
231 231  Feature: Get or Set the Device Address.
... ... @@ -241,6 +241,7 @@
241 241  )))
242 242  |AT+DADDR=A8 40 41 FF|Set the Application Session Key.|OK
243 243  
249 +
244 244  == 5.5 Device EUI ==
245 245  
246 246  Feature: Get or Set the Device EUI.
... ... @@ -256,6 +256,7 @@
256 256  OK
257 257  )))
258 258  
265 +
259 259  == 5.6 Network ID ==
260 260  
261 261  Feature: Get or Set the Network ID.(You can enter this command change only after successful network connection)
... ... @@ -269,6 +269,7 @@
269 269  )))
270 270  |AT+NWKID=A8 40 41 FF|Set the Network ID.|OK
271 271  
279 +
272 272  == 5.7 Network Session Key ==
273 273  
274 274  Feature: Get or Set the Network Session Key
... ... @@ -282,6 +282,7 @@
282 282  )))
283 283  |AT+NWKSKEY=A8 40 41 FF FF 12 34 56 00 01 02 04 05 06 06 07|Set the Network Session Key.|OK
284 284  
293 +
285 285  = 6. Joining and sending date on LoRaWAN network =
286 286  
287 287  == 6.1 Confirm Mode ==
... ... @@ -298,6 +298,7 @@
298 298  |AT+CFM=1|Set the confirmation mode|OK
299 299  |AT+CFM=2|Set the confirmation mode|While Error in format, return AT_PARAM_ERROR
300 300  
310 +
301 301  Downlink Command: 0x05
302 302  
303 303  Format: Command Code (0x05) followed by 2 bytes mode value.
... ... @@ -307,6 +307,7 @@
307 307  * Example 1: Downlink Payload: 0501 ~/~/ Set AT+CFM=1
308 308  * Example 2: Downlink Payload: 0500 ~/~/ Set AT+CFM=0
309 309  
320 +
310 310  == 6.2 Confirm Status ==
311 311  
312 312  Feature: Get confirmation status of the last AT+SEND (0-1).
... ... @@ -319,6 +319,7 @@
319 319  OK
320 320  )))
321 321  
333 +
322 322  == 6.3 Join LoRa® Network ==
323 323  
324 324  Feature: Join network.
... ... @@ -333,6 +333,7 @@
333 333  While Error in format, return AT_BUSY_ERROR
334 334  )))
335 335  
348 +
336 336  == 6.4 LoRa® Network Join Mode ==
337 337  
338 338  Feature: Get or Set the Network Join Mode. (0: ABP, 1: OTAA).
... ... @@ -347,6 +347,7 @@
347 347  |AT+NJM=0|Set the Network Join Mode|OK
348 348  |AT+NJM=2|Set the Network Join Mode|While Error in format, return AT_PARAM_ERROR
349 349  
363 +
350 350  Downlink Command: 0x20
351 351  
352 352  Format: Command Code (0x20) followed by 1 bytes mode value.
... ... @@ -356,6 +356,7 @@
356 356  * Example 1: Downlink Payload: 2000 ~/~/ Set AT+NJM=O
357 357  * Example 2: Downlink Payload: 2001 ~/~/ Set AT+NJM=1
358 358  
373 +
359 359  == 6.5 LoRa® Network Join Status ==
360 360  
361 361  Feature: LoRa® Network Join Status.
... ... @@ -368,6 +368,7 @@
368 368  OK
369 369  )))
370 370  
386 +
371 371  == 6.6 Print Last Received Data in Raw Format ==
372 372  
373 373  Feature: Print Last Received Data in Raw Format<port:data>.
... ... @@ -380,6 +380,7 @@
380 380  OK
381 381  )))
382 382  
399 +
383 383  == 6.7 Print Last Received Data in Binary Format ==
384 384  
385 385  Feature: Print Last Received Data in Binary Format<port:data>.
... ... @@ -392,6 +392,7 @@
392 392  OK
393 393  )))
394 394  
412 +
395 395  == 6.8 Send Text Data ==
396 396  
397 397  Feature: Send Text Data<port:data>.
... ... @@ -408,6 +408,7 @@
408 408  
409 409  )))
410 410  
429 +
411 411  == 6.9 Send Hexadecimal Data ==
412 412  
413 413  Feature: Send hexadecimal data along with the application port.
... ... @@ -423,6 +423,7 @@
423 423  
424 424  )))
425 425  
445 +
426 426  = 7. LoRaWAN network management =
427 427  
428 428  == 7.1 Adaptive Data Rate ==
... ... @@ -442,6 +442,7 @@
442 442  AT_PARAM_ERROR
443 443  )))
444 444  
465 +
445 445  Downlink Command: 0x22
446 446  
447 447  
... ... @@ -450,6 +450,7 @@
450 450  * Example 1: Downlink Payload: 2201 ~/~/ Set AT+ADR=1.
451 451  * Example 2: Downlink Payload: 2200FFFF ~/~/ Set AT+ADR=0.
452 452  
474 +
453 453  == 7.2 LoRa® Class ==
454 454  
455 455  Feature: Get or Set the Device Class(Currently only support class A, class C).
... ... @@ -465,6 +465,7 @@
465 465  
466 466  )))
467 467  
490 +
468 468  == 7.3 Duty Cycle Setting ==
469 469  
470 470  Feature: Get or Set the ETSI Duty Cycle setting - 0=disable, 1=enable - Only for testing.
... ... @@ -480,6 +480,7 @@
480 480  
481 481  )))
482 482  
506 +
483 483  == 7.4 Data Rate ==
484 484  
485 485  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
... ... @@ -495,6 +495,7 @@
495 495  
496 496  )))
497 497  
522 +
498 498  Downlink Command: 0x2200aaFF
499 499  
500 500  
... ... @@ -503,6 +503,7 @@
503 503  * Example 1: Downlink Payload: 220001FF ~/~/ Set AT+DR=1.
504 504  * Example 2: Downlink Payload: 220000FF ~/~/ Set AT+DR=0.
505 505  
531 +
506 506  == 7.5 Frame Counter Downlink ==
507 507  
508 508  Feature: Get or Set the Frame Counter Downlink.
... ... @@ -520,6 +520,7 @@
520 520  
521 521  )))
522 522  
549 +
523 523  == 7.6 Frame Counter Uplink ==
524 524  
525 525  Feature: Get or Set the Frame Counter Uplink.
... ... @@ -535,6 +535,7 @@
535 535  
536 536  )))
537 537  
565 +
538 538  == 7.7 Join Accept Delay1 ==
539 539  
540 540  Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 1 in ms.
... ... @@ -550,6 +550,7 @@
550 550  
551 551  )))
552 552  
581 +
553 553  == 7.8 Join Accept Delay2 ==
554 554  
555 555  Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 2 in ms.
... ... @@ -565,6 +565,7 @@
565 565  
566 566  )))
567 567  
597 +
568 568  == 7.9 Public Network Mode ==
569 569  
570 570  Feature: Get or Set the public network mode. (0: off, 1: on)
... ... @@ -582,6 +582,7 @@
582 582  
583 583  )))
584 584  
615 +
585 585  == 7.10 Receive Delay1 ==
586 586  
587 587  Feature: Get or Set the delay between the end of the Tx and the Rx Window 1 in ms
... ... @@ -597,6 +597,7 @@
597 597  
598 598  )))
599 599  
631 +
600 600  == 7.11Receive Delay2 ==
601 601  
602 602  Feature: Get or Set the delay between the end of the Tx and the Rx Window 2 in ms
... ... @@ -612,6 +612,7 @@
612 612  
613 613  )))
614 614  
647 +
615 615  == 7.12 Rx2 Window Data Rate ==
616 616  
617 617  Feature: Get or Set the Rx2 window data rate (0-7 corresponding to DR_X)
... ... @@ -627,6 +627,7 @@
627 627  
628 628  )))
629 629  
663 +
630 630  == 7.13 Rx2 Window Frequency ==
631 631  
632 632  Feature: Get or Set the Rx2 window frequency
... ... @@ -642,6 +642,7 @@
642 642  
643 643  )))
644 644  
679 +
645 645  == 7.14 Transmit Power ==
646 646  
647 647  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. )
... ... @@ -664,6 +664,7 @@
664 664  * Example 1: Downlink Payload: 22000102 ~/~/ Set AT+TXP=2.
665 665  * Example 2: Downlink Payload: 220000FF ~/~/ Set AT+TXP=0.
666 666  
702 +
667 667  == 7.15 RSSI of the Last Received Packet ==
668 668  
669 669  Feature: Get or Set the Rx2 window frequency
... ... @@ -676,6 +676,7 @@
676 676  OK
677 677  )))
678 678  
715 +
679 679  == 7.16 SNR of the Last Received Packet ==
680 680  
681 681  Feature: Get the SNR of the last received packet
... ... @@ -688,6 +688,7 @@
688 688  OK
689 689  )))
690 690  
728 +
691 691  == 7.17 Application Port ==
692 692  
693 693  Feature: Get or set the application port.
... ... @@ -701,6 +701,7 @@
701 701  )))
702 702  |AT+PORT=21|Set the application port|OK
703 703  
742 +
704 704  Downlink Command: 0x23
705 705  
706 706  Format: Command Code (0x23) followed by 1 bytes port value.
... ... @@ -710,6 +710,7 @@
710 710  * Example 1: Downlink Payload: 2301 ~/~/ set the application port to 1
711 711  * Example 2: Downlink Payload: 2305 ~/~/ set the application port to 5
712 712  
752 +
713 713  == 7.18 Single Channel Mode ==
714 714  
715 715  Feature:Get or Set Frequency (Unit: Hz) for Single Channel Mode.
... ... @@ -723,6 +723,7 @@
723 723  )))
724 724  |AT+CHS=868100000|Set Frequency for Single Channel Mode|OK
725 725  
766 +
726 726  == 7.19 Eight Channel Mode ==
727 727  
728 728  Feature: Get or Set eight channels mode,Only for US915,AU915,CN470.
... ... @@ -738,6 +738,7 @@
738 738  )))
739 739  |AT+CHE=1|Set eight channels mode|OK
740 740  
782 +
741 741  Downlink Command: 0x24
742 742  
743 743  Format: Command Code (0x24) followed by 1 bytes channel value.
... ... @@ -747,6 +747,7 @@
747 747  * Example 1: Downlink Payload: 2401 ~/~/ set channel mode to 1
748 748  * Example 2: Downlink Payload: 2405 ~/~/ set channel mode to 5
749 749  
792 +
750 750  == 7.20 Get or Set RXwindows1 timeout ==
751 751  
752 752  Feature:Get or Set the number of symbols to detect and timeout from RXwindow1(0 to 255).
... ... @@ -779,6 +779,7 @@
779 779  )))
780 780  |AT+RX2WTO=20|Set RXwindows2 timeout|OK
781 781  
825 +
782 782  == 7.22 Setting up uplinkdwelltime (as923, au915) ==
783 783  
784 784  Feature: Get or Set uplinkdwelltime
... ... @@ -792,6 +792,7 @@
792 792  )))
793 793  |AT+DWELLT=0|Set uplinkdwelltime|OK
794 794  
839 +
795 795  Downlink Command: 0x25
796 796  
797 797  Format: Command Code (0x25) followed by 1 bytes state value.
... ... @@ -801,6 +801,7 @@
801 801  * Example 1: Downlink Payload: 2501 ~/~/ set uplinkdwelltime to 1
802 802  * Example 2: Downlink Payload: 2500 ~/~/ set uplinkdwelltime to 0
803 803  
849 +
804 804  == 7.23 Set Packet Receiving Response Level ==
805 805  
806 806  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.
... ... @@ -819,6 +819,7 @@
819 819  * For Class C devices used in ChirpStack, need to set AT+RPL=4 because Chirpstack require immedietely reply message to MAC Command.
820 820  * 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.
821 821  
868 +
822 822  AT Command: AT+RPL
823 823  
824 824  |=(% colspan="3" %)AT+RPL
... ... @@ -828,6 +828,7 @@
828 828  )))
829 829  |AT+RPL=0|Set packet receiving response level|OK
830 830  
878 +
831 831  Downlink Command: 0x21
832 832  
833 833  Format: Command Code (0x21) followed by 1 bytes level value.
... ... @@ -837,6 +837,7 @@
837 837  * Example 1: Downlink Payload: 2101 ~/~/ set packet receiving response level to 1
838 838  * Example 2: Downlink Payload: 2102 ~/~/ set packet receiving response level to 2
839 839  
888 +
840 840  = 8. AT Commands Combination =
841 841  
842 842  == 8.1 Set a fix RX2DR for downlink window ==
... ... @@ -844,6 +844,7 @@
844 844  * AT+ADR=0 ~-~-> Disable ADR first
845 845  * AT+RX2DR=xxxx ~-~-> Set xxxx to your wanted DataRate
846 846  
896 +
847 847  == 8.2 Use Downlink Command to set a fix uplink DR ==
848 848  
849 849  Downlink Command: 0x22000500
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0