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
-
... ... @@ -1,4 +1,4 @@ 1 - ** Table of** **Contents:**1 + **Contents:** 2 2 3 3 {{toc/}} 4 4 ... ... @@ -6,7 +6,6 @@ 6 6 7 7 = 1. Introduction = 8 8 9 - 10 10 Dragino LoRaWAN End Node support two types of AT Commands and Downlink Commands: 11 11 12 12 * **Common Commands:** They should be available for each sensor, such as: change uplink interval, reset device. ... ... @@ -19,7 +19,6 @@ 19 19 20 20 = 2. How to use AT Commands or Downlink command = 21 21 22 - 23 23 * 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/]] 24 24 * 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: 25 25 ** Use HEX format to send a downlink: [[TTN v3>>Notes for TTN]] ... ... @@ -30,7 +30,6 @@ 30 30 31 31 = 3. Support End Node and firmware version = 32 32 33 - 34 34 (% border="1" style="background-color:#ffffcc; color:green; width:966px" %) 35 35 |=(% colspan="3" style="width: 963px;" %)((( 36 36 Dragino STM32 base hardware Firmware / LoRaWAN stack list ... ... @@ -106,10 +106,8 @@ 106 106 107 107 = 4. System Management Commands = 108 108 109 - 110 110 == 4.1 Change Uplink Interval == 111 111 112 - 113 113 Feature: Change LoRaWAN End Node Transmit Interval. 114 114 115 115 (% class="box infomessage" %) ... ... @@ -307,6 +307,8 @@ 307 307 OK 308 308 ))) 309 309 305 + 306 + 310 310 = 5. Keys, IDs and EUIs management = 311 311 312 312 == 5.1 Application EUI == ... ... @@ -325,6 +325,8 @@ 325 325 ))) 326 326 |(% style="width:305px" %)AT+APPEUI=00 b3 d5 7e f0 00 4d 34|(% style="width:186px" %)Set the Application EUI|(% style="width:191px" %)OK 327 327 325 + 326 + 328 328 == 5.2 Application Key == 329 329 330 330 Feature: Get or Set the Application Key. ... ... @@ -341,6 +341,8 @@ 341 341 ))) 342 342 |(% 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 343 343 343 + 344 + 344 344 == 5.3 Application Session Key == 345 345 346 346 Feature: Get or Set the Application Session Key. ... ... @@ -359,6 +359,8 @@ 359 359 OK 360 360 ))) 361 361 363 + 364 + 362 362 == 5.4 Device Address == 363 363 364 364 Feature: Get or Set the Device Address. ... ... @@ -377,6 +377,8 @@ 377 377 ))) 378 378 |(% style="width:192px" %)AT+DADDR=A8 40 41 FF|(% style="width:241px" %)Set the Application Session Key.|(% style="width:359px" %)OK 379 379 383 + 384 + 380 380 == 5.5 Device EUI == 381 381 382 382 Feature: Get or Set the Device EUI. ... ... @@ -395,6 +395,8 @@ 395 395 OK 396 396 ))) 397 397 403 + 404 + 398 398 == 5.6 Network ID == 399 399 400 400 Feature: Get or Set the Network ID.(You can enter this command change only after successful network connection) ... ... @@ -411,6 +411,8 @@ 411 411 ))) 412 412 |(% style="width:191px" %)AT+NWKID=A8 40 41 FF|(% style="width:153px" %)Set the Network ID.|(% style="width:101px" %)OK 413 413 421 + 422 + 414 414 == 5.7 Network Session Key == 415 415 416 416 Feature: Get or Set the Network Session Key ... ... @@ -427,12 +427,12 @@ 427 427 ))) 428 428 |(% 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 429 429 439 + 440 + 430 430 = 6. Joining and sending date on LoRaWAN network = 431 431 432 432 == 6.1 Confirm Mode == 433 433 434 -=== AT+CFM command before DR-LWS007 software stack === 435 - 436 436 Feature: Get or Set the confirmation mode (0-1). 437 437 438 438 {{info}} ... ... @@ -457,54 +457,8 @@ 457 457 * Example 1: Downlink Payload: 0501 ~/~/ Set AT+CFM=1 458 458 * Example 2: Downlink Payload: 0500 ~/~/ Set AT+CFM=0 459 459 460 -=== AT+CFM command since DR-LWS007 software stack === 461 461 462 -{{info}} 463 -**AT Command: AT+CFM** 464 -{{/info}} 465 465 466 -(% border="1" style="background-color:#ffffcc; color:green; width:710.222px" %) 467 -|=(% colspan="3" style="width: 707px;" %)AT+CFM 468 -|(% style="width:160px" %)**Command Example**|(% style="width:198px" %)**Function**|(% style="width:349px" %)**Response** 469 -|(% style="width:160px" %)((( 470 -AT+CFM=1,0,0 471 - 472 -value1 473 -)))|(% style="width:198px" %)confirmed uplink|(% style="width:349px" %)((( 474 -1 475 - 476 -OK 477 -))) 478 -|(% style="width:160px" %)((( 479 -AT+CFM=0,?,0 480 - 481 -value2 482 -)))|(% style="width:198px" %)set max retry , range: 0 ~~ 7|(% style="width:349px" %)((( 483 -0~~7 484 - 485 -OK 486 -))) 487 -|(% style="width:160px" %)((( 488 -AT+CFM=0,0,1 489 - 490 -value3 491 -)))|(% style="width:198px" %)uplink fcnt increase by 1 for each retry|(% style="width:349px" %)((( 492 -1 493 - 494 -OK 495 -))) 496 - 497 -{{info}} 498 -**Downlink Command: 0x05** 499 -{{/info}} 500 - 501 -Format: Command Code (0x05) followed by 2 bytes mode value. 502 - 503 -If the downlink payload=05010101, it means set end node to use confirm mode, while type code is 05. 504 - 505 -* Example 1: Downlink Payload: 05010101 ~/~/ Set AT+CFM=1,1,1 506 -* Example 2: Downlink Payload: 05000700 ~/~/ Set AT+CFM=0,7,0 507 - 508 508 == 6.2 Confirm Status == 509 509 510 510 Feature: Get confirmation status of the last AT+SEND (0-1). ... ... @@ -520,6 +520,8 @@ 520 520 OK 521 521 ))) 522 522 486 + 487 + 523 523 == 6.3 Join LoRa® Network == 524 524 525 525 Feature: Join network. ... ... @@ -537,6 +537,8 @@ 537 537 While Error in format, return AT_BUSY_ERROR 538 538 ))) 539 539 505 + 506 + 540 540 == 6.4 LoRa® Network Join Mode == 541 541 542 542 Feature: Get or Set the Network Join Mode. (0: ABP, 1: OTAA). ... ... @@ -562,9 +562,11 @@ 562 562 563 563 If the downlink payload=2000, it means set the Network Join Mode, while type code is 20. 564 564 565 -* **Example 1: **Downlink Payload: **2000** ~/~/ Set AT+NJM= 0532 +* **Example 1: **Downlink Payload: **2000** ~/~/ Set AT+NJM=O 566 566 * **Example 2:** Downlink Payload: **2001** ~/~/ Set AT+NJM=1 567 567 535 + 536 + 568 568 == 6.5 LoRa® Network Join Status == 569 569 570 570 Feature: LoRa® Network Join Status. ... ... @@ -580,6 +580,8 @@ 580 580 OK 581 581 ))) 582 582 552 + 553 + 583 583 == 6.6 Print Last Received Data in Raw Format == 584 584 585 585 Feature: Print Last Received Data in Raw Format<port:data>. ... ... @@ -595,6 +595,8 @@ 595 595 OK 596 596 ))) 597 597 569 + 570 + 598 598 == 6.7 Print Last Received Data in Binary Format == 599 599 600 600 Feature: Print Last Received Data in Binary Format<port:data>. ... ... @@ -610,6 +610,8 @@ 610 610 OK 611 611 ))) 612 612 586 + 587 + 613 613 == 6.8 Send Text Data == 614 614 615 615 Feature: Send Text Data<port:data>. ... ... @@ -629,6 +629,8 @@ 629 629 630 630 ))) 631 631 607 + 608 + 632 632 == 6.9 Send Hexadecimal Data == 633 633 634 634 Feature: Send hexadecimal data along with the application port. ... ... @@ -647,6 +647,8 @@ 647 647 648 648 ))) 649 649 627 + 628 + 650 650 = 7. LoRaWAN network management = 651 651 652 652 == 7.1 Adaptive Data Rate == ... ... @@ -678,6 +678,8 @@ 678 678 * **Example 1**: Downlink Payload: **2201** ~/~/ Set AT+ADR=1. 679 679 * **Example 2**: Downlink Payload: **2200FFFF** ~/~/ Set AT+ADR=0. 680 680 660 + 661 + 681 681 == 7.2 LoRa® Class == 682 682 683 683 Feature: Get or Set the Device Class(Currently only support class A, class C). ... ... @@ -696,6 +696,8 @@ 696 696 697 697 ))) 698 698 680 + 681 + 699 699 == 7.3 Duty Cycle Setting == 700 700 701 701 Feature: Get or Set the ETSI Duty Cycle setting - 0=disable, 1=enable - Only for testing. ... ... @@ -714,6 +714,8 @@ 714 714 715 715 ))) 716 716 700 + 701 + 717 717 == 7.4 Data Rate == 718 718 719 719 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 ... ... @@ -742,6 +742,8 @@ 742 742 * **Example 1**: Downlink Payload: **220001FF** ~/~/ Set AT+DR=1. 743 743 * **Example 2**: Downlink Payload: **220000FF** ~/~/ Set AT+DR=0. 744 744 730 + 731 + 745 745 == 7.5 Frame Counter Downlink == 746 746 747 747 Feature: Get or Set the Frame Counter Downlink. ... ... @@ -762,6 +762,8 @@ 762 762 763 763 ))) 764 764 752 + 753 + 765 765 == 7.6 Frame Counter Uplink == 766 766 767 767 Feature: Get or Set the Frame Counter Uplink. ... ... @@ -780,6 +780,8 @@ 780 780 781 781 ))) 782 782 772 + 773 + 783 783 == 7.7 Join Accept Delay1 == 784 784 785 785 Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 1 in ms. ... ... @@ -798,6 +798,8 @@ 798 798 799 799 ))) 800 800 792 + 793 + 801 801 == 7.8 Join Accept Delay2 == 802 802 803 803 Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 2 in ms. ... ... @@ -816,12 +816,12 @@ 816 816 817 817 ))) 818 818 819 -== 7.9 Public Network Mode == 820 820 821 -Feature: Get or Set the public network mode. (0: off, 1: on). A Public LoRaWAN network use 0x34 as syncword. Default Settings; PNM=1 822 822 823 - Notice:Ifuserbuild theirown LoRaWANserver butstill use syncword=0x34,this is still considereda public LoRaWAN network814 +== 7.9 Public Network Mode == 824 824 816 +Feature: Get or Set the public network mode. (0: off, 1: on) 817 + 825 825 {{info}} 826 826 **AT Command:AT+PNM** 827 827 {{/info}} ... ... @@ -832,17 +832,14 @@ 832 832 |(% style="width:166px" %)AT+PNM=?|(% style="width:225px" %)Get the public network mode.|(% style="width:272px" %)1((( 833 833 OK 834 834 ))) 835 -|(% style="width:166px" %)AT+PNM=1|(% style="width:225px" %)((( 836 -Set the public network mode. 837 - 838 -Set syncword=0x34 839 -)))|(% style="width:272px" %)(System will write new value to PNM)((( 828 +|(% style="width:166px" %)AT+PNM=1|(% style="width:225px" %)Set the public network mode.|(% style="width:272px" %)(System will write new value to PNM)((( 840 840 OK 841 841 842 842 843 843 ))) 844 -|(% style="width:166px" %)AT+PNM=0|(% style="width:225px" %)Set to use private network autoset syncword=0x12|(% style="width:272px" %) 845 845 834 + 835 + 846 846 == 7.10 Receive Delay1 == 847 847 848 848 Feature: Get or Set the delay between the end of the Tx and the Rx Window 1 in ms ... ... @@ -861,6 +861,8 @@ 861 861 862 862 ))) 863 863 854 + 855 + 864 864 == 7.11 Receive Delay2 == 865 865 866 866 Feature: Get or Set the delay between the end of the Tx and the Rx Window 2 in ms ... ... @@ -879,6 +879,8 @@ 879 879 880 880 ))) 881 881 874 + 875 + 882 882 == 7.12 Rx2 Window Data Rate == 883 883 884 884 Feature: Get or Set the Rx2 window data rate (0-7 corresponding to DR_X) ... ... @@ -897,6 +897,8 @@ 897 897 898 898 ))) 899 899 894 + 895 + 900 900 == 7.13 Rx2 Window Frequency == 901 901 902 902 Feature: Get or Set the Rx2 window frequency ... ... @@ -915,6 +915,8 @@ 915 915 916 916 ))) 917 917 914 + 915 + 918 918 == 7.14 Transmit Power == 919 919 920 920 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. ) ... ... @@ -940,6 +940,8 @@ 940 940 * **Example 1**: Downlink Payload: **22000102** ~/~/ Set AT+TXP=2. 941 941 * **Example 2**: Downlink Payload: **220000FF** ~/~/ Set AT+TXP=0. 942 942 941 + 942 + 943 943 == 7.15 RSSI of the Last Received Packet == 944 944 945 945 Feature: Get or Set the Rx2 window frequency ... ... @@ -955,6 +955,8 @@ 955 955 OK 956 956 ))) 957 957 958 + 959 + 958 958 == 7.16 SNR of the Last Received Packet == 959 959 960 960 Feature: Get the SNR of the last received packet ... ... @@ -970,6 +970,8 @@ 970 970 OK 971 971 ))) 972 972 975 + 976 + 973 973 == 7.17 Application Port == 974 974 975 975 Feature: Get or set the application port. ... ... @@ -997,6 +997,8 @@ 997 997 * **Example 1**: Downlink Payload: **2301** ~/~/ set the application port to 1 998 998 * **Example 2**: Downlink Payload:** 2305** ~/~/ set the application port to 5 999 999 1004 + 1005 + 1000 1000 == 7.18 Single Channel Mode == 1001 1001 1002 1002 Feature:Get or Set Frequency (Unit: Hz) for Single Channel Mode. ... ... @@ -1013,6 +1013,8 @@ 1013 1013 ))) 1014 1014 |(% style="width:182px" %)AT+CHS=868100000|(% style="width:295px" %)Set Frequency for Single Channel Mode|(% style="width:122px" %)OK 1015 1015 1022 + 1023 + 1016 1016 == 7.19 Eight Channel Mode == 1017 1017 1018 1018 Feature: Get or Set eight channels mode,Only for US915,AU915,CN470. ... ... @@ -1042,6 +1042,8 @@ 1042 1042 * **Example 1**: Downlink Payload: 2401 ~/~/ set channel mode to 1 1043 1043 * **Example 2**: Downlink Payload: 2405 ~/~/ set channel mode to 5 1044 1044 1053 + 1054 + 1045 1045 == 7.20 Get or Set RXwindows1 timeout == 1046 1046 1047 1047 Feature:Get or Set the number of symbols to detect and timeout from RXwindow1(0 to 255). ... ... @@ -1086,6 +1086,8 @@ 1086 1086 ))) 1087 1087 |(% style="width:190px" %)AT+RX2WTO=20|(% style="width:199px" %)Set RXwindows2 timeout|(% style="width:104px" %)OK 1088 1088 1099 + 1100 + 1089 1089 == 7.22 Setting up uplinkdwelltime (as923, au915) == 1090 1090 1091 1091 Feature: Get or Set uplinkdwelltime ... ... @@ -1113,6 +1113,8 @@ 1113 1113 * **Example 1**: Downlink Payload: **2501** ~/~/ set uplinkdwelltime to 1 1114 1114 * **Example 2**: Downlink Payload: **2500** ~/~/ set uplinkdwelltime to 0 1115 1115 1128 + 1129 + 1116 1116 == 7.23 Set Packet Receiving Response Level == 1117 1117 1118 1118 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. ... ... @@ -1154,129 +1154,8 @@ 1154 1154 * **Example 1**: Downlink Payload: **2101** ~/~/ set packet receiving response level to 1 1155 1155 * **Example 2**: Downlink Payload: **2102** ~/~/ set packet receiving response level to 2 1156 1156 1157 -== 7.24 Controls NBTrans in unconfirmed uplink mode(LWS007 NBTrans:Set retransmission packets) == 1158 1158 1159 -{{info}} 1160 -**AT Command: AT+SETMAXNBTRANS ** 1161 -{{/info}} 1162 1162 1163 -(% border="1" style="background-color:#ffffcc; color:green; width:536.222px" %) 1164 -|=(% colspan="3" style="width: 533px;" %)AT+**SETMAXNBTRANS** 1165 -|(% style="width:160px" %)**Command Example**|(% style="width:263px" %)**Function**|(% style="width:109px" %)**Response** 1166 -|(% style="width:160px" %)**AT+SETMAXNBTRANS=1,0**|(% style="width:263px" %)Value1: set the maximum NBTrans.|(% style="width:109px" %)1((( 1167 -OK 1168 -))) 1169 -|(% style="width:160px" %)**AT+SETMAXNBTRANS=?,1**|(% style="width:263px" %)value2: 0: uplink fcnt doesn't change for each NBTrans; 1: uplink fcnt increase by 1 for each NBTrans.|(% style="width:109px" %)((( 1170 -1 1171 - 1172 -OK 1173 -))) 1174 - 1175 -{{info}} 1176 -**Downlink Command: 0x33** 1177 -{{/info}} 1178 - 1179 -Format: Command Code (0x33) followed by 2 bytes mode value. 1180 - 1181 -If the downlink payload=330100, it means set end node to use confirm mode, while type code is 33. 1182 - 1183 -* Example 1: Downlink Payload: 330100 ~/~/ Set AT+SETMAXNBTRANS=1,0 1184 -* Example 2: Downlink Payload: 330201 ~/~/ Set AT+SETMAXNBTRANS=2,1 1185 - 1186 -== 7.25 Device offline rejoining (LWS007) == 1187 - 1188 -{{info}} 1189 -**AT Command: AT+DDETECT** 1190 -{{/info}} 1191 - 1192 -(% border="1" style="background-color:#ffffcc; color:green; width:710.222px" %) 1193 -|=(% colspan="3" style="width: 707px;" %)AT+**DDETECT** 1194 -|(% style="width:160px" %)**Command Example**|(% style="width:198px" %)**Function**|(% style="width:349px" %)**Response** 1195 -|(% style="width:160px" %)((( 1196 -AT+DDETECT=1,1440,2880 1197 - 1198 -value1 1199 -)))|(% style="width:198px" %)Enable online detect|(% style="width:349px" %)((( 1200 -1 1201 - 1202 -OK 1203 -))) 1204 -|(% style="width:160px" %)((( 1205 -AT+DDETECT=1,?,2880 1206 - 1207 -value2 1208 -)))|(% style="width:198px" %)Online detection packet sending time|(% style="width:349px" %)((( 1209 - 1210 - 1211 -OK 1212 -))) 1213 -|(% style="width:160px" %)((( 1214 -AT+DDETECT=1,1440,? 1215 - 1216 -value3 1217 -)))|(% style="width:198px" %)Process rejoin|(% style="width:349px" %)((( 1218 - 1219 - 1220 -OK 1221 -))) 1222 - 1223 -{{info}} 1224 -**Downlink Command: 0x33** 1225 -{{/info}} 1226 - 1227 -Format: Command Code (0x32) followed by 2 bytes mode value. 1228 - 1229 -If the downlink payload=320105A00B40, it means set end node to use confirm mode, while type code is 33. 1230 - 1231 -* Example 1: Downlink Payload: 320105A00B40 ~/~/ Set AT+DDETECT=1,1440,2880 1232 - 1233 -== 7.26 Request the server to send an ACK == 1234 - 1235 -{{info}} 1236 -**AT Command: AT+PNACKMD** 1237 -{{/info}} 1238 - 1239 -(% border="1" style="background-color:#ffffcc; color:green; width:536.222px" %) 1240 -|=(% colspan="3" style="width: 533px;" %)**AT+PNACKMD** 1241 -|(% style="width:160px" %)**Command Example**|(% style="width:263px" %)**Function**|(% style="width:109px" %)**Response** 1242 -|(% style="width:160px" %)**AT+PNACKMD=1**|(% style="width:263px" %)If the node uploads the ACK as confirm, it will request the server to send an ACK. If the server ack is not received, the node will upload the packets that have not received the ACK the next time it receives the ACK|(% style="width:109px" %)1((( 1243 -OK 1244 -))) 1245 -|(% style="width:160px" %)**AT+PNACKMD=0**|(% style="width:263px" %)off request the server to send an ACK|(% style="width:109px" %)((( 1246 -0 1247 - 1248 -OK 1249 -))) 1250 - 1251 -== 7.27 Adjust network rejoining interval == 1252 - 1253 -{{info}} 1254 -**AT Command: AT+RJTDC** 1255 -{{/info}} 1256 - 1257 -(% border="1" style="background-color:#ffffcc; color:green; width:727.222px" %) 1258 -|=(% colspan="3" style="width: 724px;" %)AT+RJTDC 1259 -|(% style="width:165px" %)**Command Example**|(% style="width:227px" %)**Function**|(% style="width:329px" %)**Response** 1260 -|(% style="width:165px" %)AT+RJTDC=?|(% style="width:227px" %)Show the ReJoin data transmission interval in min|(% style="width:329px" %)30000((( 1261 -OK 1262 - 1263 -the interval is 30000ms = 30s 1264 -))) 1265 -|(% style="width:165px" %)AT+RJTDC=60000|(% style="width:227px" %)Set the ReJoin data transmission interval in min|(% style="width:329px" %)OK((( 1266 -Set the ReJoin data transmission interval to 60000ms = 60 seconds 1267 -))) 1268 - 1269 -{{info}} 1270 -**Downlink Command: 0x26** 1271 -{{/info}} 1272 - 1273 -Format: Command Code (0x26) followed by 2 bytes mode value. 1274 - 1275 -If the downlink payload=26000A, it means set end node to use confirm mode, while type code is 26. 1276 - 1277 -* Example 1: Downlink Payload: 26000A ~/~/ Set AT+RJTDC=10 1278 -* Example 2: Downlink Payload: 260002 ~/~/ Set AT+RJTDC=2 1279 - 1280 1280 = 8. AT Commands Combination = 1281 1281 1282 1282 == 8.1 Set a fix RX2DR for downlink window == ... ... @@ -1284,6 +1284,8 @@ 1284 1284 * **AT+ADR=0 **~-~-> Disable ADR first 1285 1285 * **AT+RX2DR=xxxx** ~-~-> Set xxxx to your wanted DataRate 1286 1286 1180 + 1181 + 1287 1287 == 8.2 Use Downlink Command to set a fix uplink DR == 1288 1288 1289 1289 {{info}} ... ... @@ -1295,4 +1295,3 @@ 1295 1295 * AT+ADR=0 [[Reference>>||anchor="H7.1AdaptiveDataRate"]] 1296 1296 * AT+DR=5 [[Reference>>||anchor="H7.4DataRate"]] 1297 1297 * AT+TXP=0 [[Reference>>||anchor="H7.14TransmitPower"]] 1298 -~)~)~)