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
-
... ... @@ -7,10 +7,10 @@ 7 7 8 8 Dragino LoRaWAN End Node support two types of AT Commands and Downlink Commands: 9 9 10 -* **Common Commands:**They should be available for each sensor, such as: change uplink interval, reset device.11 -* **Sensor Related Commands:**Only for special sensor, such as control relay, poll RS485 device.10 +* Common Commands: They should be available for each sensor, such as: change uplink interval, reset device. 11 +* Sensor Related Commands: Only for special sensor, such as control relay, poll RS485 device. 12 12 13 - **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.**13 +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. 14 14 15 15 16 16 = 2. How to use AT Commands or Downlink command = ... ... @@ -21,23 +21,26 @@ 21 21 ** Use Base64 format to send a downlink: [[Chirpstack>>url:https://wiki.dragino.com/index.php/Notes_for_ChirpStack#Downlink]]. 22 22 ** See use note for more serves [[Servers Note>>url:https://wiki.dragino.com/index.php/Main_Page#Use_Note_for_Server]] 23 23 24 + 25 +\\ 26 + 24 24 = 3. Support End Node and firmware version = 25 25 26 -(% border="1" style="background-color:#ffffcc; color:green; width:942.222px" %) 27 -|=(% colspan="3" style="width: 939px;" %) Dragino STM32 base hardware Firmware / LoRaWAN stack list 28 -|(% style="width:187px" %)**Model**|(% style="width:306px" %)**Description**|(% style="width:443px" %)**Firmware Version <~-~-> Stack Version** 29 -|(% style="width:187px" %)[[LSN50-v1>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/128-lsn50.html]], [[LSN50-V2>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/155-lsn50-v2.html]],|(% style="width:306px" %)Open Source Generic LoRaWAN Sensor Node|(% style="width:443px" %)LSN50 v1.6.0 <~-~-> DR-LWS-003;((( 29 +|=(% colspan="3" %)Dragino STM32 base hardware Firmware / LoRaWAN stack list 30 +|**Model**|**Description**|**Firmware Version <~-~-> Stack Version** 31 +|[[LSN50-v1>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/128-lsn50.html]], [[LSN50-V2>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/155-lsn50-v2.html]],|Open Source Generic LoRaWAN Sensor Node|LSN50 v1.6.0 <~-~-> DR-LWS-003;((( 30 30 LSN50 v1.7.0 <~-~-> DR-LWS-005; ~-~-> Support since this version 31 31 ))) 32 -| (% style="width:187px" %)[[LGT92>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/142-lgt-92.html]],|(% style="width:306px" %)LoRaWAN GPS Tracker|(% style="width:443px" %)LGT92 v1.6.3 <~-~-> DR-LWS-003;(((34 +|[[LGT92>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/142-lgt-92.html]],|LoRaWAN GPS Tracker|LGT92 v1.6.3 <~-~-> DR-LWS-003;((( 33 33 LGT92 v1.6.4 <~-~-> DR-LWS-005;~-~-> Support since this version 34 34 ))) 35 -| (% style="width:187px" %)[[LBT1>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/165-lbt1.html]],|(% style="width:306px" %)LoRaWAN BLE Indoor Tracker|(% style="width:443px" %)LBT1 v1.0 <~-~-> DR-LWS-005;36 -| (% style="width:187px" %)[[RS485-LN>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/154-rs485-ln.html]],|(% style="width:306px" %)LoRaWAN RS485 Modbus Converter|(% style="width:443px" %)RS485-LN v1.3 <~-~-> DR-LWS-005;37 -| (% style="width:187px" %)[[LHT65>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/151-lht65.html]],|(% style="width:306px" %)LoRaWAN Temperature & Humidity Sensor|(% style="width:443px" %)LHT65 v1.7 <~-~-> DR-LWS-003;(((37 +|[[LBT1>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/165-lbt1.html]],|LoRaWAN BLE Indoor Tracker|LBT1 v1.0 <~-~-> DR-LWS-005; 38 +|[[RS485-LN>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/154-rs485-ln.html]],|LoRaWAN RS485 Modbus Converter|RS485-LN v1.3 <~-~-> DR-LWS-005; 39 +|[[LHT65>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/151-lht65.html]],|LoRaWAN Temperature & Humidity Sensor|LHT65 v1.7 <~-~-> DR-LWS-003;((( 38 38 LHT65 v1.8.0 <~-~-> DR-LWS-005;~-~-> Support since this version 39 39 ))) 40 40 43 + 41 41 = 4. System Management Commands = 42 42 43 43 == 4.1 Change Uplink Interval == ... ... @@ -44,59 +44,48 @@ 44 44 45 45 Feature: Change LoRaWAN End Node Transmit Interval. 46 46 47 -(% class="box infomessage" %) 48 -((( 49 49 AT Command: AT+TDC 50 -))) 51 51 52 -(% border="1" style="background-color:#ffffcc; color:green; width:727.222px" %) 53 -|=(% colspan="3" style="width: 724px;" %) AT+TDC 54 -|(% style="width:165px" %)**Command Example**|(% style="width:227px" %)**Function**|(% style="width:329px" %)**Response** 55 -|(% style="width:165px" %)AT+TDC=?|(% style="width:227px" %)Show current transmit Interval|(% style="width:329px" %)30000((( 52 +|=(% colspan="3" %)AT+TDC 53 +|**Command Example**|**Function**|**Response** 54 +|AT+TDC=?|Show current transmit Interval|30000((( 56 56 OK 57 57 58 58 the interval is 30000ms = 30s 59 59 ))) 60 -| (% style="width:165px" %)AT+TDC=60000|(% style="width:227px" %)Set Transmit Interval|(% style="width:329px" %)OK(((59 +|AT+TDC=60000|Set Transmit Interval|OK((( 61 61 Set transmit interval to 60000ms = 60 seconds 62 62 ))) 63 63 64 -**Downlink Command: 0x01** 65 65 64 +Downlink Command: 0x01 65 + 66 66 Format: Command Code (0x01) followed by 3 bytes time value. 67 67 68 68 If the downlink payload=0100003C, it means set the END Node’s Transmit Interval to 0x00003C=60(S), while type code is 01. 69 69 70 -* **Example 1**: Downlink Payload:**0100001E**~/~/ Set Transmit Interval (TDC) = 30 seconds71 -* **Example 2**: Downlink Payload:**0100003C**~/~/ Set Transmit Interval (TDC) = 60 seconds70 +* Example 1: Downlink Payload: 0100001E ~/~/ Set Transmit Interval (TDC) = 30 seconds 71 +* Example 2: Downlink Payload: 0100003C ~/~/ Set Transmit Interval (TDC) = 60 seconds 72 72 73 73 == 4.2 Reboot End Node == 74 74 75 75 Feature: Reboot End Node to perform a new OTAA or ABP Join. 76 76 77 -{{info}} 78 78 AT Command: ATZ 79 -{{/info}} 80 80 81 -(% border="1" style="background-color:#ffffcc; color:green; width:727.222px" %) 82 82 |=(% colspan="3" %)ATZ: Trig a reset of the MCU 83 83 |**Command Example**|**Function**|**Response** 84 -))) 85 -|ATZ|Reset MCU| 86 -((( 87 -Device reset and show booting info 81 +|ATZ|Reset MCU|Device reset and show booting info 88 88 89 -LSN50 Device/LoRa ST Module 90 - 83 +{{{LSN50 Device/LoRa ST Module 91 91 Image Version: XX 92 - 93 93 Frequency Band: XX 94 - 95 95 DevEui= XX XX XX XX XX XX XX XX 96 96 97 97 <followed by the Tx and Rx information> 98 - )))89 +}}} 99 99 91 + 100 100 Downlink Command: 0x04 101 101 102 102 Format: Command Code (0x04) followed by FF. ... ... @@ -136,7 +136,7 @@ 136 136 137 137 |=(% colspan="3" %)AT+VER: Image Version and Frequency Band 138 138 |**Command Example**|**Function**|**Response** 139 -|AT+VER=?|Show Image version and Frequency Band| 131 +|AT+VER=?|Show Image version and Frequency Band| 140 140 141 141 {{{1.3 EU868 142 142 OK ... ... @@ -155,6 +155,7 @@ 155 155 * 0x00 02: LBT1 156 156 * 0x00 03: LSE01/LDDS75/LDDS20/LSPH01/LLMS01/LSNPK01 157 157 150 + 158 158 yy: Frequency Band: 159 159 160 160 * 0x01: EU868 ... ... @@ -181,7 +181,7 @@ 181 181 182 182 |=(% colspan="3" %)AT+CFG: Print all configurations 183 183 |**Command Example**|**Function**|**Response** 184 -|AT+CFG|Show all configures| 177 +|AT+CFG|Show all configures| 185 185 186 186 {{{AT+DEUI = XX XX XX XX XX XX XX XX 187 187 AT+DADDR=XXXXXXXX ... ... @@ -207,6 +207,7 @@ 207 207 ))) 208 208 |AT+APPEUI=00 b3 d5 7e f0 00 4d 34|Set the Application EUI|OK 209 209 203 + 210 210 == 5.2 Application Key == 211 211 212 212 Feature: Get or Set the Application Key. ... ... @@ -220,6 +220,7 @@ 220 220 ))) 221 221 |AT+APPKEY=00 35 55 55 22 23 55 53 43 24 23 42 34 35 35 35|Set the Application Key.|OK 222 222 217 + 223 223 == 5.3 Application Session Key == 224 224 225 225 Feature: Get or Set the Application Session Key. ... ... @@ -235,6 +235,7 @@ 235 235 OK 236 236 ))) 237 237 233 + 238 238 == 5.4 Device Address == 239 239 240 240 Feature: Get or Set the Device Address. ... ... @@ -250,6 +250,7 @@ 250 250 ))) 251 251 |AT+DADDR=A8 40 41 FF|Set the Application Session Key.|OK 252 252 249 + 253 253 == 5.5 Device EUI == 254 254 255 255 Feature: Get or Set the Device EUI. ... ... @@ -265,6 +265,7 @@ 265 265 OK 266 266 ))) 267 267 265 + 268 268 == 5.6 Network ID == 269 269 270 270 Feature: Get or Set the Network ID.(You can enter this command change only after successful network connection) ... ... @@ -278,6 +278,7 @@ 278 278 ))) 279 279 |AT+NWKID=A8 40 41 FF|Set the Network ID.|OK 280 280 279 + 281 281 == 5.7 Network Session Key == 282 282 283 283 Feature: Get or Set the Network Session Key ... ... @@ -291,6 +291,7 @@ 291 291 ))) 292 292 |AT+NWKSKEY=A8 40 41 FF FF 12 34 56 00 01 02 04 05 06 06 07|Set the Network Session Key.|OK 293 293 293 + 294 294 = 6. Joining and sending date on LoRaWAN network = 295 295 296 296 == 6.1 Confirm Mode == ... ... @@ -307,6 +307,7 @@ 307 307 |AT+CFM=1|Set the confirmation mode|OK 308 308 |AT+CFM=2|Set the confirmation mode|While Error in format, return AT_PARAM_ERROR 309 309 310 + 310 310 Downlink Command: 0x05 311 311 312 312 Format: Command Code (0x05) followed by 2 bytes mode value. ... ... @@ -316,6 +316,7 @@ 316 316 * Example 1: Downlink Payload: 0501 ~/~/ Set AT+CFM=1 317 317 * Example 2: Downlink Payload: 0500 ~/~/ Set AT+CFM=0 318 318 320 + 319 319 == 6.2 Confirm Status == 320 320 321 321 Feature: Get confirmation status of the last AT+SEND (0-1). ... ... @@ -328,6 +328,7 @@ 328 328 OK 329 329 ))) 330 330 333 + 331 331 == 6.3 Join LoRa® Network == 332 332 333 333 Feature: Join network. ... ... @@ -342,6 +342,7 @@ 342 342 While Error in format, return AT_BUSY_ERROR 343 343 ))) 344 344 348 + 345 345 == 6.4 LoRa® Network Join Mode == 346 346 347 347 Feature: Get or Set the Network Join Mode. (0: ABP, 1: OTAA). ... ... @@ -356,6 +356,7 @@ 356 356 |AT+NJM=0|Set the Network Join Mode|OK 357 357 |AT+NJM=2|Set the Network Join Mode|While Error in format, return AT_PARAM_ERROR 358 358 363 + 359 359 Downlink Command: 0x20 360 360 361 361 Format: Command Code (0x20) followed by 1 bytes mode value. ... ... @@ -365,6 +365,7 @@ 365 365 * Example 1: Downlink Payload: 2000 ~/~/ Set AT+NJM=O 366 366 * Example 2: Downlink Payload: 2001 ~/~/ Set AT+NJM=1 367 367 373 + 368 368 == 6.5 LoRa® Network Join Status == 369 369 370 370 Feature: LoRa® Network Join Status. ... ... @@ -377,6 +377,7 @@ 377 377 OK 378 378 ))) 379 379 386 + 380 380 == 6.6 Print Last Received Data in Raw Format == 381 381 382 382 Feature: Print Last Received Data in Raw Format<port:data>. ... ... @@ -389,6 +389,7 @@ 389 389 OK 390 390 ))) 391 391 399 + 392 392 == 6.7 Print Last Received Data in Binary Format == 393 393 394 394 Feature: Print Last Received Data in Binary Format<port:data>. ... ... @@ -401,6 +401,7 @@ 401 401 OK 402 402 ))) 403 403 412 + 404 404 == 6.8 Send Text Data == 405 405 406 406 Feature: Send Text Data<port:data>. ... ... @@ -417,6 +417,7 @@ 417 417 418 418 ))) 419 419 429 + 420 420 == 6.9 Send Hexadecimal Data == 421 421 422 422 Feature: Send hexadecimal data along with the application port. ... ... @@ -432,6 +432,7 @@ 432 432 433 433 ))) 434 434 445 + 435 435 = 7. LoRaWAN network management = 436 436 437 437 == 7.1 Adaptive Data Rate == ... ... @@ -451,6 +451,7 @@ 451 451 AT_PARAM_ERROR 452 452 ))) 453 453 465 + 454 454 Downlink Command: 0x22 455 455 456 456 ... ... @@ -459,6 +459,7 @@ 459 459 * Example 1: Downlink Payload: 2201 ~/~/ Set AT+ADR=1. 460 460 * Example 2: Downlink Payload: 2200FFFF ~/~/ Set AT+ADR=0. 461 461 474 + 462 462 == 7.2 LoRa® Class == 463 463 464 464 Feature: Get or Set the Device Class(Currently only support class A, class C). ... ... @@ -474,6 +474,7 @@ 474 474 475 475 ))) 476 476 490 + 477 477 == 7.3 Duty Cycle Setting == 478 478 479 479 Feature: Get or Set the ETSI Duty Cycle setting - 0=disable, 1=enable - Only for testing. ... ... @@ -489,6 +489,7 @@ 489 489 490 490 ))) 491 491 506 + 492 492 == 7.4 Data Rate == 493 493 494 494 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 ... ... @@ -504,6 +504,7 @@ 504 504 505 505 ))) 506 506 522 + 507 507 Downlink Command: 0x2200aaFF 508 508 509 509 ... ... @@ -512,6 +512,7 @@ 512 512 * Example 1: Downlink Payload: 220001FF ~/~/ Set AT+DR=1. 513 513 * Example 2: Downlink Payload: 220000FF ~/~/ Set AT+DR=0. 514 514 531 + 515 515 == 7.5 Frame Counter Downlink == 516 516 517 517 Feature: Get or Set the Frame Counter Downlink. ... ... @@ -529,6 +529,7 @@ 529 529 530 530 ))) 531 531 549 + 532 532 == 7.6 Frame Counter Uplink == 533 533 534 534 Feature: Get or Set the Frame Counter Uplink. ... ... @@ -544,6 +544,7 @@ 544 544 545 545 ))) 546 546 565 + 547 547 == 7.7 Join Accept Delay1 == 548 548 549 549 Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 1 in ms. ... ... @@ -559,6 +559,7 @@ 559 559 560 560 ))) 561 561 581 + 562 562 == 7.8 Join Accept Delay2 == 563 563 564 564 Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 2 in ms. ... ... @@ -574,6 +574,7 @@ 574 574 575 575 ))) 576 576 597 + 577 577 == 7.9 Public Network Mode == 578 578 579 579 Feature: Get or Set the public network mode. (0: off, 1: on) ... ... @@ -591,6 +591,7 @@ 591 591 592 592 ))) 593 593 615 + 594 594 == 7.10 Receive Delay1 == 595 595 596 596 Feature: Get or Set the delay between the end of the Tx and the Rx Window 1 in ms ... ... @@ -606,6 +606,7 @@ 606 606 607 607 ))) 608 608 631 + 609 609 == 7.11Receive Delay2 == 610 610 611 611 Feature: Get or Set the delay between the end of the Tx and the Rx Window 2 in ms ... ... @@ -621,6 +621,7 @@ 621 621 622 622 ))) 623 623 647 + 624 624 == 7.12 Rx2 Window Data Rate == 625 625 626 626 Feature: Get or Set the Rx2 window data rate (0-7 corresponding to DR_X) ... ... @@ -636,6 +636,7 @@ 636 636 637 637 ))) 638 638 663 + 639 639 == 7.13 Rx2 Window Frequency == 640 640 641 641 Feature: Get or Set the Rx2 window frequency ... ... @@ -651,6 +651,7 @@ 651 651 652 652 ))) 653 653 679 + 654 654 == 7.14 Transmit Power == 655 655 656 656 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. ) ... ... @@ -673,6 +673,7 @@ 673 673 * Example 1: Downlink Payload: 22000102 ~/~/ Set AT+TXP=2. 674 674 * Example 2: Downlink Payload: 220000FF ~/~/ Set AT+TXP=0. 675 675 702 + 676 676 == 7.15 RSSI of the Last Received Packet == 677 677 678 678 Feature: Get or Set the Rx2 window frequency ... ... @@ -685,6 +685,7 @@ 685 685 OK 686 686 ))) 687 687 715 + 688 688 == 7.16 SNR of the Last Received Packet == 689 689 690 690 Feature: Get the SNR of the last received packet ... ... @@ -697,6 +697,7 @@ 697 697 OK 698 698 ))) 699 699 728 + 700 700 == 7.17 Application Port == 701 701 702 702 Feature: Get or set the application port. ... ... @@ -710,6 +710,7 @@ 710 710 ))) 711 711 |AT+PORT=21|Set the application port|OK 712 712 742 + 713 713 Downlink Command: 0x23 714 714 715 715 Format: Command Code (0x23) followed by 1 bytes port value. ... ... @@ -719,6 +719,7 @@ 719 719 * Example 1: Downlink Payload: 2301 ~/~/ set the application port to 1 720 720 * Example 2: Downlink Payload: 2305 ~/~/ set the application port to 5 721 721 752 + 722 722 == 7.18 Single Channel Mode == 723 723 724 724 Feature:Get or Set Frequency (Unit: Hz) for Single Channel Mode. ... ... @@ -732,6 +732,7 @@ 732 732 ))) 733 733 |AT+CHS=868100000|Set Frequency for Single Channel Mode|OK 734 734 766 + 735 735 == 7.19 Eight Channel Mode == 736 736 737 737 Feature: Get or Set eight channels mode,Only for US915,AU915,CN470. ... ... @@ -747,6 +747,7 @@ 747 747 ))) 748 748 |AT+CHE=1|Set eight channels mode|OK 749 749 782 + 750 750 Downlink Command: 0x24 751 751 752 752 Format: Command Code (0x24) followed by 1 bytes channel value. ... ... @@ -756,6 +756,7 @@ 756 756 * Example 1: Downlink Payload: 2401 ~/~/ set channel mode to 1 757 757 * Example 2: Downlink Payload: 2405 ~/~/ set channel mode to 5 758 758 792 + 759 759 == 7.20 Get or Set RXwindows1 timeout == 760 760 761 761 Feature:Get or Set the number of symbols to detect and timeout from RXwindow1(0 to 255). ... ... @@ -788,6 +788,7 @@ 788 788 ))) 789 789 |AT+RX2WTO=20|Set RXwindows2 timeout|OK 790 790 825 + 791 791 == 7.22 Setting up uplinkdwelltime (as923, au915) == 792 792 793 793 Feature: Get or Set uplinkdwelltime ... ... @@ -801,6 +801,7 @@ 801 801 ))) 802 802 |AT+DWELLT=0|Set uplinkdwelltime|OK 803 803 839 + 804 804 Downlink Command: 0x25 805 805 806 806 Format: Command Code (0x25) followed by 1 bytes state value. ... ... @@ -810,6 +810,7 @@ 810 810 * Example 1: Downlink Payload: 2501 ~/~/ set uplinkdwelltime to 1 811 811 * Example 2: Downlink Payload: 2500 ~/~/ set uplinkdwelltime to 0 812 812 849 + 813 813 == 7.23 Set Packet Receiving Response Level == 814 814 815 815 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. ... ... @@ -828,6 +828,7 @@ 828 828 * For Class C devices used in ChirpStack, need to set AT+RPL=4 because Chirpstack require immedietely reply message to MAC Command. 829 829 * 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. 830 830 868 + 831 831 AT Command: AT+RPL 832 832 833 833 |=(% colspan="3" %)AT+RPL ... ... @@ -837,6 +837,7 @@ 837 837 ))) 838 838 |AT+RPL=0|Set packet receiving response level|OK 839 839 878 + 840 840 Downlink Command: 0x21 841 841 842 842 Format: Command Code (0x21) followed by 1 bytes level value. ... ... @@ -846,6 +846,7 @@ 846 846 * Example 1: Downlink Payload: 2101 ~/~/ set packet receiving response level to 1 847 847 * Example 2: Downlink Payload: 2102 ~/~/ set packet receiving response level to 2 848 848 888 + 849 849 = 8. AT Commands Combination = 850 850 851 851 == 8.1 Set a fix RX2DR for downlink window == ... ... @@ -853,6 +853,7 @@ 853 853 * AT+ADR=0 ~-~-> Disable ADR first 854 854 * AT+RX2DR=xxxx ~-~-> Set xxxx to your wanted DataRate 855 855 896 + 856 856 == 8.2 Use Downlink Command to set a fix uplink DR == 857 857 858 858 Downlink Command: 0x22000500