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,10 +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 31 32 + 32 32 = 3. Support End Node and firmware version = 33 33 34 34 ... ... @@ -104,8 +104,11 @@ 104 104 ))) 105 105 106 106 108 + 109 + 107 107 = 4. System Management Commands = 108 108 112 + 109 109 == 4.1 Change Uplink Interval == 110 110 111 111 ... ... @@ -135,7 +135,7 @@ 135 135 ))) 136 136 137 137 ((( 138 -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. 139 139 ))) 140 140 141 141 * **Example 1**: Downlink Payload:** 0100001E** ~/~/ Set Transmit Interval (TDC) = 30 seconds ... ... @@ -142,6 +142,9 @@ 142 142 * **Example 2**: Downlink Payload:** 0100003C** ~/~/ Set Transmit Interval (TDC) = 60 seconds 143 143 144 144 149 + 150 + 151 + 145 145 == 4.2 Reboot End Node == 146 146 147 147 ... ... @@ -308,8 +308,11 @@ 308 308 ))) 309 309 310 310 318 + 319 + 311 311 = 5. Keys, IDs and EUIs management = 312 312 322 + 313 313 == 5.1 Application EUI == 314 314 315 315 ... ... @@ -327,6 +327,8 @@ 327 327 |(% style="width:305px" %)AT+APPEUI=00 b3 d5 7e f0 00 4d 34|(% style="width:186px" %)Set the Application EUI|(% style="width:191px" %)OK 328 328 329 329 340 + 341 + 330 330 == 5.2 Application Key == 331 331 332 332 ... ... @@ -344,6 +344,8 @@ 344 344 |(% 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 345 345 346 346 359 + 360 + 347 347 == 5.3 Application Session Key == 348 348 349 349 ... ... @@ -363,6 +363,8 @@ 363 363 ))) 364 364 365 365 380 + 381 + 366 366 == 5.4 Device Address == 367 367 368 368 ... ... @@ -382,6 +382,8 @@ 382 382 |(% style="width:192px" %)AT+DADDR=A8 40 41 FF|(% style="width:241px" %)Set the Application Session Key.|(% style="width:359px" %)OK 383 383 384 384 401 + 402 + 385 385 == 5.5 Device EUI == 386 386 387 387 ... ... @@ -401,6 +401,8 @@ 401 401 ))) 402 402 403 403 422 + 423 + 404 404 == 5.6 Network ID == 405 405 406 406 ... ... @@ -418,6 +418,8 @@ 418 418 |(% style="width:191px" %)AT+NWKID=A8 40 41 FF|(% style="width:153px" %)Set the Network ID.|(% style="width:101px" %)OK 419 419 420 420 441 + 442 + 421 421 == 5.7 Network Session Key == 422 422 423 423 ... ... @@ -435,10 +435,14 @@ 435 435 |(% 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 436 436 437 437 460 + 461 + 438 438 = 6. Joining and sending date on LoRaWAN network = 439 439 464 + 440 440 == 6.1 Confirm Mode == 441 441 467 + 442 442 === 6.1.1 AT+CFM command before DR-LWS007 software stack === 443 443 444 444 ... ... @@ -466,6 +466,8 @@ 466 466 * **Example 2:** Downlink Payload: 0500 ~/~/ Set AT+CFM=0 467 467 468 468 495 + 496 + 469 469 === 6.1.2 AT+CFM command since DR-LWS007 software stack === 470 470 471 471 ... ... @@ -512,6 +512,8 @@ 512 512 * **Example 2:** Downlink Payload: 05000700 ~/~/ Set AT+CFM=0,7,0 513 513 514 514 543 + 544 + 515 515 == 6.2 Confirm Status == 516 516 517 517 ... ... @@ -528,6 +528,8 @@ 528 528 ))) 529 529 530 530 561 + 562 + 531 531 == 6.3 Join LoRa® Network == 532 532 533 533 ... ... @@ -546,6 +546,8 @@ 546 546 ))) 547 547 548 548 581 + 582 + 549 549 == 6.4 LoRa® Network Join Mode == 550 550 551 551 ... ... @@ -573,6 +573,8 @@ 573 573 * **Example 2:** Downlink Payload: **2001** ~/~/ Set AT+NJM=1 574 574 575 575 610 + 611 + 576 576 == 6.5 LoRa® Network Join Status == 577 577 578 578 ... ... @@ -589,6 +589,8 @@ 589 589 ))) 590 590 591 591 628 + 629 + 592 592 == 6.6 Print Last Received Data in Raw Format == 593 593 594 594 ... ... @@ -605,6 +605,8 @@ 605 605 ))) 606 606 607 607 646 + 647 + 608 608 == 6.7 Print Last Received Data in Binary Format == 609 609 610 610 ... ... @@ -621,6 +621,8 @@ 621 621 ))) 622 622 623 623 664 + 665 + 624 624 == 6.8 Send Text Data == 625 625 626 626 ... ... @@ -641,6 +641,8 @@ 641 641 ))) 642 642 643 643 686 + 687 + 644 644 == 6.9 Send Hexadecimal Data == 645 645 646 646 ... ... @@ -649,11 +649,11 @@ 649 649 650 650 (% style="color:blue" %)**AT Command: AT+SENDB** 651 651 652 -(% border="1" style="background-color:#ffffcc; color:green; width:110 1px" %)653 -|=(% colspan="3" style="width: 1 098px;" %)AT+SENDB654 -|(% style="width:257px" %)**Command Example**|(% style="width: 394px" %)**Function**|(% style="width:446px" %)**Response**655 -|(% style="width:257px" %)AT+SENDB=12:abcdef0123456789|(% style="width: 394px" %)Send hexadecimal data along with the application port.|(% style="width:446px" %)OK656 -|(% 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((( 657 657 AT_PARAM_ERROR AT_BUSY_ERROR/AT_NO_NETWORK_JOINED 658 658 659 659 ... ... @@ -660,8 +660,11 @@ 660 660 ))) 661 661 662 662 707 + 708 + 663 663 = 7. LoRaWAN network management = 664 664 711 + 665 665 == 7.1 Adaptive Data Rate == 666 666 667 667 ... ... @@ -689,6 +689,9 @@ 689 689 * **Example 2**: Downlink Payload: **2200FFFF** ~/~/ Set AT+ADR=0. 690 690 691 691 739 + 740 + 741 + 692 692 == 7.2 LoRa® Class == 693 693 694 694 ... ... @@ -695,7 +695,7 @@ 695 695 Feature: Get or Set the Device Class(Currently only support class A, class C). 696 696 697 697 698 -(% style="color:blue" %)**AT Command: 748 +(% style="color:blue" %)**AT Command:AT+CLASS** 699 699 700 700 (% border="1" style="background-color:#ffffcc; color:green; width:507.222px" %) 701 701 |=(% colspan="3" style="width: 504px;" %)AT+CLASS ... ... @@ -708,13 +708,15 @@ 708 708 ))) 709 709 710 710 761 + 762 + 711 711 == 7.3 Duty Cycle Setting == 712 712 713 713 714 -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. 715 715 716 716 717 -(% style="color:blue" %)**AT Command: 769 +(% style="color:blue" %)**AT Command:AT+DCS** 718 718 719 719 (% border="1" style="background-color:#ffffcc; color:green; width:515.222px" %) 720 720 |=(% colspan="3" style="width: 512px;" %)AT+DCS ... ... @@ -726,19 +726,12 @@ 726 726 727 727 ))) 728 728 729 - 730 730 == 7.4 Data Rate == 731 731 732 732 733 -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 734 734 735 -(% style="color:red" %) 736 -**Notice:** 737 737 738 -* 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. 739 -* Data Rate specifies Spreading Factor. The mapping various in different frequency band. 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/]] 740 - 741 - 742 742 (% style="color:blue" %)**AT Command: AT+DR** 743 743 744 744 (% border="1" style="background-color:#ffffcc; color:green; width:466.222px" %) ... ... @@ -758,7 +758,6 @@ 758 758 * **Example 1**: Downlink Payload: **220001FF** ~/~/ Set AT+DR=1. 759 759 * **Example 2**: Downlink Payload: **220000FF** ~/~/ Set AT+DR=0. 760 760 761 - 762 762 == 7.5 Frame Counter Downlink == 763 763 764 764 ... ... @@ -765,7 +765,7 @@ 765 765 Feature: Get or Set the Frame Counter Downlink. 766 766 767 767 768 -(% style="color:blue" %)**AT Command: 812 +(% style="color:blue" %)**AT Command:AT+FCD** 769 769 770 770 (% border="1" style="background-color:#ffffcc; color:green; width:693.222px" %) 771 771 |=(% colspan="3" style="width: 690px;" %)AT+FCD ... ... @@ -777,13 +777,12 @@ 777 777 OK 778 778 ))) 779 779 780 - 781 781 == 7.6 Frame Counter Uplink == 782 782 783 783 Feature: Get or Set the Frame Counter Uplink. 784 784 785 785 786 -(% style="color:blue" %)**AT Command: 829 +(% style="color:blue" %)**AT Command:AT+FCU** 787 787 788 788 (% border="1" style="background-color:#ffffcc; color:green; width:534.222px" %) 789 789 |=(% colspan="3" style="width: 531px;" %)AT+FCU ... ... @@ -795,7 +795,6 @@ 795 795 796 796 ))) 797 797 798 - 799 799 == 7.7 Join Accept Delay1 == 800 800 801 801 ... ... @@ -802,7 +802,7 @@ 802 802 Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 1 in ms. 803 803 804 804 805 -(% style="color:blue" %)**AT Command: 847 +(% style="color:blue" %)**AT Command:AT+JN1DL** 806 806 807 807 (% border="1" style="background-color:#ffffcc; color:green; width:537.222px" %) 808 808 |=(% colspan="3" style="width: 534px;" %)AT+JN1DL ... ... @@ -814,14 +814,12 @@ 814 814 815 815 ))) 816 816 817 - 818 818 == 7.8 Join Accept Delay2 == 819 819 820 - 821 821 Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 2 in ms. 822 822 823 823 824 -(% style="color:blue" %)**AT Command: 864 +(% style="color:blue" %)**AT Command:AT+JN2DL** 825 825 826 826 (% border="1" style="background-color:#ffffcc; color:green; width:538.222px" %) 827 827 |=(% colspan="3" style="width: 535px;" %)AT+JN2DL ... ... @@ -833,7 +833,6 @@ 833 833 834 834 ))) 835 835 836 - 837 837 == 7.9 Public Network Mode == 838 838 839 839 ... ... @@ -842,7 +842,7 @@ 842 842 (% style="color:red" %)**Notice: If user build their own LoRaWAN server but still use syncword=0x34, this is still considered a public LoRaWAN network.** 843 843 844 844 845 -(% style="color:blue" %)**AT Command: 884 +(% style="color:blue" %)**AT Command:AT+PNM** 846 846 847 847 (% border="1" style="background-color:#ffffcc; color:green; width:667.222px" %) 848 848 |=(% colspan="3" style="width: 664px;" %)AT+PNM ... ... @@ -861,7 +861,6 @@ 861 861 ))) 862 862 |(% style="width:166px" %)AT+PNM=0|(% style="width:225px" %)Set to use private network autoset syncword=0x12|(% style="width:272px" %) 863 863 864 - 865 865 == 7.10 Receive Delay1 == 866 866 867 867 ... ... @@ -868,7 +868,7 @@ 868 868 Feature: Get or Set the delay between the end of the Tx and the Rx Window 1 in ms 869 869 870 870 871 -(% style="color:blue" %)**AT Command: 909 +(% style="color:blue" %)**AT Command:AT+RX1DL** 872 872 873 873 (% border="1" style="background-color:#ffffcc; color:green; width:408.222px" %) 874 874 |=(% colspan="3" style="width: 405px;" %)AT+RX1DL ... ... @@ -880,7 +880,6 @@ 880 880 881 881 ))) 882 882 883 - 884 884 == 7.11 Receive Delay2 == 885 885 886 886 ... ... @@ -887,7 +887,7 @@ 887 887 Feature: Get or Set the delay between the end of the Tx and the Rx Window 2 in ms 888 888 889 889 890 -(% style="color:blue" %)**AT Command: 927 +(% style="color:blue" %)**AT Command:AT+RX2DL** 891 891 892 892 (% border="1" style="background-color:#ffffcc; color:green; width:481.222px" %) 893 893 |=(% colspan="3" style="width: 478px;" %)AT+RX2DL ... ... @@ -899,7 +899,6 @@ 899 899 900 900 ))) 901 901 902 - 903 903 == 7.12 Rx2 Window Data Rate == 904 904 905 905 ... ... @@ -906,7 +906,7 @@ 906 906 Feature: Get or Set the Rx2 window data rate (0-7 corresponding to DR_X) 907 907 908 908 909 -(% style="color:blue" %)**AT Command: 945 +(% style="color:blue" %)**AT Command:AT+RX2DR** 910 910 911 911 (% border="1" style="background-color:#ffffcc; color:green; width:525.222px" %) 912 912 |=(% colspan="3" style="width: 522px;" %)AT+RX2DR ... ... @@ -918,7 +918,6 @@ 918 918 919 919 ))) 920 920 921 - 922 922 == 7.13 Rx2 Window Frequency == 923 923 924 924 ... ... @@ -925,7 +925,7 @@ 925 925 Feature: Get or Set the Rx2 window frequency 926 926 927 927 928 -(% style="color:blue" %)**AT Command: 963 +(% style="color:blue" %)**AT Command:AT+RX2FQ** 929 929 930 930 (% border="1" style="background-color:#ffffcc; color:green; width:587.222px" %) 931 931 |=(% colspan="3" style="width: 584px;" %)AT+RX2FQ ... ... @@ -937,16 +937,15 @@ 937 937 938 938 ))) 939 939 940 - 941 941 == 7.14 Transmit Power == 942 942 943 943 944 944 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. ) 945 945 946 - (% 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 947 947 948 948 949 -(% style="color:blue" %)**AT Command: 983 +(% style="color:blue" %)**AT Command:AT+TXP** 950 950 951 951 (% border="1" style="background-color:#ffffcc; color:green; width:465.222px" %) 952 952 |=(% colspan="3" style="width: 462px;" %)AT+TXP ... ... @@ -981,7 +981,6 @@ 981 981 OK 982 982 ))) 983 983 984 - 985 985 == 7.16 SNR of the Last Received Packet == 986 986 987 987 ... ... @@ -988,7 +988,7 @@ 988 988 Feature: Get the SNR of the last received packet 989 989 990 990 991 -(% style="color:blue" %)**AT Command: 1024 +(% style="color:blue" %)**AT Command:AT+SNR** 992 992 993 993 (% border="1" style="background-color:#ffffcc; color:green; width:571.222px" %) 994 994 |=(% colspan="3" style="width: 568px;" %)AT+SNR ... ... @@ -997,7 +997,6 @@ 997 997 OK 998 998 ))) 999 999 1000 - 1001 1001 == 7.17 Application Port == 1002 1002 1003 1003 ... ... @@ -1040,7 +1040,6 @@ 1040 1040 ))) 1041 1041 |(% style="width:182px" %)AT+CHS=868100000|(% style="width:295px" %)Set Frequency for Single Channel Mode|(% style="width:122px" %)OK 1042 1042 1043 - 1044 1044 == 7.19 Eight Channel Mode == 1045 1045 1046 1046 ... ... @@ -1088,9 +1088,8 @@ 1088 1088 ((( 1089 1089 1090 1090 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. 1091 1091 1092 -(% 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. 1093 - 1094 1094 1095 1095 ))) 1096 1096 ... ... @@ -1100,7 +1100,6 @@ 1100 1100 ((( 1101 1101 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. 1102 1102 1103 - 1104 1104 1105 1105 ))) 1106 1106 ... ... @@ -1120,7 +1120,6 @@ 1120 1120 ))) 1121 1121 |(% style="width:190px" %)AT+RX2WTO=20|(% style="width:199px" %)Set RXwindows2 timeout|(% style="width:104px" %)OK 1122 1122 1123 - 1124 1124 == 7.22 Setting up uplinkdwelltime (as923, au915) == 1125 1125 1126 1126 ... ... @@ -1280,7 +1280,6 @@ 1280 1280 OK 1281 1281 ))) 1282 1282 1283 - 1284 1284 == 7.27 Adjust network rejoining interval == 1285 1285 1286 1286 ... ... @@ -1310,11 +1310,12 @@ 1310 1310 1311 1311 = 8. AT Commands Combination = 1312 1312 1340 + 1313 1313 == 8.1 Set a fix RX2DR for downlink window == 1314 1314 1315 1315 1316 -* (% style="color:blue" %)**AT+ADR=0 **(%%)**~-~->** Disable ADR first1317 -* (% 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 1318 1318 1319 1319 1320 1320 == 8.2 Use Downlink Command to set a fix uplink DR ==