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,10 +21,12 @@ 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 -(% style="background-color:#ffffcc; color:green" %) 27 -|=(% colspan="3" %) Dragino STM32 base hardware Firmware / LoRaWAN stack list 29 +|=(% colspan="3" %)Dragino STM32 base hardware Firmware / LoRaWAN stack list 28 28 |**Model**|**Description**|**Firmware Version <~-~-> Stack Version** 29 29 |[[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 ... ... @@ -38,6 +38,7 @@ 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 == ... ... @@ -57,6 +57,7 @@ 57 57 Set transmit interval to 60000ms = 60 seconds 58 58 ))) 59 59 63 + 60 60 Downlink Command: 0x01 61 61 62 62 Format: Command Code (0x01) followed by 3 bytes time value. ... ... @@ -124,7 +124,7 @@ 124 124 125 125 |=(% colspan="3" %)AT+VER: Image Version and Frequency Band 126 126 |**Command Example**|**Function**|**Response** 127 -|AT+VER=?|Show Image version and Frequency Band| 131 +|AT+VER=?|Show Image version and Frequency Band| 128 128 129 129 {{{1.3 EU868 130 130 OK ... ... @@ -143,6 +143,7 @@ 143 143 * 0x00 02: LBT1 144 144 * 0x00 03: LSE01/LDDS75/LDDS20/LSPH01/LLMS01/LSNPK01 145 145 150 + 146 146 yy: Frequency Band: 147 147 148 148 * 0x01: EU868 ... ... @@ -169,7 +169,7 @@ 169 169 170 170 |=(% colspan="3" %)AT+CFG: Print all configurations 171 171 |**Command Example**|**Function**|**Response** 172 -|AT+CFG|Show all configures| 177 +|AT+CFG|Show all configures| 173 173 174 174 {{{AT+DEUI = XX XX XX XX XX XX XX XX 175 175 AT+DADDR=XXXXXXXX ... ... @@ -195,6 +195,7 @@ 195 195 ))) 196 196 |AT+APPEUI=00 b3 d5 7e f0 00 4d 34|Set the Application EUI|OK 197 197 203 + 198 198 == 5.2 Application Key == 199 199 200 200 Feature: Get or Set the Application Key. ... ... @@ -208,6 +208,7 @@ 208 208 ))) 209 209 |AT+APPKEY=00 35 55 55 22 23 55 53 43 24 23 42 34 35 35 35|Set the Application Key.|OK 210 210 217 + 211 211 == 5.3 Application Session Key == 212 212 213 213 Feature: Get or Set the Application Session Key. ... ... @@ -223,6 +223,7 @@ 223 223 OK 224 224 ))) 225 225 233 + 226 226 == 5.4 Device Address == 227 227 228 228 Feature: Get or Set the Device Address. ... ... @@ -238,6 +238,7 @@ 238 238 ))) 239 239 |AT+DADDR=A8 40 41 FF|Set the Application Session Key.|OK 240 240 249 + 241 241 == 5.5 Device EUI == 242 242 243 243 Feature: Get or Set the Device EUI. ... ... @@ -253,6 +253,7 @@ 253 253 OK 254 254 ))) 255 255 265 + 256 256 == 5.6 Network ID == 257 257 258 258 Feature: Get or Set the Network ID.(You can enter this command change only after successful network connection) ... ... @@ -266,6 +266,7 @@ 266 266 ))) 267 267 |AT+NWKID=A8 40 41 FF|Set the Network ID.|OK 268 268 279 + 269 269 == 5.7 Network Session Key == 270 270 271 271 Feature: Get or Set the Network Session Key ... ... @@ -279,6 +279,7 @@ 279 279 ))) 280 280 |AT+NWKSKEY=A8 40 41 FF FF 12 34 56 00 01 02 04 05 06 06 07|Set the Network Session Key.|OK 281 281 293 + 282 282 = 6. Joining and sending date on LoRaWAN network = 283 283 284 284 == 6.1 Confirm Mode == ... ... @@ -295,6 +295,7 @@ 295 295 |AT+CFM=1|Set the confirmation mode|OK 296 296 |AT+CFM=2|Set the confirmation mode|While Error in format, return AT_PARAM_ERROR 297 297 310 + 298 298 Downlink Command: 0x05 299 299 300 300 Format: Command Code (0x05) followed by 2 bytes mode value. ... ... @@ -304,6 +304,7 @@ 304 304 * Example 1: Downlink Payload: 0501 ~/~/ Set AT+CFM=1 305 305 * Example 2: Downlink Payload: 0500 ~/~/ Set AT+CFM=0 306 306 320 + 307 307 == 6.2 Confirm Status == 308 308 309 309 Feature: Get confirmation status of the last AT+SEND (0-1). ... ... @@ -316,6 +316,7 @@ 316 316 OK 317 317 ))) 318 318 333 + 319 319 == 6.3 Join LoRa® Network == 320 320 321 321 Feature: Join network. ... ... @@ -330,6 +330,7 @@ 330 330 While Error in format, return AT_BUSY_ERROR 331 331 ))) 332 332 348 + 333 333 == 6.4 LoRa® Network Join Mode == 334 334 335 335 Feature: Get or Set the Network Join Mode. (0: ABP, 1: OTAA). ... ... @@ -344,6 +344,7 @@ 344 344 |AT+NJM=0|Set the Network Join Mode|OK 345 345 |AT+NJM=2|Set the Network Join Mode|While Error in format, return AT_PARAM_ERROR 346 346 363 + 347 347 Downlink Command: 0x20 348 348 349 349 Format: Command Code (0x20) followed by 1 bytes mode value. ... ... @@ -353,6 +353,7 @@ 353 353 * Example 1: Downlink Payload: 2000 ~/~/ Set AT+NJM=O 354 354 * Example 2: Downlink Payload: 2001 ~/~/ Set AT+NJM=1 355 355 373 + 356 356 == 6.5 LoRa® Network Join Status == 357 357 358 358 Feature: LoRa® Network Join Status. ... ... @@ -365,6 +365,7 @@ 365 365 OK 366 366 ))) 367 367 386 + 368 368 == 6.6 Print Last Received Data in Raw Format == 369 369 370 370 Feature: Print Last Received Data in Raw Format<port:data>. ... ... @@ -377,6 +377,7 @@ 377 377 OK 378 378 ))) 379 379 399 + 380 380 == 6.7 Print Last Received Data in Binary Format == 381 381 382 382 Feature: Print Last Received Data in Binary Format<port:data>. ... ... @@ -389,6 +389,7 @@ 389 389 OK 390 390 ))) 391 391 412 + 392 392 == 6.8 Send Text Data == 393 393 394 394 Feature: Send Text Data<port:data>. ... ... @@ -405,6 +405,7 @@ 405 405 406 406 ))) 407 407 429 + 408 408 == 6.9 Send Hexadecimal Data == 409 409 410 410 Feature: Send hexadecimal data along with the application port. ... ... @@ -420,6 +420,7 @@ 420 420 421 421 ))) 422 422 445 + 423 423 = 7. LoRaWAN network management = 424 424 425 425 == 7.1 Adaptive Data Rate == ... ... @@ -439,6 +439,7 @@ 439 439 AT_PARAM_ERROR 440 440 ))) 441 441 465 + 442 442 Downlink Command: 0x22 443 443 444 444 ... ... @@ -447,6 +447,7 @@ 447 447 * Example 1: Downlink Payload: 2201 ~/~/ Set AT+ADR=1. 448 448 * Example 2: Downlink Payload: 2200FFFF ~/~/ Set AT+ADR=0. 449 449 474 + 450 450 == 7.2 LoRa® Class == 451 451 452 452 Feature: Get or Set the Device Class(Currently only support class A, class C). ... ... @@ -462,6 +462,7 @@ 462 462 463 463 ))) 464 464 490 + 465 465 == 7.3 Duty Cycle Setting == 466 466 467 467 Feature: Get or Set the ETSI Duty Cycle setting - 0=disable, 1=enable - Only for testing. ... ... @@ -477,6 +477,7 @@ 477 477 478 478 ))) 479 479 506 + 480 480 == 7.4 Data Rate == 481 481 482 482 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 ... ... @@ -492,6 +492,7 @@ 492 492 493 493 ))) 494 494 522 + 495 495 Downlink Command: 0x2200aaFF 496 496 497 497 ... ... @@ -500,6 +500,7 @@ 500 500 * Example 1: Downlink Payload: 220001FF ~/~/ Set AT+DR=1. 501 501 * Example 2: Downlink Payload: 220000FF ~/~/ Set AT+DR=0. 502 502 531 + 503 503 == 7.5 Frame Counter Downlink == 504 504 505 505 Feature: Get or Set the Frame Counter Downlink. ... ... @@ -517,6 +517,7 @@ 517 517 518 518 ))) 519 519 549 + 520 520 == 7.6 Frame Counter Uplink == 521 521 522 522 Feature: Get or Set the Frame Counter Uplink. ... ... @@ -532,6 +532,7 @@ 532 532 533 533 ))) 534 534 565 + 535 535 == 7.7 Join Accept Delay1 == 536 536 537 537 Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 1 in ms. ... ... @@ -547,6 +547,7 @@ 547 547 548 548 ))) 549 549 581 + 550 550 == 7.8 Join Accept Delay2 == 551 551 552 552 Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 2 in ms. ... ... @@ -562,6 +562,7 @@ 562 562 563 563 ))) 564 564 597 + 565 565 == 7.9 Public Network Mode == 566 566 567 567 Feature: Get or Set the public network mode. (0: off, 1: on) ... ... @@ -579,6 +579,7 @@ 579 579 580 580 ))) 581 581 615 + 582 582 == 7.10 Receive Delay1 == 583 583 584 584 Feature: Get or Set the delay between the end of the Tx and the Rx Window 1 in ms ... ... @@ -594,6 +594,7 @@ 594 594 595 595 ))) 596 596 631 + 597 597 == 7.11Receive Delay2 == 598 598 599 599 Feature: Get or Set the delay between the end of the Tx and the Rx Window 2 in ms ... ... @@ -609,6 +609,7 @@ 609 609 610 610 ))) 611 611 647 + 612 612 == 7.12 Rx2 Window Data Rate == 613 613 614 614 Feature: Get or Set the Rx2 window data rate (0-7 corresponding to DR_X) ... ... @@ -624,6 +624,7 @@ 624 624 625 625 ))) 626 626 663 + 627 627 == 7.13 Rx2 Window Frequency == 628 628 629 629 Feature: Get or Set the Rx2 window frequency ... ... @@ -639,6 +639,7 @@ 639 639 640 640 ))) 641 641 679 + 642 642 == 7.14 Transmit Power == 643 643 644 644 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. ) ... ... @@ -661,6 +661,7 @@ 661 661 * Example 1: Downlink Payload: 22000102 ~/~/ Set AT+TXP=2. 662 662 * Example 2: Downlink Payload: 220000FF ~/~/ Set AT+TXP=0. 663 663 702 + 664 664 == 7.15 RSSI of the Last Received Packet == 665 665 666 666 Feature: Get or Set the Rx2 window frequency ... ... @@ -673,6 +673,7 @@ 673 673 OK 674 674 ))) 675 675 715 + 676 676 == 7.16 SNR of the Last Received Packet == 677 677 678 678 Feature: Get the SNR of the last received packet ... ... @@ -685,6 +685,7 @@ 685 685 OK 686 686 ))) 687 687 728 + 688 688 == 7.17 Application Port == 689 689 690 690 Feature: Get or set the application port. ... ... @@ -698,6 +698,7 @@ 698 698 ))) 699 699 |AT+PORT=21|Set the application port|OK 700 700 742 + 701 701 Downlink Command: 0x23 702 702 703 703 Format: Command Code (0x23) followed by 1 bytes port value. ... ... @@ -707,6 +707,7 @@ 707 707 * Example 1: Downlink Payload: 2301 ~/~/ set the application port to 1 708 708 * Example 2: Downlink Payload: 2305 ~/~/ set the application port to 5 709 709 752 + 710 710 == 7.18 Single Channel Mode == 711 711 712 712 Feature:Get or Set Frequency (Unit: Hz) for Single Channel Mode. ... ... @@ -720,6 +720,7 @@ 720 720 ))) 721 721 |AT+CHS=868100000|Set Frequency for Single Channel Mode|OK 722 722 766 + 723 723 == 7.19 Eight Channel Mode == 724 724 725 725 Feature: Get or Set eight channels mode,Only for US915,AU915,CN470. ... ... @@ -735,6 +735,7 @@ 735 735 ))) 736 736 |AT+CHE=1|Set eight channels mode|OK 737 737 782 + 738 738 Downlink Command: 0x24 739 739 740 740 Format: Command Code (0x24) followed by 1 bytes channel value. ... ... @@ -744,6 +744,7 @@ 744 744 * Example 1: Downlink Payload: 2401 ~/~/ set channel mode to 1 745 745 * Example 2: Downlink Payload: 2405 ~/~/ set channel mode to 5 746 746 792 + 747 747 == 7.20 Get or Set RXwindows1 timeout == 748 748 749 749 Feature:Get or Set the number of symbols to detect and timeout from RXwindow1(0 to 255). ... ... @@ -776,6 +776,7 @@ 776 776 ))) 777 777 |AT+RX2WTO=20|Set RXwindows2 timeout|OK 778 778 825 + 779 779 == 7.22 Setting up uplinkdwelltime (as923, au915) == 780 780 781 781 Feature: Get or Set uplinkdwelltime ... ... @@ -789,6 +789,7 @@ 789 789 ))) 790 790 |AT+DWELLT=0|Set uplinkdwelltime|OK 791 791 839 + 792 792 Downlink Command: 0x25 793 793 794 794 Format: Command Code (0x25) followed by 1 bytes state value. ... ... @@ -798,6 +798,7 @@ 798 798 * Example 1: Downlink Payload: 2501 ~/~/ set uplinkdwelltime to 1 799 799 * Example 2: Downlink Payload: 2500 ~/~/ set uplinkdwelltime to 0 800 800 849 + 801 801 == 7.23 Set Packet Receiving Response Level == 802 802 803 803 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. ... ... @@ -816,6 +816,7 @@ 816 816 * For Class C devices used in ChirpStack, need to set AT+RPL=4 because Chirpstack require immedietely reply message to MAC Command. 817 817 * 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. 818 818 868 + 819 819 AT Command: AT+RPL 820 820 821 821 |=(% colspan="3" %)AT+RPL ... ... @@ -825,6 +825,7 @@ 825 825 ))) 826 826 |AT+RPL=0|Set packet receiving response level|OK 827 827 878 + 828 828 Downlink Command: 0x21 829 829 830 830 Format: Command Code (0x21) followed by 1 bytes level value. ... ... @@ -834,6 +834,7 @@ 834 834 * Example 1: Downlink Payload: 2101 ~/~/ set packet receiving response level to 1 835 835 * Example 2: Downlink Payload: 2102 ~/~/ set packet receiving response level to 2 836 836 888 + 837 837 = 8. AT Commands Combination = 838 838 839 839 == 8.1 Set a fix RX2DR for downlink window == ... ... @@ -841,6 +841,7 @@ 841 841 * AT+ADR=0 ~-~-> Disable ADR first 842 842 * AT+RX2DR=xxxx ~-~-> Set xxxx to your wanted DataRate 843 843 896 + 844 844 == 8.2 Use Downlink Command to set a fix uplink DR == 845 845 846 846 Downlink Command: 0x22000500