Changes for page End Device AT Commands and Downlink Command
Last modified by kai on 2024/09/06 10:00
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -9,12 +9,11 @@ 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. 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. 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 18 19 19 20 20 ))) ... ... @@ -22,10 +22,10 @@ 22 22 = 2. How to use AT Commands or Downlink command = 23 23 24 24 25 -* ForAT Command,See Devices User Manual forDevice. The user manual can be found in each product page of [[Dragino Official Website>>url:http://www.dragino.com/]]26 -* ForLoRaWAN Downlink: The gateway transfer downlink command in HEX format. This page shows theHEX format downlinkcodefor eachcommand. but some servers use base64 as downlink code. Below are reference for how to use downlink command:24 +* **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/]] 25 +* **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 -** Use Base64 format to send a downlink: [[Chirpstack>>Notes for ChirpStack]] 27 +** 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 31 31 ... ... @@ -105,11 +105,8 @@ 105 105 ))) 106 106 107 107 108 - 109 - 110 110 = 4. System Management Commands = 111 111 112 - 113 113 == 4.1 Change Uplink Interval == 114 114 115 115 ... ... @@ -139,16 +139,12 @@ 139 139 ))) 140 140 141 141 ((( 142 -If the downlink payload=0100003C, it means set the END Node ’s Transmit Interval to 0x00003C=60(S), while type code is 01.138 +If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01. 143 143 ))) 144 144 145 145 * **Example 1**: Downlink Payload:** 0100001E** ~/~/ Set Transmit Interval (TDC) = 30 seconds 146 146 * **Example 2**: Downlink Payload:** 0100003C** ~/~/ Set Transmit Interval (TDC) = 60 seconds 147 147 148 - 149 - 150 - 151 - 152 152 == 4.2 Reboot End Node == 153 153 154 154 ... ... @@ -314,12 +314,8 @@ 314 314 OK 315 315 ))) 316 316 317 - 318 - 319 - 320 320 = 5. Keys, IDs and EUIs management = 321 321 322 - 323 323 == 5.1 Application EUI == 324 324 325 325 ... ... @@ -336,9 +336,6 @@ 336 336 ))) 337 337 |(% style="width:305px" %)AT+APPEUI=00 b3 d5 7e f0 00 4d 34|(% style="width:186px" %)Set the Application EUI|(% style="width:191px" %)OK 338 338 339 - 340 - 341 - 342 342 == 5.2 Application Key == 343 343 344 344 ... ... @@ -355,9 +355,6 @@ 355 355 ))) 356 356 |(% 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 357 357 358 - 359 - 360 - 361 361 == 5.3 Application Session Key == 362 362 363 363 ... ... @@ -376,9 +376,6 @@ 376 376 OK 377 377 ))) 378 378 379 - 380 - 381 - 382 382 == 5.4 Device Address == 383 383 384 384 ... ... @@ -397,9 +397,6 @@ 397 397 ))) 398 398 |(% style="width:192px" %)AT+DADDR=A8 40 41 FF|(% style="width:241px" %)Set the Application Session Key.|(% style="width:359px" %)OK 399 399 400 - 401 - 402 - 403 403 == 5.5 Device EUI == 404 404 405 405 ... ... @@ -418,9 +418,6 @@ 418 418 OK 419 419 ))) 420 420 421 - 422 - 423 - 424 424 == 5.6 Network ID == 425 425 426 426 ... ... @@ -437,9 +437,6 @@ 437 437 ))) 438 438 |(% style="width:191px" %)AT+NWKID=A8 40 41 FF|(% style="width:153px" %)Set the Network ID.|(% style="width:101px" %)OK 439 439 440 - 441 - 442 - 443 443 == 5.7 Network Session Key == 444 444 445 445 ... ... @@ -456,15 +456,10 @@ 456 456 ))) 457 457 |(% 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 458 458 459 - 460 - 461 - 462 462 = 6. Joining and sending date on LoRaWAN network = 463 463 464 - 465 465 == 6.1 Confirm Mode == 466 466 467 - 468 468 === 6.1.1 AT+CFM command before DR-LWS007 software stack === 469 469 470 470 ... ... @@ -491,9 +491,6 @@ 491 491 * **Example 1:** Downlink Payload: 0501 ~/~/ Set AT+CFM=1 492 492 * **Example 2:** Downlink Payload: 0500 ~/~/ Set AT+CFM=0 493 493 494 - 495 - 496 - 497 497 === 6.1.2 AT+CFM command since DR-LWS007 software stack === 498 498 499 499 ... ... @@ -539,9 +539,6 @@ 539 539 * **Example 1:** Downlink Payload: 05010101 ~/~/ Set AT+CFM=1,1,1 540 540 * **Example 2:** Downlink Payload: 05000700 ~/~/ Set AT+CFM=0,7,0 541 541 542 - 543 - 544 - 545 545 == 6.2 Confirm Status == 546 546 547 547 ... ... @@ -557,9 +557,6 @@ 557 557 OK 558 558 ))) 559 559 560 - 561 - 562 - 563 563 == 6.3 Join LoRa® Network == 564 564 565 565 ... ... @@ -577,9 +577,6 @@ 577 577 While Error in format, return AT_BUSY_ERROR 578 578 ))) 579 579 580 - 581 - 582 - 583 583 == 6.4 LoRa® Network Join Mode == 584 584 585 585 ... ... @@ -606,9 +606,6 @@ 606 606 * **Example 1: **Downlink Payload: **2000 ** ~/~/ Set AT+NJM=0 607 607 * **Example 2:** Downlink Payload: **2001** ~/~/ Set AT+NJM=1 608 608 609 - 610 - 611 - 612 612 == 6.5 LoRa® Network Join Status == 613 613 614 614 ... ... @@ -624,9 +624,6 @@ 624 624 OK 625 625 ))) 626 626 627 - 628 - 629 - 630 630 == 6.6 Print Last Received Data in Raw Format == 631 631 632 632 ... ... @@ -642,9 +642,6 @@ 642 642 OK 643 643 ))) 644 644 645 - 646 - 647 - 648 648 == 6.7 Print Last Received Data in Binary Format == 649 649 650 650 ... ... @@ -660,9 +660,6 @@ 660 660 OK 661 661 ))) 662 662 663 - 664 - 665 - 666 666 == 6.8 Send Text Data == 667 667 668 668 ... ... @@ -690,11 +690,11 @@ 690 690 691 691 (% style="color:blue" %)**AT Command: AT+SENDB** 692 692 693 -(% border="1" style="background-color:#ffffcc; color:green; width:11 20.22px" %)694 -|=(% colspan="3" style="width: 1 117px;" %)AT+SENDB695 -|(% style="width:257px" %)**Command Example**|(% style="width:4 06px" %)**Function**|(% style="width:453px" %)**Response**696 -|(% style="width:257px" %)AT+SENDB=12:abcdef0123456789|(% style="width:4 06px" %)Send hexadecimal data along with the application port.|(% style="width:453px" %)OK697 -|(% style="width:257px" %)AT+SENDB=abcdef0123456789|(% style="width:4 06px" %)Send hexadecimal data along with the application port.|(% style="width:453px" %)While Error in format, return(((634 +(% border="1" style="background-color:#ffffcc; color:green; width:1101px" %) 635 +|=(% colspan="3" style="width: 1098px;" %)AT+SENDB 636 +|(% style="width:257px" %)**Command Example**|(% style="width:394px" %)**Function**|(% style="width:446px" %)**Response** 637 +|(% style="width:257px" %)AT+SENDB=12:abcdef0123456789|(% style="width:394px" %)Send hexadecimal data along with the application port.|(% style="width:446px" %)OK 638 +|(% 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((( 698 698 AT_PARAM_ERROR AT_BUSY_ERROR/AT_NO_NETWORK_JOINED 699 699 700 700 ... ... @@ -702,7 +702,6 @@ 702 702 703 703 = 7. LoRaWAN network management = 704 704 705 - 706 706 == 7.1 Adaptive Data Rate == 707 707 708 708 ... ... @@ -735,7 +735,7 @@ 735 735 Feature: Get or Set the Device Class(Currently only support class A, class C). 736 736 737 737 738 -(% style="color:blue" %)**AT Command:AT+CLASS** 678 +(% style="color:blue" %)**AT Command: AT+CLASS** 739 739 740 740 (% border="1" style="background-color:#ffffcc; color:green; width:507.222px" %) 741 741 |=(% colspan="3" style="width: 504px;" %)AT+CLASS ... ... @@ -750,10 +750,10 @@ 750 750 == 7.3 Duty Cycle Setting == 751 751 752 752 753 -Feature: Get or Set the ETSI Duty Cycle setting 693 +Feature: Get or Set the ETSI Duty Cycle setting** - 0**=disable, **1**=enable - Only for testing. 754 754 755 755 756 -(% style="color:blue" %)**AT Command:AT+DCS** 696 +(% style="color:blue" %)**AT Command: AT+DCS** 757 757 758 758 (% border="1" style="background-color:#ffffcc; color:green; width:515.222px" %) 759 759 |=(% colspan="3" style="width: 512px;" %)AT+DCS ... ... @@ -768,9 +768,14 @@ 768 768 == 7.4 Data Rate == 769 769 770 770 771 -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 server711 +Feature: Get or Set the Data Rate. (0-7 corresponding to DR_X) . 772 772 713 +(% style="color:red" %) 714 +**Notice:** 773 773 716 +* 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. 717 +* 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/]] 718 + 774 774 (% style="color:blue" %)**AT Command: AT+DR** 775 775 776 776 (% border="1" style="background-color:#ffffcc; color:green; width:466.222px" %) ... ... @@ -796,7 +796,7 @@ 796 796 Feature: Get or Set the Frame Counter Downlink. 797 797 798 798 799 -(% style="color:blue" %)**AT Command:AT+FCD** 744 +(% style="color:blue" %)**AT Command: AT+FCD** 800 800 801 801 (% border="1" style="background-color:#ffffcc; color:green; width:693.222px" %) 802 802 |=(% colspan="3" style="width: 690px;" %)AT+FCD ... ... @@ -813,7 +813,7 @@ 813 813 Feature: Get or Set the Frame Counter Uplink. 814 814 815 815 816 -(% style="color:blue" %)**AT Command:AT+FCU** 761 +(% style="color:blue" %)**AT Command: AT+FCU** 817 817 818 818 (% border="1" style="background-color:#ffffcc; color:green; width:534.222px" %) 819 819 |=(% colspan="3" style="width: 531px;" %)AT+FCU ... ... @@ -831,7 +831,7 @@ 831 831 Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 1 in ms. 832 832 833 833 834 -(% style="color:blue" %)**AT Command:AT+JN1DL** 779 +(% style="color:blue" %)**AT Command: AT+JN1DL** 835 835 836 836 (% border="1" style="background-color:#ffffcc; color:green; width:537.222px" %) 837 837 |=(% colspan="3" style="width: 534px;" %)AT+JN1DL ... ... @@ -845,10 +845,11 @@ 845 845 846 846 == 7.8 Join Accept Delay2 == 847 847 793 + 848 848 Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 2 in ms. 849 849 850 850 851 -(% style="color:blue" %)**AT Command:AT+JN2DL** 797 +(% style="color:blue" %)**AT Command: AT+JN2DL** 852 852 853 853 (% border="1" style="background-color:#ffffcc; color:green; width:538.222px" %) 854 854 |=(% colspan="3" style="width: 535px;" %)AT+JN2DL ... ... @@ -868,7 +868,7 @@ 868 868 (% style="color:red" %)**Notice: If user build their own LoRaWAN server but still use syncword=0x34, this is still considered a public LoRaWAN network.** 869 869 870 870 871 -(% style="color:blue" %)**AT Command:AT+PNM** 817 +(% style="color:blue" %)**AT Command: AT+PNM** 872 872 873 873 (% border="1" style="background-color:#ffffcc; color:green; width:667.222px" %) 874 874 |=(% colspan="3" style="width: 664px;" %)AT+PNM ... ... @@ -893,7 +893,7 @@ 893 893 Feature: Get or Set the delay between the end of the Tx and the Rx Window 1 in ms 894 894 895 895 896 -(% style="color:blue" %)**AT Command:AT+RX1DL** 842 +(% style="color:blue" %)**AT Command: AT+RX1DL** 897 897 898 898 (% border="1" style="background-color:#ffffcc; color:green; width:408.222px" %) 899 899 |=(% colspan="3" style="width: 405px;" %)AT+RX1DL ... ... @@ -911,7 +911,7 @@ 911 911 Feature: Get or Set the delay between the end of the Tx and the Rx Window 2 in ms 912 912 913 913 914 -(% style="color:blue" %)**AT Command:AT+RX2DL** 860 +(% style="color:blue" %)**AT Command: AT+RX2DL** 915 915 916 916 (% border="1" style="background-color:#ffffcc; color:green; width:481.222px" %) 917 917 |=(% colspan="3" style="width: 478px;" %)AT+RX2DL ... ... @@ -929,7 +929,7 @@ 929 929 Feature: Get or Set the Rx2 window data rate (0-7 corresponding to DR_X) 930 930 931 931 932 -(% style="color:blue" %)**AT Command:AT+RX2DR** 878 +(% style="color:blue" %)**AT Command: AT+RX2DR** 933 933 934 934 (% border="1" style="background-color:#ffffcc; color:green; width:525.222px" %) 935 935 |=(% colspan="3" style="width: 522px;" %)AT+RX2DR ... ... @@ -947,7 +947,7 @@ 947 947 Feature: Get or Set the Rx2 window frequency 948 948 949 949 950 -(% style="color:blue" %)**AT Command:AT+RX2FQ** 896 +(% style="color:blue" %)**AT Command: AT+RX2FQ** 951 951 952 952 (% border="1" style="background-color:#ffffcc; color:green; width:587.222px" %) 953 953 |=(% colspan="3" style="width: 584px;" %)AT+RX2FQ ... ... @@ -964,10 +964,10 @@ 964 964 965 965 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. ) 966 966 967 -Notice: Transmit Power might be changed by ADR from LoRaWAN server. So manually change TXP also remember to set AT+ADR=0 in sensor 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** 968 968 969 969 970 -(% style="color:blue" %)**AT Command:AT+TXP** 916 +(% style="color:blue" %)**AT Command: AT+TXP** 971 971 972 972 (% border="1" style="background-color:#ffffcc; color:green; width:465.222px" %) 973 973 |=(% colspan="3" style="width: 462px;" %)AT+TXP ... ... @@ -986,7 +986,6 @@ 986 986 * **Example 1**: Downlink Payload: **22000102** ~/~/ Set AT+TXP=2. 987 987 * **Example 2**: Downlink Payload: **220000FF** ~/~/ Set AT+TXP=0. 988 988 989 - 990 990 == 7.15 RSSI of the Last Received Packet == 991 991 992 992 ... ... @@ -1008,7 +1008,7 @@ 1008 1008 Feature: Get the SNR of the last received packet 1009 1009 1010 1010 1011 -(% style="color:blue" %)**AT Command:AT+SNR** 956 +(% style="color:blue" %)**AT Command: AT+SNR** 1012 1012 1013 1013 (% border="1" style="background-color:#ffffcc; color:green; width:571.222px" %) 1014 1014 |=(% colspan="3" style="width: 568px;" %)AT+SNR ... ... @@ -1042,7 +1042,6 @@ 1042 1042 * **Example 1**: Downlink Payload: **2301** ~/~/ set the application port to 1 1043 1043 * **Example 2**: Downlink Payload:** 2305** ~/~/ set the application port to 5 1044 1044 1045 - 1046 1046 == 7.18 Single Channel Mode == 1047 1047 1048 1048 ... ... @@ -1077,7 +1077,7 @@ 1077 1077 ))) 1078 1078 |(% style="width:160px" %)AT+CHE=1|(% style="width:198px" %)Set eight channels mode|(% style="width:349px" %)OK 1079 1079 1080 -(% style="color:blue" %)**Downlink Command: 0x24** 1024 +(% style="color:blue" %)**Downlink Command: 0x24 (LHT65,LHT65N Downlink Command:0x07)** 1081 1081 1082 1082 Format: Command Code (0x24) followed by 1 bytes channel value. 1083 1083 ... ... @@ -1086,7 +1086,6 @@ 1086 1086 * **Example 1**: Downlink Payload: 2401 ~/~/ set channel mode to 1 1087 1087 * **Example 2**: Downlink Payload: 2405 ~/~/ set channel mode to 5 1088 1088 1089 - 1090 1090 == 7.20 Get or Set RXwindows1 timeout == 1091 1091 1092 1092 ... ... @@ -1106,8 +1106,9 @@ 1106 1106 ((( 1107 1107 1108 1108 1109 -**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. 1110 1110 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 + 1111 1111 1112 1112 ))) 1113 1113 ... ... @@ -1117,6 +1117,7 @@ 1117 1117 ((( 1118 1118 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. 1119 1119 1064 + 1120 1120 1121 1121 ))) 1122 1122 ... ... @@ -1161,7 +1161,6 @@ 1161 1161 * **Example 1**: Downlink Payload: **2501** ~/~/ set uplinkdwelltime to 1 1162 1162 * **Example 2**: Downlink Payload: **2500** ~/~/ set uplinkdwelltime to 0 1163 1163 1164 - 1165 1165 == 7.23 Set Packet Receiving Response Level == 1166 1166 1167 1167 ... ... @@ -1201,7 +1201,6 @@ 1201 1201 * **Example 1**: Downlink Payload: **2101** ~/~/ set packet receiving response level to 1 1202 1202 * **Example 2**: Downlink Payload: **2102** ~/~/ set packet receiving response level to 2 1203 1203 1204 - 1205 1205 == 7.24 Controls NBTrans in unconfirmed uplink mode(LWS007 NBTrans:Set retransmission packets) == 1206 1206 1207 1207 ... ... @@ -1232,7 +1232,6 @@ 1232 1232 * Example 1: Downlink Payload: 330100 ~/~/ Set AT+SETMAXNBTRANS=1,0 1233 1233 * Example 2: Downlink Payload: 330201 ~/~/ Set AT+SETMAXNBTRANS=2,1 1234 1234 1235 - 1236 1236 == 7.25 Device offline rejoining (LWS007) == 1237 1237 1238 1238 ... ... @@ -1277,7 +1277,6 @@ 1277 1277 1278 1278 * **Example 1:** Downlink Payload: 320105A00B40 ~/~/ Set AT+DDETECT=1,1440,2880 1279 1279 1280 - 1281 1281 == 7.26 Request the server to send an ACK == 1282 1282 1283 1283 ... ... @@ -1321,17 +1321,14 @@ 1321 1321 * **Example 1:** Downlink Payload: 26000A ~/~/ Set AT+RJTDC=10 1322 1322 * **Example 2: **Downlink Payload: 260002 ~/~/ Set AT+RJTDC=2 1323 1323 1324 - 1325 1325 = 8. AT Commands Combination = 1326 1326 1327 - 1328 1328 == 8.1 Set a fix RX2DR for downlink window == 1329 1329 1330 1330 1331 -* **AT+ADR=0 ** **~-~->** Disable ADR first 1332 -* **AT+RX2DR=xxxx** 1270 +* (% style="color:blue" %)**AT+ADR=0 **(%%) **~-~->** Disable ADR first 1271 +* (% style="color:blue" %)**AT+RX2DR=xxxx** (%%) **~-~->** Set xxxx to your wanted DataRate 1333 1333 1334 - 1335 1335 == 8.2 Use Downlink Command to set a fix uplink DR == 1336 1336 1337 1337