Changes for page End Device AT Commands and Downlink Command
Last modified by kai on 2024/09/06 10:00
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Edwin1 +XWiki.Xiaoling - Content
-
... ... @@ -9,8 +9,8 @@ 9 9 10 10 Dragino LoRaWAN End Node support two types of AT Commands and Downlink Commands: 11 11 12 -* (% style="color:blue" %)**Common Commands:**(%%)They should be available for each sensor, such as: change uplink interval, reset device.13 -* (% style="color:blue" %)**Sensor Related Commands:**(%%)Only for special sensor, such as control relay, poll RS485 device.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. 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.** ... ... @@ -25,9 +25,11 @@ 25 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 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: 27 27 ** Use HEX format to send a downlink: [[TTN v3>>Notes for TTN]] 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]]?28 +** Use Base64 format to send a downlink: [[Chirpstack>>Notes for ChirpStack]] 29 29 ** See use note for more serves [[Servers Note>>doc:Main.WebHome]](IoT LoRaWAN Server) 30 30 31 + 32 + 31 31 = 3. Support End Node and firmware version = 32 32 33 33 ... ... @@ -102,8 +102,12 @@ 102 102 ))) 103 103 ))) 104 104 107 + 108 + 109 + 105 105 = 4. System Management Commands = 106 106 112 + 107 107 == 4.1 Change Uplink Interval == 108 108 109 109 ... ... @@ -133,12 +133,16 @@ 133 133 ))) 134 134 135 135 ((( 136 -If the downlink payload=0100003C, it means set the END Node 's Transmit Interval to 0x00003C=60(S), while type code is 01.142 +If the downlink payload=0100003C, it means set the END Node’s Transmit Interval to 0x00003C=60(S), while type code is 01. 137 137 ))) 138 138 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 148 + 149 + 150 + 151 + 142 142 == 4.2 Reboot End Node == 143 143 144 144 ... ... @@ -304,8 +304,12 @@ 304 304 OK 305 305 ))) 306 306 317 + 318 + 319 + 307 307 = 5. Keys, IDs and EUIs management = 308 308 322 + 309 309 == 5.1 Application EUI == 310 310 311 311 ... ... @@ -322,6 +322,9 @@ 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 339 + 340 + 341 + 325 325 == 5.2 Application Key == 326 326 327 327 ... ... @@ -338,6 +338,9 @@ 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 358 + 359 + 360 + 341 341 == 5.3 Application Session Key == 342 342 343 343 ... ... @@ -356,6 +356,9 @@ 356 356 OK 357 357 ))) 358 358 379 + 380 + 381 + 359 359 == 5.4 Device Address == 360 360 361 361 ... ... @@ -374,6 +374,9 @@ 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 400 + 401 + 402 + 377 377 == 5.5 Device EUI == 378 378 379 379 ... ... @@ -392,6 +392,9 @@ 392 392 OK 393 393 ))) 394 394 421 + 422 + 423 + 395 395 == 5.6 Network ID == 396 396 397 397 ... ... @@ -408,6 +408,9 @@ 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 440 + 441 + 442 + 411 411 == 5.7 Network Session Key == 412 412 413 413 ... ... @@ -424,10 +424,15 @@ 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 459 + 460 + 461 + 427 427 = 6. Joining and sending date on LoRaWAN network = 428 428 464 + 429 429 == 6.1 Confirm Mode == 430 430 467 + 431 431 === 6.1.1 AT+CFM command before DR-LWS007 software stack === 432 432 433 433 ... ... @@ -454,6 +454,9 @@ 454 454 * **Example 1:** Downlink Payload: 0501 ~/~/ Set AT+CFM=1 455 455 * **Example 2:** Downlink Payload: 0500 ~/~/ Set AT+CFM=0 456 456 494 + 495 + 496 + 457 457 === 6.1.2 AT+CFM command since DR-LWS007 software stack === 458 458 459 459 ... ... @@ -499,6 +499,9 @@ 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 542 + 543 + 544 + 502 502 == 6.2 Confirm Status == 503 503 504 504 ... ... @@ -514,6 +514,9 @@ 514 514 OK 515 515 ))) 516 516 560 + 561 + 562 + 517 517 == 6.3 Join LoRa® Network == 518 518 519 519 ... ... @@ -531,6 +531,9 @@ 531 531 While Error in format, return AT_BUSY_ERROR 532 532 ))) 533 533 580 + 581 + 582 + 534 534 == 6.4 LoRa® Network Join Mode == 535 535 536 536 ... ... @@ -557,6 +557,9 @@ 557 557 * **Example 1: **Downlink Payload: **2000 ** ~/~/ Set AT+NJM=0 558 558 * **Example 2:** Downlink Payload: **2001** ~/~/ Set AT+NJM=1 559 559 609 + 610 + 611 + 560 560 == 6.5 LoRa® Network Join Status == 561 561 562 562 ... ... @@ -572,6 +572,9 @@ 572 572 OK 573 573 ))) 574 574 627 + 628 + 629 + 575 575 == 6.6 Print Last Received Data in Raw Format == 576 576 577 577 ... ... @@ -587,6 +587,9 @@ 587 587 OK 588 588 ))) 589 589 645 + 646 + 647 + 590 590 == 6.7 Print Last Received Data in Binary Format == 591 591 592 592 ... ... @@ -602,6 +602,9 @@ 602 602 OK 603 603 ))) 604 604 663 + 664 + 665 + 605 605 == 6.8 Send Text Data == 606 606 607 607 ... ... @@ -621,6 +621,9 @@ 621 621 622 622 ))) 623 623 685 + 686 + 687 + 624 624 == 6.9 Send Hexadecimal Data == 625 625 626 626 ... ... @@ -629,18 +629,22 @@ 629 629 630 630 (% style="color:blue" %)**AT Command: AT+SENDB** 631 631 632 -(% border="1" style="background-color:#ffffcc; color:green; width:110 1px" %)633 -|=(% colspan="3" style="width: 1 098px;" %)AT+SENDB634 -|(% style="width:257px" %)**Command Example**|(% style="width: 394px" %)**Function**|(% style="width:446px" %)**Response**635 -|(% style="width:257px" %)AT+SENDB=12:abcdef0123456789|(% style="width: 394px" %)Send hexadecimal data along with the application port.|(% style="width:446px" %)OK636 -|(% 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(((696 +(% border="1" style="background-color:#ffffcc; color:green; width:1120.22px" %) 697 +|=(% colspan="3" style="width: 1117px;" %)AT+SENDB 698 +|(% style="width:257px" %)**Command Example**|(% style="width:406px" %)**Function**|(% style="width:453px" %)**Response** 699 +|(% style="width:257px" %)AT+SENDB=12:abcdef0123456789|(% style="width:406px" %)Send hexadecimal data along with the application port.|(% style="width:453px" %)OK 700 +|(% style="width:257px" %)AT+SENDB=abcdef0123456789|(% style="width:406px" %)Send hexadecimal data along with the application port.|(% style="width:453px" %)While Error in format, return((( 637 637 AT_PARAM_ERROR AT_BUSY_ERROR/AT_NO_NETWORK_JOINED 638 638 639 639 640 640 ))) 641 641 706 + 707 + 708 + 642 642 = 7. LoRaWAN network management = 643 643 711 + 644 644 == 7.1 Adaptive Data Rate == 645 645 646 646 ... ... @@ -668,6 +668,9 @@ 668 668 * **Example 2**: Downlink Payload: **2200FFFF** ~/~/ Set AT+ADR=0. 669 669 670 670 739 + 740 + 741 + 671 671 == 7.2 LoRa® Class == 672 672 673 673 ... ... @@ -674,7 +674,7 @@ 674 674 Feature: Get or Set the Device Class(Currently only support class A, class C). 675 675 676 676 677 -(% style="color:blue" %)**AT Command: 748 +(% style="color:blue" %)**AT Command:AT+CLASS** 678 678 679 679 (% border="1" style="background-color:#ffffcc; color:green; width:507.222px" %) 680 680 |=(% colspan="3" style="width: 504px;" %)AT+CLASS ... ... @@ -686,13 +686,16 @@ 686 686 687 687 ))) 688 688 760 + 761 + 762 + 689 689 == 7.3 Duty Cycle Setting == 690 690 691 691 692 -Feature: Get or Set the ETSI Duty Cycle setting **- 0**=disable,**1**=enable - Only for testing.766 +Feature: Get or Set the ETSI Duty Cycle setting - 0=disable, 1=enable - Only for testing. 693 693 694 694 695 -(% style="color:blue" %)**AT Command: 769 +(% style="color:blue" %)**AT Command:AT+DCS** 696 696 697 697 (% border="1" style="background-color:#ffffcc; color:green; width:515.222px" %) 698 698 |=(% colspan="3" style="width: 512px;" %)AT+DCS ... ... @@ -707,14 +707,9 @@ 707 707 == 7.4 Data Rate == 708 708 709 709 710 -Feature: Get or Set the Data Rate. (0-7 corresponding to DR_X) . 784 +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 711 711 712 -(% style="color:red" %) 713 -**Notice:** 714 714 715 -* User need to set Adaptive Data Rate(ADR)=0 first. otherwise device will respond to server's ADR command and change the DR according to server auto-adjustment. 716 -* Data Rate specifies Spreading Factor. The mapping varies in different frequency bands. User can check this link for detail. [[rp2-1.0.3-lorawan-regional-parameters.pdf>>https://lora-alliance.org/resource_hub/rp2-1-0-3-lorawan-regional-parameters/]] 717 - 718 718 (% style="color:blue" %)**AT Command: AT+DR** 719 719 720 720 (% border="1" style="background-color:#ffffcc; color:green; width:466.222px" %) ... ... @@ -734,7 +734,6 @@ 734 734 * **Example 1**: Downlink Payload: **220001FF** ~/~/ Set AT+DR=1. 735 735 * **Example 2**: Downlink Payload: **220000FF** ~/~/ Set AT+DR=0. 736 736 737 - 738 738 == 7.5 Frame Counter Downlink == 739 739 740 740 ... ... @@ -741,7 +741,7 @@ 741 741 Feature: Get or Set the Frame Counter Downlink. 742 742 743 743 744 -(% style="color:blue" %)**AT Command: 812 +(% style="color:blue" %)**AT Command:AT+FCD** 745 745 746 746 (% border="1" style="background-color:#ffffcc; color:green; width:693.222px" %) 747 747 |=(% colspan="3" style="width: 690px;" %)AT+FCD ... ... @@ -758,7 +758,7 @@ 758 758 Feature: Get or Set the Frame Counter Uplink. 759 759 760 760 761 -(% style="color:blue" %)**AT Command: 829 +(% style="color:blue" %)**AT Command:AT+FCU** 762 762 763 763 (% border="1" style="background-color:#ffffcc; color:green; width:534.222px" %) 764 764 |=(% colspan="3" style="width: 531px;" %)AT+FCU ... ... @@ -776,7 +776,7 @@ 776 776 Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 1 in ms. 777 777 778 778 779 -(% style="color:blue" %)**AT Command: 847 +(% style="color:blue" %)**AT Command:AT+JN1DL** 780 780 781 781 (% border="1" style="background-color:#ffffcc; color:green; width:537.222px" %) 782 782 |=(% colspan="3" style="width: 534px;" %)AT+JN1DL ... ... @@ -790,11 +790,10 @@ 790 790 791 791 == 7.8 Join Accept Delay2 == 792 792 793 - 794 794 Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 2 in ms. 795 795 796 796 797 -(% style="color:blue" %)**AT Command: 864 +(% style="color:blue" %)**AT Command:AT+JN2DL** 798 798 799 799 (% border="1" style="background-color:#ffffcc; color:green; width:538.222px" %) 800 800 |=(% colspan="3" style="width: 535px;" %)AT+JN2DL ... ... @@ -814,7 +814,7 @@ 814 814 (% style="color:red" %)**Notice: If user build their own LoRaWAN server but still use syncword=0x34, this is still considered a public LoRaWAN network.** 815 815 816 816 817 -(% style="color:blue" %)**AT Command: 884 +(% style="color:blue" %)**AT Command:AT+PNM** 818 818 819 819 (% border="1" style="background-color:#ffffcc; color:green; width:667.222px" %) 820 820 |=(% colspan="3" style="width: 664px;" %)AT+PNM ... ... @@ -839,7 +839,7 @@ 839 839 Feature: Get or Set the delay between the end of the Tx and the Rx Window 1 in ms 840 840 841 841 842 -(% style="color:blue" %)**AT Command: 909 +(% style="color:blue" %)**AT Command:AT+RX1DL** 843 843 844 844 (% border="1" style="background-color:#ffffcc; color:green; width:408.222px" %) 845 845 |=(% colspan="3" style="width: 405px;" %)AT+RX1DL ... ... @@ -857,7 +857,7 @@ 857 857 Feature: Get or Set the delay between the end of the Tx and the Rx Window 2 in ms 858 858 859 859 860 -(% style="color:blue" %)**AT Command: 927 +(% style="color:blue" %)**AT Command:AT+RX2DL** 861 861 862 862 (% border="1" style="background-color:#ffffcc; color:green; width:481.222px" %) 863 863 |=(% colspan="3" style="width: 478px;" %)AT+RX2DL ... ... @@ -875,7 +875,7 @@ 875 875 Feature: Get or Set the Rx2 window data rate (0-7 corresponding to DR_X) 876 876 877 877 878 -(% style="color:blue" %)**AT Command: 945 +(% style="color:blue" %)**AT Command:AT+RX2DR** 879 879 880 880 (% border="1" style="background-color:#ffffcc; color:green; width:525.222px" %) 881 881 |=(% colspan="3" style="width: 522px;" %)AT+RX2DR ... ... @@ -893,7 +893,7 @@ 893 893 Feature: Get or Set the Rx2 window frequency 894 894 895 895 896 -(% style="color:blue" %)**AT Command: 963 +(% style="color:blue" %)**AT Command:AT+RX2FQ** 897 897 898 898 (% border="1" style="background-color:#ffffcc; color:green; width:587.222px" %) 899 899 |=(% colspan="3" style="width: 584px;" %)AT+RX2FQ ... ... @@ -910,10 +910,10 @@ 910 910 911 911 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. ) 912 912 913 - (% style="color:red" %)**Notice: Transmit Power might be changed by ADR from LoRaWAN server. So manually change TXP also remember to set AT+ADR=0 in sensor**980 +Notice: Transmit Power might be changed by ADR from LoRaWAN server. So manually change TXP also remember to set AT+ADR=0 in sensor 914 914 915 915 916 -(% style="color:blue" %)**AT Command: 983 +(% style="color:blue" %)**AT Command:AT+TXP** 917 917 918 918 (% border="1" style="background-color:#ffffcc; color:green; width:465.222px" %) 919 919 |=(% colspan="3" style="width: 462px;" %)AT+TXP ... ... @@ -932,6 +932,7 @@ 932 932 * **Example 1**: Downlink Payload: **22000102** ~/~/ Set AT+TXP=2. 933 933 * **Example 2**: Downlink Payload: **220000FF** ~/~/ Set AT+TXP=0. 934 934 1002 + 935 935 == 7.15 RSSI of the Last Received Packet == 936 936 937 937 ... ... @@ -953,7 +953,7 @@ 953 953 Feature: Get the SNR of the last received packet 954 954 955 955 956 -(% style="color:blue" %)**AT Command: 1024 +(% style="color:blue" %)**AT Command:AT+SNR** 957 957 958 958 (% border="1" style="background-color:#ffffcc; color:green; width:571.222px" %) 959 959 |=(% colspan="3" style="width: 568px;" %)AT+SNR ... ... @@ -987,6 +987,7 @@ 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 1058 + 990 990 == 7.18 Single Channel Mode == 991 991 992 992 ... ... @@ -1030,6 +1030,7 @@ 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 1102 + 1033 1033 == 7.20 Get or Set RXwindows1 timeout == 1034 1034 1035 1035 ... ... @@ -1049,9 +1049,8 @@ 1049 1049 ((( 1050 1050 1051 1051 1122 +**AT+RX1TWO** 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. 1052 1052 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 1055 1056 1056 ))) 1057 1057 ... ... @@ -1061,7 +1061,6 @@ 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 1063 1064 - 1065 1065 1066 1066 ))) 1067 1067 ... ... @@ -1106,6 +1106,7 @@ 1106 1106 * **Example 1**: Downlink Payload: **2501** ~/~/ set uplinkdwelltime to 1 1107 1107 * **Example 2**: Downlink Payload: **2500** ~/~/ set uplinkdwelltime to 0 1108 1108 1177 + 1109 1109 == 7.23 Set Packet Receiving Response Level == 1110 1110 1111 1111 ... ... @@ -1145,6 +1145,7 @@ 1145 1145 * **Example 1**: Downlink Payload: **2101** ~/~/ set packet receiving response level to 1 1146 1146 * **Example 2**: Downlink Payload: **2102** ~/~/ set packet receiving response level to 2 1147 1147 1217 + 1148 1148 == 7.24 Controls NBTrans in unconfirmed uplink mode(LWS007 NBTrans:Set retransmission packets) == 1149 1149 1150 1150 ... ... @@ -1175,6 +1175,7 @@ 1175 1175 * Example 1: Downlink Payload: 330100 ~/~/ Set AT+SETMAXNBTRANS=1,0 1176 1176 * Example 2: Downlink Payload: 330201 ~/~/ Set AT+SETMAXNBTRANS=2,1 1177 1177 1248 + 1178 1178 == 7.25 Device offline rejoining (LWS007) == 1179 1179 1180 1180 ... ... @@ -1219,6 +1219,7 @@ 1219 1219 1220 1220 * **Example 1:** Downlink Payload: 320105A00B40 ~/~/ Set AT+DDETECT=1,1440,2880 1221 1221 1293 + 1222 1222 == 7.26 Request the server to send an ACK == 1223 1223 1224 1224 ... ... @@ -1262,14 +1262,17 @@ 1262 1262 * **Example 1:** Downlink Payload: 26000A ~/~/ Set AT+RJTDC=10 1263 1263 * **Example 2: **Downlink Payload: 260002 ~/~/ Set AT+RJTDC=2 1264 1264 1337 + 1265 1265 = 8. AT Commands Combination = 1266 1266 1340 + 1267 1267 == 8.1 Set a fix RX2DR for downlink window == 1268 1268 1269 1269 1270 -* (% style="color:blue" %)**AT+ADR=0 **(%%)**~-~->** Disable ADR first1271 -* (% style="color:blue" %)**AT+RX2DR=xxxx**(%%)**~-~->** Set xxxx to your wanted DataRate1344 +* **AT+ADR=0 ** **~-~->** Disable ADR first 1345 +* **AT+RX2DR=xxxx** **~-~->** Set xxxx to your wanted DataRate 1272 1272 1347 + 1273 1273 == 8.2 Use Downlink Command to set a fix uplink DR == 1274 1274 1275 1275