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
-
... ... @@ -14,6 +14,7 @@ 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 + 17 17 18 18 19 19 ))) ... ... @@ -21,14 +21,15 @@ 21 21 = 2. How to use AT Commands or Downlink command = 22 22 23 23 24 -* **AT Command**:See Devices User Manual forhow to connect to devicevia 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 DownlinkCommand**: The gateway transfer downlink command in HEX format. This page shows theDownlinkCommandIn HEXformat.PleasenotesomeLoRaWANservers use base64 as downlink codeso user need to convert HEX to Base64 and use. Below are referencesfor how to use downlink command: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 +* 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: 26 26 ** Use HEX format to send a downlink: [[TTN v3>>Notes for TTN]] 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]]?28 +** Use Base64 format to send a downlink: [[Chirpstack>>Notes for ChirpStack]] 28 28 ** See use note for more serves [[Servers Note>>doc:Main.WebHome]](IoT LoRaWAN Server) 29 29 30 30 31 31 33 + 32 32 = 3. Support End Node and firmware version = 33 33 34 34 ... ... @@ -105,8 +105,10 @@ 105 105 106 106 107 107 110 + 108 108 = 4. System Management Commands = 109 109 113 + 110 110 == 4.1 Change Uplink Interval == 111 111 112 112 ... ... @@ -144,6 +144,7 @@ 144 144 145 145 146 146 151 + 147 147 == 4.2 Reboot End Node == 148 148 149 149 ... ... @@ -178,6 +178,7 @@ 178 178 ((( 179 179 If the downlink payload=**04FF**, the end node will reboot. 180 180 186 + 181 181 182 182 ))) 183 183 ... ... @@ -217,6 +217,7 @@ 217 217 ))) 218 218 219 219 226 + 220 220 == 4.4 Show Firmware Version == 221 221 222 222 ... ... @@ -247,6 +247,7 @@ 247 247 ((( 248 248 249 249 257 + 250 250 **xx: Software Type:** 251 251 ))) 252 252 ... ... @@ -280,6 +280,7 @@ 280 280 firmware version: v1.1.0 ~-~-> 110 281 281 282 282 291 + 283 283 == 4.5 Show System Configure == 284 284 285 285 ... ... @@ -307,8 +307,10 @@ 307 307 308 308 309 309 319 + 310 310 = 5. Keys, IDs and EUIs management = 311 311 322 + 312 312 == 5.1 Application EUI == 313 313 314 314 ... ... @@ -327,6 +327,7 @@ 327 327 328 328 329 329 341 + 330 330 == 5.2 Application Key == 331 331 332 332 ... ... @@ -345,6 +345,7 @@ 345 345 346 346 347 347 360 + 348 348 == 5.3 Application Session Key == 349 349 350 350 ... ... @@ -365,6 +365,7 @@ 365 365 366 366 367 367 381 + 368 368 == 5.4 Device Address == 369 369 370 370 ... ... @@ -385,6 +385,7 @@ 385 385 386 386 387 387 402 + 388 388 == 5.5 Device EUI == 389 389 390 390 ... ... @@ -405,6 +405,7 @@ 405 405 406 406 407 407 423 + 408 408 == 5.6 Network ID == 409 409 410 410 ... ... @@ -423,6 +423,7 @@ 423 423 424 424 425 425 442 + 426 426 == 5.7 Network Session Key == 427 427 428 428 ... ... @@ -441,10 +441,13 @@ 441 441 442 442 443 443 461 + 444 444 = 6. Joining and sending date on LoRaWAN network = 445 445 464 + 446 446 == 6.1 Confirm Mode == 447 447 467 + 448 448 === 6.1.1 AT+CFM command before DR-LWS007 software stack === 449 449 450 450 ... ... @@ -462,6 +462,8 @@ 462 462 |(% style="width:155px" %)AT+CFM=1|(% style="width:205px" %)Set the confirmation mode|(% style="width:346px" %)OK 463 463 |(% style="width:155px" %)AT+CFM=2|(% style="width:205px" %)Set the confirmation mode|(% style="width:346px" %)While Error in format, return AT_PARAM_ERROR 464 464 485 + 486 + 465 465 (% style="color:blue" %)**Downlink Command: 0x05** 466 466 467 467 Format: Command Code (0x05) followed by 2 bytes mode value. ... ... @@ -473,6 +473,7 @@ 473 473 474 474 475 475 498 + 476 476 === 6.1.2 AT+CFM command since DR-LWS007 software stack === 477 477 478 478 ... ... @@ -509,6 +509,8 @@ 509 509 OK 510 510 ))) 511 511 535 + 536 + 512 512 (% style="color:blue" %)**Downlink Command: 0x05** 513 513 514 514 Format: Command Code (0x05) followed by 2 bytes mode value. ... ... @@ -520,6 +520,7 @@ 520 520 521 521 522 522 548 + 523 523 == 6.2 Confirm Status == 524 524 525 525 ... ... @@ -528,15 +528,16 @@ 528 528 529 529 (% style="color:blue" %)**AT Command: AT+CFS** 530 530 531 -(% border="1" style="background-color:#ffffcc; color:green; width: 463px" %)532 -|=(% colspan="3" style="width: 460px;" %)AT+CFS533 -|(% style="width:156px" %)**Command Example**|(% style="width:193px" %)**Function**|(% style="width:1 07px" %)**Response**534 -|(% style="width:156px" %)AT+CFS=?|(% style="width:193px" %)Get confirmation status|(% style="width:1 07px" %)0(((557 +(% border="1" style="background-color:#ffffcc; color:green; width:534.222px" %) 558 +|=(% colspan="3" style="width: 531px;" %)AT+CFS 559 +|(% style="width:156px" %)**Command Example**|(% style="width:193px" %)**Function**|(% style="width:178px" %)**Response** 560 +|(% style="width:156px" %)AT+CFS=?|(% style="width:193px" %)Get confirmation status|(% style="width:178px" %)0((( 535 535 OK 536 536 ))) 537 537 538 538 539 539 566 + 540 540 == 6.3 Join LoRa® Network == 541 541 542 542 ... ... @@ -556,6 +556,7 @@ 556 556 557 557 558 558 586 + 559 559 == 6.4 LoRa® Network Join Mode == 560 560 561 561 ... ... @@ -573,6 +573,8 @@ 573 573 |(% style="width:162px" %)AT+NJM=0|(% style="width:227px" %)Set the Network Join Mode|(% style="width:361px" %)OK 574 574 |(% style="width:162px" %)AT+NJM=2|(% style="width:227px" %)Set the Network Join Mode|(% style="width:361px" %)While Error in format, return AT_PARAM_ERROR 575 575 604 + 605 + 576 576 (% style="color:blue" %)**Downlink Command: 0x20** 577 577 578 578 Format: Command Code (0x20) followed by 1 bytes mode value. ... ... @@ -584,6 +584,7 @@ 584 584 585 585 586 586 617 + 587 587 == 6.5 LoRa® Network Join Status == 588 588 589 589 ... ... @@ -601,6 +601,7 @@ 601 601 602 602 603 603 635 + 604 604 == 6.6 Print Last Received Data in Raw Format == 605 605 606 606 ... ... @@ -618,6 +618,7 @@ 618 618 619 619 620 620 653 + 621 621 == 6.7 Print Last Received Data in Binary Format == 622 622 623 623 ... ... @@ -635,6 +635,7 @@ 635 635 636 636 637 637 671 + 638 638 == 6.8 Send Text Data == 639 639 640 640 ... ... @@ -656,6 +656,7 @@ 656 656 657 657 658 658 693 + 659 659 == 6.9 Send Hexadecimal Data == 660 660 661 661 ... ... @@ -676,8 +676,10 @@ 676 676 677 677 678 678 714 + 679 679 = 7. LoRaWAN network management = 680 680 717 + 681 681 == 7.1 Adaptive Data Rate == 682 682 683 683 ... ... @@ -697,6 +697,8 @@ 697 697 AT_PARAM_ERROR 698 698 ))) 699 699 737 + 738 + 700 700 (% style="color:blue" %)**Downlink Command: 0x22** 701 701 702 702 If the downlink payload=2201, it means setting the adaptive data rate to 1, while type code is 22. ... ... @@ -706,6 +706,7 @@ 706 706 707 707 708 708 748 + 709 709 == 7.2 LoRa® Class == 710 710 711 711 ... ... @@ -726,6 +726,7 @@ 726 726 727 727 728 728 769 + 729 729 == 7.3 Duty Cycle Setting == 730 730 731 731 ... ... @@ -746,17 +746,13 @@ 746 746 747 747 748 748 790 + 749 749 == 7.4 Data Rate == 750 750 751 751 752 -Feature: Get or Set the Data Rate. (0-7 corresponding to DR_X) . 794 +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 753 753 754 -(% style="color:red" %) 755 -**Notice:** 756 756 757 -* 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. 758 -* 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/]] 759 - 760 760 (% style="color:blue" %)**AT Command: AT+DR** 761 761 762 762 (% border="1" style="background-color:#ffffcc; color:green; width:466.222px" %) ... ... @@ -769,6 +769,8 @@ 769 769 770 770 ))) 771 771 809 + 810 + 772 772 (% style="color:blue" %)**Downlink Command: 0x2200aaFF** 773 773 774 774 If the downlink payload=220001FF, it means setting the data rate to 1, while type code is 22 00 aa FF. ... ... @@ -778,6 +778,7 @@ 778 778 779 779 780 780 820 + 781 781 == 7.5 Frame Counter Downlink == 782 782 783 783 ... ... @@ -798,6 +798,7 @@ 798 798 799 799 800 800 841 + 801 801 == 7.6 Frame Counter Uplink == 802 802 803 803 Feature: Get or Set the Frame Counter Uplink. ... ... @@ -817,6 +817,7 @@ 817 817 818 818 819 819 861 + 820 820 == 7.7 Join Accept Delay1 == 821 821 822 822 ... ... @@ -837,6 +837,7 @@ 837 837 838 838 839 839 882 + 840 840 == 7.8 Join Accept Delay2 == 841 841 842 842 ... ... @@ -857,6 +857,7 @@ 857 857 858 858 859 859 903 + 860 860 == 7.9 Public Network Mode == 861 861 862 862 ... ... @@ -886,6 +886,7 @@ 886 886 887 887 888 888 933 + 889 889 == 7.10 Receive Delay1 == 890 890 891 891 ... ... @@ -906,6 +906,7 @@ 906 906 907 907 908 908 954 + 909 909 == 7.11 Receive Delay2 == 910 910 911 911 ... ... @@ -926,6 +926,7 @@ 926 926 927 927 928 928 975 + 929 929 == 7.12 Rx2 Window Data Rate == 930 930 931 931 ... ... @@ -946,6 +946,7 @@ 946 946 947 947 948 948 996 + 949 949 == 7.13 Rx2 Window Frequency == 950 950 951 951 ... ... @@ -966,6 +966,7 @@ 966 966 967 967 968 968 1017 + 969 969 == 7.14 Transmit Power == 970 970 971 971 ... ... @@ -995,6 +995,7 @@ 995 995 996 996 997 997 1047 + 998 998 == 7.15 RSSI of the Last Received Packet == 999 999 1000 1000 ... ... @@ -1012,6 +1012,7 @@ 1012 1012 1013 1013 1014 1014 1065 + 1015 1015 == 7.16 SNR of the Last Received Packet == 1016 1016 1017 1017 ... ... @@ -1029,6 +1029,7 @@ 1029 1029 1030 1030 1031 1031 1083 + 1032 1032 == 7.17 Application Port == 1033 1033 1034 1034 ... ... @@ -1045,6 +1045,8 @@ 1045 1045 ))) 1046 1046 |(% style="width:157px" %)AT+PORT=21|(% style="width:204px" %)Set the application port|(% style="width:135px" %)OK 1047 1047 1100 + 1101 + 1048 1048 (% style="color:blue" %)**Downlink Command: 0x23** 1049 1049 1050 1050 Format: Command Code (0x23) followed by 1 bytes port value. ... ... @@ -1056,6 +1056,7 @@ 1056 1056 1057 1057 1058 1058 1113 + 1059 1059 == 7.18 Single Channel Mode == 1060 1060 1061 1061 ... ... @@ -1074,6 +1074,7 @@ 1074 1074 1075 1075 1076 1076 1132 + 1077 1077 == 7.19 Eight Channel Mode == 1078 1078 1079 1079 ... ... @@ -1092,8 +1092,10 @@ 1092 1092 ))) 1093 1093 |(% style="width:160px" %)AT+CHE=1|(% style="width:198px" %)Set eight channels mode|(% style="width:349px" %)OK 1094 1094 1095 -(% style="color:blue" %)**Downlink Command: 0x24 (LHT65,LHT65N Downlink Command:0x07)** 1096 1096 1152 + 1153 +(% style="color:blue" %)**Downlink Command: 0x24** 1154 + 1097 1097 Format: Command Code (0x24) followed by 1 bytes channel value. 1098 1098 1099 1099 If the downlink payload=2401, it means set channel mode to 1, while type code is 24. ... ... @@ -1103,6 +1103,7 @@ 1103 1103 1104 1104 1105 1105 1164 + 1106 1106 == 7.20 Get or Set RXwindows1 timeout == 1107 1107 1108 1108 ... ... @@ -1134,6 +1134,7 @@ 1134 1134 ((( 1135 1135 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. 1136 1136 1196 + 1137 1137 1138 1138 ))) 1139 1139 ... ... @@ -1155,6 +1155,7 @@ 1155 1155 1156 1156 1157 1157 1218 + 1158 1158 == 7.22 Setting up uplinkdwelltime (as923, au915) == 1159 1159 1160 1160 ... ... @@ -1171,6 +1171,8 @@ 1171 1171 ))) 1172 1172 |(% style="width:183px" %)AT+DWELLT=0|(% style="width:179px" %)Set uplinkdwelltime|(% style="width:131px" %)OK 1173 1173 1235 + 1236 + 1174 1174 (% style="color:blue" %)**Downlink Command: 0x25** 1175 1175 1176 1176 Format: Command Code (0x25) followed by 1 bytes state value. ... ... @@ -1182,6 +1182,7 @@ 1182 1182 1183 1183 1184 1184 1248 + 1185 1185 == 7.23 Set Packet Receiving Response Level == 1186 1186 1187 1187 ... ... @@ -1202,6 +1202,9 @@ 1202 1202 * For Class C devices used in ChirpStack, need to set AT+RPL=4 because Chirpstack require immedietely reply message to MAC Command. 1203 1203 * 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. 1204 1204 1269 + 1270 + 1271 + 1205 1205 (% style="color:blue" %)**AT Command: AT+RPL** 1206 1206 1207 1207 (% border="1" style="background-color:#ffffcc; color:green; width:536.222px" %) ... ... @@ -1212,6 +1212,8 @@ 1212 1212 ))) 1213 1213 |(% style="width:160px" %)AT+RPL=0|(% style="width:263px" %)Set packet receiving response level|(% style="width:109px" %)OK 1214 1214 1282 + 1283 + 1215 1215 (% style="color:blue" %)**Downlink Command: 0x21** 1216 1216 1217 1217 Format: Command Code (0x21) followed by 1 bytes level value. ... ... @@ -1223,6 +1223,7 @@ 1223 1223 1224 1224 1225 1225 1295 + 1226 1226 == 7.24 Controls NBTrans in unconfirmed uplink mode(LWS007 NBTrans:Set retransmission packets) == 1227 1227 1228 1228 ... ... @@ -1244,6 +1244,8 @@ 1244 1244 OK 1245 1245 ))) 1246 1246 1317 + 1318 + 1247 1247 (% style="color:blue" %)**Downlink Command: 0x33** 1248 1248 1249 1249 Format: Command Code (0x33) followed by 2 bytes mode value. ... ... @@ -1255,6 +1255,7 @@ 1255 1255 1256 1256 1257 1257 1330 + 1258 1258 == 7.25 Device offline rejoining (LWS007) == 1259 1259 1260 1260 ... ... @@ -1291,6 +1291,8 @@ 1291 1291 OK 1292 1292 ))) 1293 1293 1367 + 1368 + 1294 1294 (% style="color:blue" %)**Downlink Command: 0x33** 1295 1295 1296 1296 Format: Command Code (0x32) followed by 2 bytes mode value. ... ... @@ -1301,6 +1301,7 @@ 1301 1301 1302 1302 1303 1303 1379 + 1304 1304 == 7.26 Request the server to send an ACK == 1305 1305 1306 1306 ... ... @@ -1320,6 +1320,7 @@ 1320 1320 1321 1321 1322 1322 1399 + 1323 1323 == 7.27 Adjust network rejoining interval == 1324 1324 1325 1325 ... ... @@ -1328,15 +1328,17 @@ 1328 1328 (% border="1" style="background-color:#ffffcc; color:green; width:727.222px" %) 1329 1329 |=(% colspan="3" style="width: 724px;" %)AT+RJTDC 1330 1330 |(% style="width:165px" %)**Command Example**|(% style="width:227px" %)**Function**|(% style="width:329px" %)**Response** 1331 -|(% style="width:165px" %)AT+RJTDC=?|(% style="width:227px" %)Show the ReJoin data transmission interval in min|(% style="width:329px" %)30((( 1408 +|(% style="width:165px" %)AT+RJTDC=?|(% style="width:227px" %)Show the ReJoin data transmission interval in min|(% style="width:329px" %)30000((( 1332 1332 OK 1333 1333 1334 -the interval is 30 in1411 +the interval is 30000ms = 30s 1335 1335 ))) 1336 -|(% style="width:165px" %)AT+RJTDC=60|(% style="width:227px" %)Set the ReJoin data transmission interval in min|(% style="width:329px" %)OK((( 1337 -Set the ReJoin data transmission interval to 60 in1413 +|(% style="width:165px" %)AT+RJTDC=60000|(% style="width:227px" %)Set the ReJoin data transmission interval in min|(% style="width:329px" %)OK((( 1414 +Set the ReJoin data transmission interval to 60000ms = 60 seconds 1338 1338 ))) 1339 1339 1417 + 1418 + 1340 1340 (% style="color:blue" %)**Downlink Command: 0x26** 1341 1341 1342 1342 Format: Command Code (0x26) followed by 2 bytes mode value. ... ... @@ -1348,16 +1348,19 @@ 1348 1348 1349 1349 1350 1350 1430 + 1351 1351 = 8. AT Commands Combination = 1352 1352 1433 + 1353 1353 == 8.1 Set a fix RX2DR for downlink window == 1354 1354 1355 1355 1356 1356 * (% style="color:blue" %)**AT+ADR=0 **(%%) **~-~->** Disable ADR first 1357 -* (% style="color: blue" %)**AT+RX2DR=xxxx** (%%) **~-~->** Set xxxx to your wanted DataRate1438 +* (% style="color:red" %)**AT+RX2DR=xxxx** (%%) **~-~->** Set xxxx to your wanted DataRate 1358 1358 1359 1359 1360 1360 1442 + 1361 1361 == 8.2 Use Downlink Command to set a fix uplink DR == 1362 1362 1363 1363