Changes for page RS485-BL – Waterproof RS485 to LoRaWAN Converter
Last modified by Xiaoling on 2025/04/23 15:57
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 9 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -94,6 +94,8 @@ 94 94 * 127 dB Dynamic Range RSSI. 95 95 * Automatic RF Sense and CAD with ultra-fast AFC. 96 96 97 + 98 + 97 97 == 1.3 Features == 98 98 99 99 * LoRaWAN Class A & Class C protocol (default Class A) ... ... @@ -105,6 +105,8 @@ 105 105 * Support Modbus protocol 106 106 * Support Interrupt uplink 107 107 110 + 111 + 108 108 == 1.4 Applications == 109 109 110 110 * Smart Buildings & Home Automation ... ... @@ -114,6 +114,8 @@ 114 114 * Smart Cities 115 115 * Smart Factory 116 116 121 + 122 + 117 117 == 1.5 Firmware Change log == 118 118 119 119 [[RS485-BL Image files – Download link and Change log>>url:http://www.dragino.com/downloads/index.php?dir=LoRa_End_Node/RS485-BL/Firmware/||style="background-color: rgb(255, 255, 255);"]] ... ... @@ -124,29 +124,47 @@ 124 124 ((( 125 125 126 126 133 +((( 127 127 v1.4 128 128 ))) 136 +))) 129 129 130 130 ((( 139 +((( 131 131 ~1. Change Power IC to TPS22916 132 132 ))) 142 +))) 133 133 144 +((( 145 + 146 +))) 134 134 135 135 ((( 149 +((( 136 136 v1.3 137 137 ))) 152 +))) 138 138 139 139 ((( 155 +((( 140 140 ~1. Change JP3 from KF350-8P to KF350-11P, Add one extra interface for I2C and one extra interface for one-wire 141 141 ))) 158 +))) 142 142 160 +((( 161 + 162 +))) 143 143 144 144 ((( 165 +((( 145 145 v1.2 146 146 ))) 168 +))) 147 147 148 148 ((( 171 +((( 149 149 Release version 173 +))) 150 150 151 151 152 152 ))) ... ... @@ -240,81 +240,129 @@ 240 240 241 241 === 3.3.1 onfigure UART settings for RS485 or TTL communication === 242 242 267 +((( 243 243 RS485-BL can connect to either RS485 sensors or TTL sensor. User need to specify what type of sensor need to connect. 269 +))) 244 244 271 +((( 245 245 **~1. RS485-MODBUS mode:** 273 +))) 246 246 275 +((( 247 247 AT+MOD=1 ~/~/ Support RS485-MODBUS type sensors. User can connect multiply RS485 , Modbus sensors to the A / B pins. 277 +))) 248 248 279 +((( 249 249 **2. TTL mode:** 281 +))) 250 250 283 +((( 251 251 AT+MOD=2 ~/~/ Support TTL Level sensors, User can connect one TTL Sensor to the TXD/RXD/GND pins. 285 +))) 252 252 287 +((( 253 253 RS485-BL default UART settings is **9600, no parity, stop bit 1**. If the sensor has a different settings, user can change the RS485-BL setting to match. 289 +))) 254 254 255 -(% border="1" style="background-color:#ffffcc; color:green; width:795px" %) 256 -|((( 291 +(% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:510px" %) 292 +|=(% style="width: 80px;" %)((( 293 +((( 257 257 **AT Commands** 258 -)))|(% style="width:285px" %)((( 295 +))) 296 +)))|=(% style="width: 210px;" %)((( 297 +((( 259 259 **Description** 260 -)))|(% style="width:347px" %)((( 299 +))) 300 +)))|=(% style="width: 210px;" %)((( 301 +((( 261 261 **Example** 262 262 ))) 263 -|((( 304 +))) 305 +|(% style="width:80px" %)((( 306 +((( 264 264 AT+BAUDR 265 -)))|(% style="width:285px" %)((( 308 +))) 309 +)))|(% style="width:210px" %)((( 310 +((( 266 266 Set the baud rate (for RS485 connection). Default Value is: 9600. 267 -)))|(% style="width:347px" %)((( 312 +))) 313 +)))|(% style="width:210px" %)((( 268 268 ((( 315 +((( 269 269 AT+BAUDR=9600 270 270 ))) 318 +))) 271 271 272 272 ((( 321 +((( 273 273 Options: (1200,2400,4800,14400,19200,115200) 274 274 ))) 275 275 ))) 276 -|((( 325 +))) 326 +|(% style="width:80px" %)((( 327 +((( 277 277 AT+PARITY 278 -)))|(% style="width:285px" %)((( 329 +))) 330 +)))|(% style="width:210px" %)((( 279 279 ((( 332 +((( 280 280 Set UART parity (for RS485 connection) 281 281 ))) 335 +))) 282 282 283 283 ((( 338 +((( 284 284 Default Value is: no parity. 285 285 ))) 286 -)))|(% style="width:347px" %)((( 341 +))) 342 +)))|(% style="width:210px" %)((( 287 287 ((( 344 +((( 288 288 AT+PARITY=0 289 289 ))) 347 +))) 290 290 291 291 ((( 350 +((( 292 292 Option: 0: no parity, 1: odd parity, 2: even parity 293 293 ))) 294 294 ))) 295 -|((( 354 +))) 355 +|(% style="width:80px" %)((( 356 +((( 296 296 AT+STOPBIT 297 -)))|(% style="width:285px" %)((( 358 +))) 359 +)))|(% style="width:210px" %)((( 298 298 ((( 361 +((( 299 299 Set serial stopbit (for RS485 connection) 300 300 ))) 364 +))) 301 301 302 302 ((( 367 +((( 303 303 Default Value is: 1bit. 304 304 ))) 305 -)))|(% style="width:347px" %)((( 370 +))) 371 +)))|(% style="width:210px" %)((( 306 306 ((( 373 +((( 307 307 AT+STOPBIT=0 for 1bit 308 308 ))) 376 +))) 309 309 310 310 ((( 379 +((( 311 311 AT+STOPBIT=1 for 1.5 bit 312 312 ))) 382 +))) 313 313 314 314 ((( 385 +((( 315 315 AT+STOPBIT=2 for 2 bits 316 316 ))) 317 317 ))) 389 +))) 318 318 319 319 === 3.3.2 Configure sensors === 320 320 ... ... @@ -326,19 +326,20 @@ 326 326 When user issue an (% style="color:#4f81bd" %)**AT+CFGDEV**(%%) command, Each (% style="color:#4f81bd" %)**AT+CFGDEV**(%%) equals to send a command to the RS485 or TTL sensors. This command will only run when user input it and won’t run during each sampling. 327 327 ))) 328 328 329 -(% border="1" style="background-color:#ffffcc; color:green; width: 806px" %)330 -|**AT Commands**|(% style="width: 418px" %)**Description**|(% style="width:256px" %)**Example**331 -|AT+CFGDEV|(% style="width: 418px" %)(((401 +(% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:510px" %) 402 +|=(% style="width: 80px;" %)**AT Commands**|=(% style="width: 210px;" %)**Description**|=(% style="width: 210px;" %)**Example** 403 +|AT+CFGDEV|(% style="width:80px" %)((( 332 332 This command is used to configure the RS485/TTL devices; they won’t be used during sampling. 333 333 334 334 AT+CFGDEV=xx xx xx xx xx xx xx xx xx xx xx xx, 335 335 336 336 mm: 0: no CRC, 1: add CRC-16/MODBUS in the end of this command 337 -)))|(% style="width:2 56px" %)AT+CFGDEV=xx xx xx xx xx xx xx xx xx xx xx xx,m409 +)))|(% style="width:210px" %)AT+CFGDEV=xx xx xx xx xx xx xx xx xx xx xx xx,m 338 338 339 339 Detail of AT+CFGDEV command see [[AT+CFGDEV detail>>||anchor="HRS485DebugCommand28AT2BCFGDEV29"]]. 340 340 341 341 414 + 342 342 === 3.3.3 Configure read commands for each sampling === 343 343 344 344 ((( ... ... @@ -405,117 +405,213 @@ 405 405 After we got the valid value from each RS485 commands, we need to combine them together with the command **AT+DATAUP**. 406 406 ))) 407 407 481 +((( 408 408 **Examples:** 483 +))) 409 409 485 +((( 410 410 Below are examples for the how above AT Commands works. 487 +))) 411 411 489 +((( 412 412 **AT+COMMANDx : **This command will be sent to RS485/TTL devices during each sampling, Max command length is 14 bytes. The grammar is: 491 +))) 413 413 414 -(% border="1" class="table-bordered" style="background-color:#4f81bd; color:white; width:50 1px" %)493 +(% border="1" class="table-bordered" style="background-color:#4f81bd; color:white; width:500px" %) 415 415 |(% style="width:498px" %)((( 495 +((( 416 416 **AT+COMMANDx=xx xx xx xx xx xx xx xx xx xx xx xx,m** 497 +))) 417 417 499 +((( 418 418 **xx xx xx xx xx xx xx xx xx xx xx xx: The RS485 command to be sent** 501 +))) 419 419 503 +((( 420 420 **m: 0: no CRC, 1: add CRC-16/MODBUS in the end of this command** 421 421 ))) 506 +))) 422 422 508 +((( 423 423 For example, if we have a RS485 sensor. The command to get sensor value is: 01 03 0B B8 00 02 46 0A. Where 01 03 0B B8 00 02 is the Modbus command to read the register 0B B8 where stored the sensor value. The 46 0A is the CRC-16/MODBUS which calculate manually. 510 +))) 424 424 512 +((( 425 425 In the RS485-BL, we should use this command AT+COMMAND1=01 03 0B B8 00 02,1 for the same. 514 +))) 426 426 516 +((( 517 + 518 +))) 519 + 520 +((( 427 427 **AT+SEARCHx**: This command defines how to handle the return from AT+COMMANDx. 522 +))) 428 428 429 -(% border="1" class="table-bordered" style="background-color:#4f81bd; color:white; width:5 80px" %)524 +(% border="1" class="table-bordered" style="background-color:#4f81bd; color:white; width:500px" %) 430 430 |(% style="width:577px" %)((( 526 +((( 431 431 **AT+SEARCHx=aa,xx xx xx xx xx** 528 +))) 432 432 433 -* **aa: 1: prefix match mode; 2: prefix and suffix match mode**434 -* *xxxxxxxx xx:matchstring. Max 5 bytesforprefix and5 bytesfor suffix**530 +* ((( 531 +**aa: 1: prefix match mode; 2: prefix and suffix match mode** 435 435 ))) 533 +* ((( 534 +**xx xx xx xx xx: match string. Max 5 bytes for prefix and 5 bytes for suffix** 535 +))) 536 +))) 436 436 538 +((( 437 437 **Examples:** 540 +))) 438 438 542 +((( 439 439 1)For a return string from AT+COMMAND1: 16 0c 1e 56 34 2e 30 58 5f 36 41 30 31 00 49 544 +))) 440 440 546 +((( 441 441 If we set AT+SEARCH1=1,1E 56 34. (max 5 bytes for prefix) 548 +))) 442 442 550 +((( 443 443 The valid data will be all bytes after 1E 56 34 , so it is (% style="background-color:yellow" %)**2e 30 58 5f 36 41 30 31 00 49** 552 +))) 444 444 554 +((( 445 445 [[image:1653271044481-711.png]] 556 +))) 446 446 558 +((( 447 447 2)For a return string from AT+COMMAND1: 16 0c 1e 56 34 2e 30 58 5f 36 41 30 31 00 49 560 +))) 448 448 562 +((( 449 449 If we set AT+SEARCH1=2, 1E 56 34+31 00 49 564 +))) 450 450 566 +((( 451 451 Device will search the bytes between 1E 56 34 and 31 00 49. So it is(% style="background-color:yellow" %) **2e 30 58 5f 36 41 30** 568 +))) 452 452 570 +((( 453 453 [[image:1653271276735-972.png]] 572 +))) 454 454 574 +((( 455 455 **AT+DATACUTx : **This command defines how to handle the return from AT+COMMANDx, max return length is 45 bytes. 576 +))) 456 456 457 -(% style="background-color:#4f81bd; color:white; width: 729px" %)578 +(% style="background-color:#4f81bd; color:white; width:510px" %) 458 458 |(% style="width:726px" %)((( 580 +((( 459 459 **AT+DATACUTx=a,b,c** 582 +))) 460 460 461 -* **a: length for the return of AT+COMMAND** 462 -* **b:1: grab valid value by byte, max 6 bytes. 2: grab valid value by bytes section, max 3 sections.** 463 -* **c: define the position for valid value. ** 584 +* ((( 585 +**a: length for the return of AT+COMMAND** 464 464 ))) 587 +* ((( 588 +**b:1: grab valid value by byte, max 6 bytes. 2: grab valid value by bytes section, max 3 sections.** 589 +))) 590 +* ((( 591 +**c: define the position for valid value. ** 592 +))) 593 +))) 465 465 595 +((( 466 466 **Examples:** 597 +))) 467 467 468 -* Grab bytes: 599 +* ((( 600 +Grab bytes: 601 +))) 469 469 603 +((( 470 470 [[image:1653271581490-837.png||height="313" width="722"]] 605 +))) 471 471 607 +((( 608 + 609 +))) 472 472 473 -* Grab a section. 611 +* ((( 612 +Grab a section. 613 +))) 474 474 615 +((( 475 475 [[image:1653271648378-342.png||height="326" width="720"]] 617 +))) 476 476 619 +((( 620 + 621 +))) 477 477 478 -* Grab different sections. 623 +* ((( 624 +Grab different sections. 625 +))) 479 479 627 +((( 480 480 [[image:1653271657255-576.png||height="305" width="730"]] 629 +))) 481 481 482 482 ((( 632 +((( 483 483 (% style="color:red" %)**Note:** 484 484 ))) 635 +))) 485 485 486 486 ((( 638 +((( 487 487 AT+SEARCHx and AT+DATACUTx can be used together, if both commands are set, RS485-BL will first process AT+SEARCHx on the return string and get a temporary string, and then process AT+DATACUTx on this temporary string to get the final payload. In this case, AT+DATACUTx need to set to format AT+DATACUTx=0,xx,xx where the return bytes set to 0. 488 488 ))) 641 +))) 489 489 490 490 ((( 644 +((( 491 491 **Example:** 492 492 ))) 647 +))) 493 493 494 494 ((( 650 +((( 495 495 (% style="color:red" %)AT+COMMAND1=11 01 1E D0,0 496 496 ))) 653 +))) 497 497 498 498 ((( 656 +((( 499 499 (% style="color:red" %)AT+SEARCH1=1,1E 56 34 500 500 ))) 659 +))) 501 501 502 502 ((( 662 +((( 503 503 (% style="color:red" %)AT+DATACUT1=0,2,1~~5 504 504 ))) 665 +))) 505 505 506 506 ((( 668 +((( 507 507 (% style="color:red" %)Return string from AT+COMMAND1: 16 0c 1e 56 34 2e 30 58 5f 36 41 30 31 00 49 508 508 ))) 671 +))) 509 509 510 510 ((( 674 +((( 511 511 (% style="color:red" %)String after SEARCH command: 2e 30 58 5f 36 41 30 31 00 49 512 512 ))) 677 +))) 513 513 514 514 ((( 680 +((( 515 515 (% style="color:red" %)Valid payload after DataCUT command: 2e 30 58 5f 36 516 516 ))) 683 +))) 517 517 685 +((( 518 518 [[image:1653271763403-806.png]] 687 +))) 519 519 520 520 521 521 === 3.3.4 Compose the uplink payload === ... ... @@ -522,10 +522,14 @@ 522 522 523 523 ((( 524 524 Through AT+COMMANDx and AT+DATACUTx we got valid value from each RS485 commands, Assume these valid value are RETURN1, RETURN2, .., to RETURNx. The next step is how to compose the LoRa Uplink Payload by these RETURNs. The command is **AT+DATAUP.** 694 + 695 + 525 525 ))) 526 526 527 527 ((( 528 528 (% style="color:#037691" %)**Examples: AT+DATAUP=0** 700 + 701 + 529 529 ))) 530 530 531 531 ((( ... ... @@ -658,26 +658,8 @@ 658 658 659 659 == 3.4 Uplink Payload == 660 660 661 -(% border="1" style="background-color:#4f81bd; color:white; width:850px" %) 662 -|**Size(bytes)**|(% style="width:130px" %)**2**|(% style="width:93px" %)**1**|(% style="width:509px" %)**Length depends on the return from the commands** 663 -|Value|(% style="width:130px" %)((( 664 -((( 665 -Battery(mV) 666 -))) 834 +[[image:image-20220606105412-1.png]] 667 667 668 -((( 669 -& 670 -))) 671 - 672 -((( 673 -Interrupt _Flag 674 -))) 675 -)))|(% style="width:93px" %)((( 676 -PAYLOAD_VER 677 - 678 - 679 -)))|(% style="width:509px" %)If the valid payload is too long and exceed the maximum support payload length in server, server will show payload not provided in the LoRaWAN server. 680 - 681 681 Below is the decoder for the first 3 bytes. The rest bytes are dynamic depends on different RS485 sensors. 682 682 683 683 ((( ... ... @@ -735,14 +735,23 @@ 735 735 736 736 == 3.5 Configure RS485-BL via AT or Downlink == 737 737 893 +((( 738 738 User can configure RS485-BL via AT Commands or LoRaWAN Downlink Commands 895 +))) 739 739 897 +((( 740 740 There are two kinds of Commands: 899 +))) 741 741 742 -* (% style="color:#4f81bd" %)**Common Commands**(%%): They should be available for each sensor, such as: change uplink interval, reset device. For firmware v1.3, user can find what common commands it supports: [[End Device AT Commands and Downlink Command>>doc:Main.End Device AT Commands and Downlink Command.WebHome]] 901 +* ((( 902 +(% style="color:#4f81bd" %)**Common Commands**(%%): They should be available for each sensor, such as: change uplink interval, reset device. For firmware v1.3, user can find what common commands it supports: [[AT Commands and Downlink Command>>doc:Main.End Device AT Commands and Downlink Command.WebHome]] 903 +))) 743 743 744 -* (% style="color:#4f81bd" %)**Sensor Related Commands**(%%): These commands are special designed for RS485-BL. User can see these commands below: 905 +* ((( 906 +(% style="color:#4f81bd" %)**Sensor Related Commands**(%%): These commands are special designed for RS485-BL. User can see these commands below: 907 +))) 745 745 909 + 746 746 === 3.5.1 Common Commands: === 747 747 748 748 They should be available for each of Dragino Sensors, such as: change uplink interval, reset device. For firmware v1.3, user can find what common commands it supports: [[End Device AT Commands and Downlink Command>>doc:Main.End Device AT Commands and Downlink Command.WebHome]] ... ... @@ -750,8 +750,8 @@ 750 750 751 751 === 3.5.2 Sensor related commands: === 752 752 753 -==== ==== 754 754 918 + 755 755 ==== **Choose Device Type (RS485 or TTL)** ==== 756 756 757 757 RS485-BL can connect to either RS485 sensors or TTL sensor. User need to specify what type of sensor need to connect. ... ... @@ -775,56 +775,109 @@ 775 775 776 776 777 777 942 + 778 778 ==== **RS485 Debug Command (AT+CFGDEV)** ==== 779 779 945 +((( 780 780 This command is used to configure the RS485 or TTL sensors; they won’t be used during sampling. 947 +))) 781 781 782 -* **AT Command** 949 +* ((( 950 +**AT Command** 951 +))) 783 783 784 784 (% class="box infomessage" %) 785 785 ((( 955 +((( 786 786 **AT+CFGDEV=xx xx xx xx xx xx xx xx xx xx xx xx,m** 787 787 ))) 958 +))) 788 788 960 +((( 789 789 m: 0: no CRC; 1: add CRC-16/MODBUS in the end of this command. 962 +))) 790 790 964 +((( 965 + 966 +))) 791 791 792 -* **Downlink Payload** 968 +* ((( 969 +**Downlink Payload** 970 +))) 793 793 972 +((( 794 794 Format: A8 MM NN XX XX XX XX YY 974 +))) 795 795 976 +((( 796 796 Where: 978 +))) 797 797 798 -* MM: 1: add CRC-16/MODBUS ; 0: no CRC 799 -* NN: The length of RS485 command 800 -* XX XX XX XX: RS485 command total NN bytes 801 -* YY: How many bytes will be uplink from the return of this RS485 command, if YY=0, RS485-BL will execute the downlink command without uplink; if YY>0, RS485-BL will uplink total YY bytes from the output of this RS485 command 980 +* ((( 981 +MM: 1: add CRC-16/MODBUS ; 0: no CRC 982 +))) 983 +* ((( 984 +NN: The length of RS485 command 985 +))) 986 +* ((( 987 +XX XX XX XX: RS485 command total NN bytes 988 +))) 989 +* ((( 990 +YY: How many bytes will be uplink from the return of this RS485 command, if YY=0, RS485-BL will execute the downlink command without uplink; if YY>0, RS485-BL will uplink total YY bytes from the output of this RS485 command 991 +))) 802 802 993 +((( 803 803 **Example 1:** 995 +))) 804 804 997 +((( 805 805 To connect a Modbus Alarm with below commands. 999 +))) 806 806 807 -* The command to active alarm is: 0A 05 00 04 00 01 **4C B0**. Where 0A 05 00 04 00 01 is the Modbus command to read the register 00 40 where stored the DI status. The 4C B0 is the CRC-16/MODBUS which calculate manually. 1001 +* ((( 1002 +The command to active alarm is: 0A 05 00 04 00 01 **4C B0**. Where 0A 05 00 04 00 01 is the Modbus command to read the register 00 40 where stored the DI status. The 4C B0 is the CRC-16/MODBUS which calculate manually. 1003 +))) 808 808 809 -* The command to deactivate alarm is: 0A 05 00 04 00 00 **8D 70**. Where 0A 05 00 04 00 00 is the Modbus command to read the register 00 40 where stored the DI status. The 8D 70 is the CRC-16/MODBUS which calculate manually. 1005 +* ((( 1006 +The command to deactivate alarm is: 0A 05 00 04 00 00 **8D 70**. Where 0A 05 00 04 00 00 is the Modbus command to read the register 00 40 where stored the DI status. The 8D 70 is the CRC-16/MODBUS which calculate manually. 1007 +))) 810 810 1009 +((( 811 811 So if user want to use downlink command to control to RS485 Alarm, he can use: 1011 +))) 812 812 1013 +((( 813 813 (% style="color:#037691" %)**A8 01 06 0A 05 00 04 00 01 00**(%%): to activate the RS485 Alarm 1015 +))) 814 814 1017 +((( 815 815 (% style="color:#037691" %)**A8 01 06 0A 05 00 04 00 00 00**(%%): to deactivate the RS485 Alarm 1019 +))) 816 816 1021 +((( 817 817 A8 is type code and 01 means add CRC-16/MODBUS at the end, the 3^^rd^^ byte is 06, means the next 6 bytes are the command to be sent to the RS485 network, the final byte 00 means this command don’t need to acquire output. 1023 +))) 818 818 1025 +((( 1026 + 1027 +))) 819 819 1029 +((( 820 820 **Example 2:** 1031 +))) 821 821 1033 +((( 822 822 Check TTL Sensor return: 1035 +))) 823 823 1037 +((( 824 824 [[image:1654132684752-193.png]] 1039 +))) 825 825 826 826 827 827 1043 + 1044 + 828 828 ==== **Set Payload version** ==== 829 829 830 830 This is the first byte of the uplink payload. RS485-BL can connect to different sensors. User can set the PAYVER field to tell server how to decode the current payload. ... ... @@ -845,88 +845,171 @@ 845 845 846 846 847 847 1065 + 848 848 ==== **Set RS485 Sampling Commands** ==== 849 849 1068 +((( 850 850 AT+COMMANDx, AT+DATACUTx and AT+SEARCHx 1070 +))) 851 851 1072 +((( 852 852 These three commands are used to configure how the RS485-BL polling data from Modbus device. Detail of usage please see : [[polling RS485 device>>||anchor="H3.3.3Configurereadcommandsforeachsampling"]]. 1074 +))) 853 853 1076 +((( 1077 + 1078 +))) 854 854 855 -* **AT Command:** 1080 +* ((( 1081 +**AT Command:** 1082 +))) 856 856 857 857 (% class="box infomessage" %) 858 858 ((( 1086 +((( 859 859 **AT+COMMANDx: Configure RS485 read command to sensor.** 860 860 ))) 1089 +))) 861 861 862 862 (% class="box infomessage" %) 863 863 ((( 1093 +((( 864 864 **AT+DATACUTx: Configure how to handle return from RS485 devices.** 865 865 ))) 1096 +))) 866 866 867 867 (% class="box infomessage" %) 868 868 ((( 1100 +((( 869 869 **AT+SEARCHx: Configure search command** 870 870 ))) 1103 +))) 871 871 1105 +((( 1106 + 1107 +))) 872 872 873 -* **Downlink Payload:** 1109 +* ((( 1110 +**Downlink Payload:** 1111 +))) 874 874 1113 +((( 875 875 **0xAF** downlink command can be used to set AT+COMMANDx or AT+DATACUTx. 1115 +))) 876 876 1117 +((( 877 877 (% style="color:red" %)**Note**(%%): if user use AT+COMMANDx to add a new command, he also need to send AT+DATACUTx downlink. 1119 +))) 878 878 1121 +((( 879 879 Format: AF MM NN LL XX XX XX XX YY 1123 +))) 880 880 1125 +((( 881 881 Where: 1127 +))) 882 882 883 -* MM: the ATCOMMAND or AT+DATACUT to be set. Value from 01 ~~ 0F, 884 -* NN: 0: no CRC; 1: add CRC-16/MODBUS ; 2: set the AT+DATACUT value. 885 -* LL: The length of AT+COMMAND or AT+DATACUT command 886 -* XX XX XX XX: AT+COMMAND or AT+DATACUT command 887 -* YY: If YY=0, RS485-BL will execute the downlink command without uplink; if YY=1, RS485-BL will execute an uplink after got this command. 1129 +* ((( 1130 +MM: the ATCOMMAND or AT+DATACUT to be set. Value from 01 ~~ 0F, 1131 +))) 1132 +* ((( 1133 +NN: 0: no CRC; 1: add CRC-16/MODBUS ; 2: set the AT+DATACUT value. 1134 +))) 1135 +* ((( 1136 +LL: The length of AT+COMMAND or AT+DATACUT command 1137 +))) 1138 +* ((( 1139 +XX XX XX XX: AT+COMMAND or AT+DATACUT command 1140 +))) 1141 +* ((( 1142 +YY: If YY=0, RS485-BL will execute the downlink command without uplink; if YY=1, RS485-BL will execute an uplink after got this command. 1143 +))) 888 888 1145 +((( 889 889 **Example:** 1147 +))) 890 890 1149 +((( 891 891 (% style="color:#037691" %)**AF 03 01 06 0A 05 00 04 00 01 00**(%%): Same as AT+COMMAND3=0A 05 00 04 00 01,1 1151 +))) 892 892 1153 +((( 893 893 (% style="color:#037691" %)**AF 03 02 06**(% style="color:orange" %)** 10 **(% style="color:red" %)**01 **(% style="color:green" %)**05 06 09 0A**(% style="color:#037691" %)** 00**(%%): Same as AT+DATACUT3=(% style="color:orange" %)**16**(%%),(% style="color:red" %)**1**(%%),(% style="color:green" %)**5+6+9+10** 1155 +))) 894 894 1157 +((( 895 895 (% style="color:#037691" %)**AF 03 02 06 **(% style="color:orange" %)**0B**(% style="color:red" %)** 02 **(% style="color:green" %)**05 07 08 0A **(% style="color:#037691" %)**00**(%%): Same as AT+DATACUT3=(% style="color:orange" %)**11**(%%),(% style="color:red" %)**2**(%%),(% style="color:green" %)**5~~7+8~~10** 1159 +))) 896 896 1161 +((( 1162 + 1163 +))) 897 897 1165 +((( 898 898 **0xAB** downlink command can be used for set AT+SEARCHx 1167 +))) 899 899 1169 +((( 900 900 **Example:** **AB aa 01 03 xx xx xx** (03 here means there are total 3 bytes after 03) So 1171 +))) 901 901 902 -* AB aa 01 03 xx xx xx same as AT+SEARCHaa=1,xx xx xx 903 -* AB aa 02 03 xx xx xx 02 yy yy(03 means there are 3 bytes after 03, they are xx xx xx;02 means there are 2 bytes after 02, they are yy yy) so the commands 1173 +* ((( 1174 +AB aa 01 03 xx xx xx same as AT+SEARCHaa=1,xx xx xx 1175 +))) 1176 +* ((( 1177 +AB aa 02 03 xx xx xx 02 yy yy(03 means there are 3 bytes after 03, they are xx xx xx;02 means there are 2 bytes after 02, they are yy yy) so the commands 1178 +))) 904 904 1180 +((( 905 905 **AB aa 02 03 xx xx xx 02 yy yy** same as **AT+SEARCHaa=2,xx xx xx+yy yy** 1182 +))) 906 906 907 907 908 908 1186 + 909 909 ==== **Fast command to handle MODBUS device** ==== 910 910 1189 +((( 911 911 AT+MBFUN is valid since v1.3 firmware version. The command is for fast configure to read Modbus devices. It is only valid for the devices which follow the [[MODBUS-RTU protocol>>url:https://www.modbustools.com/modbus.html]]. 1191 +))) 912 912 1193 +((( 913 913 This command is valid since v1.3 firmware version 1195 +))) 914 914 1197 +((( 1198 + 1199 +))) 915 915 1201 +((( 916 916 **AT+MBFUN has only two value:** 1203 +))) 917 917 918 -* **AT+MBFUN=1**: Enable Modbus reading. And get response base on the MODBUS return 1205 +* ((( 1206 +**AT+MBFUN=1**: Enable Modbus reading. And get response base on the MODBUS return 1207 +))) 919 919 1209 +((( 920 920 AT+MBFUN=1, device can auto read the Modbus function code: 01, 02, 03 or 04. AT+MBFUN has lower priority vs AT+DATACUT command. If AT+DATACUT command is configured, AT+MBFUN will be ignore. 1211 +))) 921 921 922 -* **AT+MBFUN=0**: Disable Modbus fast reading. 1213 +* ((( 1214 +**AT+MBFUN=0**: Disable Modbus fast reading. 1215 +))) 923 923 924 - 1217 +((( 925 925 **Example:** 1219 +))) 926 926 927 -* AT+MBFUN=1 and AT+DATACUT1/AT+DATACUT2 are not configure (0,0,0). 928 -* AT+COMMAND1= 01 03 00 10 00 08,1 ~-~-> read slave address 01 , function code 03, start address 00 01, quantity of registers 00 08. 929 -* AT+COMMAND2= 01 02 00 40 00 10,1 ~-~-> read slave address 01 , function code 02, start address 00 40, quantity of inputs 00 10. 1221 +* ((( 1222 +AT+MBFUN=1 and AT+DATACUT1/AT+DATACUT2 are not configure (0,0,0). 1223 +))) 1224 +* ((( 1225 +AT+COMMAND1= 01 03 00 10 00 08,1 ~-~-> read slave address 01 , function code 03, start address 00 01, quantity of registers 00 08. 1226 +))) 1227 +* ((( 1228 +AT+COMMAND2= 01 02 00 40 00 10,1 ~-~-> read slave address 01 , function code 02, start address 00 40, quantity of inputs 00 10. 1229 +))) 930 930 931 931 [[image:1654133913295-597.png]] 932 932 ... ... @@ -934,311 +934,528 @@ 934 934 [[image:1654133954153-643.png]] 935 935 936 936 937 -* **Downlink Commands:** 1237 +* ((( 1238 +**Downlink Commands:** 1239 +))) 938 938 1241 +((( 939 939 **A9 aa** ~-~-> Same as AT+MBFUN=aa 1243 +))) 940 940 941 941 942 942 943 -==== RS485 command timeout ==== 944 944 1248 +==== **RS485 command timeout** ==== 1249 + 1250 +((( 945 945 Some Modbus device has slow action to send replies. This command is used to configure the RS485-BL to use longer time to wait for their action. 1252 +))) 946 946 1254 +((( 947 947 Default value: 0, range: 0 ~~ 5 seconds 1256 +))) 948 948 1258 +((( 1259 + 1260 +))) 949 949 950 -* AT Command: 1262 +* ((( 1263 +**AT Command:** 1264 +))) 951 951 952 -AT+CMDDLaa=hex(bb cc) 1266 +(% class="box infomessage" %) 1267 +((( 1268 +((( 1269 +**AT+CMDDLaa=hex(bb cc)** 1270 +))) 1271 +))) 953 953 954 -Example: 1273 +((( 1274 +**Example:** 1275 +))) 955 955 1277 +((( 956 956 **AT+CMDDL1=1000** to send the open time to 1000ms 1279 +))) 957 957 1281 +((( 1282 + 1283 +))) 958 958 959 -* Downlink Payload: 1285 +* ((( 1286 +**Downlink Payload:** 1287 +))) 960 960 1289 +((( 961 961 0x AA aa bb cc 1291 +))) 962 962 1293 +((( 963 963 Same as: AT+CMDDLaa=hex(bb cc) 1295 +))) 964 964 965 - Example: 1297 +((( 1298 + **Example:** 1299 +))) 966 966 967 - 0xAA 01 03 E8 à Same as **AT+CMDDL1=1000 ms** 1301 +((( 1302 + **0xAA 01 03 E8** ~-~-> Same as **AT+CMDDL1=1000 ms** 1303 +))) 968 968 969 969 970 -==== [[Uplink>>path:#downlink_A8]] payload mode ==== 971 971 1307 + 1308 +==== **Uplink payload mode** ==== 1309 + 1310 +((( 972 972 Define to use one uplink or multiple uplinks for the sampling. 1312 +))) 973 973 974 -The use of this command please see: [[Compose Uplink payload>>path:#DataUP]] 1314 +((( 1315 +The use of this command please see: [[Compose Uplink payload>>||anchor="H3.3.4Composetheuplinkpayload"]] 1316 +))) 975 975 976 -* AT Command: 1318 +* ((( 1319 +**AT Command:** 1320 +))) 977 977 978 -AT+DATAUP=0 1322 +(% class="box infomessage" %) 1323 +((( 1324 +((( 1325 +**AT+DATAUP=0** 1326 +))) 1327 +))) 979 979 980 -AT+DATAUP=1 1329 +(% class="box infomessage" %) 1330 +((( 1331 +((( 1332 +**AT+DATAUP=1** 1333 +))) 1334 +))) 981 981 1336 +((( 1337 + 1338 +))) 982 982 983 -* Downlink Payload: 1340 +* ((( 1341 +**Downlink Payload:** 1342 +))) 984 984 985 -0xAD 00 à Same as AT+DATAUP=0 1344 +((( 1345 +**0xAD 00** **~-~->** Same as AT+DATAUP=0 1346 +))) 986 986 987 -0xAD 01 à Same as AT+DATAUP=1 1348 +((( 1349 +**0xAD 01** **~-~->** Same as AT+DATAUP=1 1350 +))) 988 988 989 989 990 -==== Manually trigger an Uplink ==== 991 991 1354 + 1355 +==== **Manually trigger an Uplink** ==== 1356 + 992 992 Ask device to send an uplink immediately. 993 993 994 -* Downlink Payload: 1359 +* **Downlink Payload:** 995 995 996 -0x08 FF, RS485-BL will immediately send an uplink. 1361 +**0x08 FF**, RS485-BL will immediately send an uplink. 997 997 998 998 999 -==== Clear RS485 Command ==== 1000 1000 1001 -The AT+COMMANDx and AT+DATACUTx settings are stored in special location, user can use below command to clear them. 1002 1002 1366 +==== **Clear RS485 Command** ==== 1003 1003 1004 -* AT Command: 1368 +((( 1369 +The AT+COMMANDx and AT+DATACUTx settings are stored in special location, user can use below command to clear them. 1370 +))) 1005 1005 1006 -**AT+CMDEAR=mm,nn** mm: start position of erase ,nn: stop position of erase 1372 +((( 1373 + 1374 +))) 1007 1007 1008 -Etc. AT+CMDEAR=1,10 means erase AT+COMMAND1/AT+DATACUT1 to AT+COMMAND10/AT+DATACUT10 1376 +* ((( 1377 +**AT Command:** 1378 +))) 1009 1009 1380 +((( 1381 +(% style="color:#037691" %)**AT+CMDEAR=mm,nn** (%%) mm: start position of erase ,nn: stop position of erase Etc. AT+CMDEAR=1,10 means erase AT+COMMAND1/AT+DATACUT1 to AT+COMMAND10/AT+DATACUT10 1382 +))) 1383 + 1384 +((( 1010 1010 Example screen shot after clear all RS485 commands. 1386 +))) 1011 1011 1388 +((( 1389 + 1390 +))) 1012 1012 1013 - 1392 +((( 1014 1014 The uplink screen shot is: 1394 +))) 1015 1015 1016 -[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image023.png]] 1396 +((( 1397 +[[image:1654134704555-320.png]] 1398 +))) 1017 1017 1400 +((( 1401 + 1402 +))) 1018 1018 1019 -* Downlink Payload: 1404 +* ((( 1405 +**Downlink Payload:** 1406 +))) 1020 1020 1021 -0x09 aa bb same as AT+CMDEAR=aa,bb 1408 +((( 1409 +**0x09 aa bb** same as AT+CMDEAR=aa,bb 1410 +))) 1022 1022 1023 1023 1024 -==== Set Serial Communication Parameters ==== 1025 1025 1414 + 1415 +==== **Set Serial Communication Parameters** ==== 1416 + 1417 +((( 1026 1026 Set the Rs485 serial communication parameters: 1419 +))) 1027 1027 1028 -* AT Command: 1421 +* ((( 1422 +**AT Command:** 1423 +))) 1029 1029 1425 +((( 1030 1030 Set Baud Rate: 1427 +))) 1031 1031 1032 -AT+BAUDR=9600 ~/~/ Options: (1200,2400,4800,14400,19200,115200) 1429 +(% class="box infomessage" %) 1430 +((( 1431 +((( 1432 +**AT+BAUDR=9600** ~/~/ Options: (1200,2400,4800,14400,19200,115200) 1433 +))) 1434 +))) 1033 1033 1436 +((( 1437 +Set UART Parity 1438 +))) 1034 1034 1035 -Set UART parity 1440 +(% class="box infomessage" %) 1441 +((( 1442 +((( 1443 +**AT+PARITY=0** ~/~/ Option: 0: no parity, 1: odd parity, 2: even parity 1444 +))) 1445 +))) 1036 1036 1037 -AT+PARITY=0 ~/~/ Option: 0: no parity, 1: odd parity, 2: even parity 1038 - 1039 - 1447 +((( 1040 1040 Set STOPBIT 1449 +))) 1041 1041 1042 -AT+STOPBIT=0 ~/~/ Option: 0 for 1bit; 1 for 1.5 bit ; 2 for 2 bits 1451 +(% class="box infomessage" %) 1452 +((( 1453 +((( 1454 +**AT+STOPBIT=0** ~/~/ Option: 0 for 1bit; 1 for 1.5 bit ; 2 for 2 bits 1455 +))) 1456 +))) 1043 1043 1458 +((( 1459 + 1460 +))) 1044 1044 1045 -* Downlink Payload: 1462 +* ((( 1463 +**Downlink Payload:** 1464 +))) 1046 1046 1047 -A7 01 aa bb: Same AT+BAUDR=hex(aa bb)*100 1466 +((( 1467 +**A7 01 aa bb**: Same AT+BAUDR=hex(aa bb)*100 1468 +))) 1048 1048 1049 -Example: 1470 +((( 1471 +**Example:** 1472 +))) 1050 1050 1051 -* A7 01 00 60 same as AT+BAUDR=9600 1052 -* A7 01 04 80 same as AT+BAUDR=115200 1474 +* ((( 1475 +A7 01 00 60 same as AT+BAUDR=9600 1476 +))) 1477 +* ((( 1478 +A7 01 04 80 same as AT+BAUDR=115200 1479 +))) 1053 1053 1481 +((( 1054 1054 A7 02 aa: Same as AT+PARITY=aa (aa value: 00 , 01 or 02) 1483 +))) 1055 1055 1485 +((( 1056 1056 A7 03 aa: Same as AT+STOPBIT=aa (aa value: 00 , 01 or 02) 1487 +))) 1057 1057 1058 1058 1059 -==== Control output power duration ==== 1060 1060 1491 + 1492 +==== **Control output power duration** ==== 1493 + 1494 +((( 1061 1061 User can set the output power duration before each sampling. 1496 +))) 1062 1062 1063 -* AT Command: 1498 +* ((( 1499 +**AT Command:** 1500 +))) 1064 1064 1065 -Example: 1502 +((( 1503 +**Example:** 1504 +))) 1066 1066 1067 -AT+3V3T=1000 ~/~/ 3V3 output power will open 1s before each sampling. 1506 +((( 1507 +**AT+3V3T=1000** ~/~/ 3V3 output power will open 1s before each sampling. 1508 +))) 1068 1068 1069 -AT+5VT=1000 ~/~/ +5V output power will open 1s before each sampling. 1510 +((( 1511 +**AT+5VT=1000** ~/~/ +5V output power will open 1s before each sampling. 1512 +))) 1070 1070 1514 +((( 1515 + 1516 +))) 1071 1071 1072 -* LoRaWAN Downlink Command: 1518 +* ((( 1519 +**LoRaWAN Downlink Command:** 1520 +))) 1073 1073 1074 -07 01 aa bb Same as AT+5VT=(aa bb) 1522 +((( 1523 +**07 01 aa bb** Same as AT+5VT=(aa bb) 1524 +))) 1075 1075 1076 -07 02 aa bb Same as AT+3V3T=(aa bb) 1526 +((( 1527 +**07 02 aa bb** Same as AT+3V3T=(aa bb) 1528 +))) 1077 1077 1078 1078 1079 1079 1532 +== 3.6 Buttons == 1080 1080 1081 -1. 1082 -11. Buttons 1534 +(% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:233px" %) 1535 +|=(% style="width: 89px;" %)**Button**|=(% style="width: 141px;" %)**Feature** 1536 +|(% style="width:89px" %)**RST**|(% style="width:141px" %)Reboot RS485-BL 1083 1083 1084 -|**Button**|**Feature** 1085 -|**RST**|Reboot RS485-BL 1086 1086 1087 -1. 1088 -11. +3V3 Output 1539 +== 3.7 +3V3 Output == 1089 1089 1541 +((( 1090 1090 RS485-BL has a Controllable +3V3 output, user can use this output to power external sensor. 1543 +))) 1091 1091 1545 +((( 1092 1092 The +3V3 output will be valid for every sampling. RS485-BL will enable +3V3 output before all sampling and disable the +3V3 after all sampling. 1547 +))) 1093 1093 1094 - 1549 +((( 1095 1095 The +3V3 output time can be controlled by AT Command. 1551 +))) 1096 1096 1097 -**AT+3V3T=1000** 1553 +((( 1554 + 1555 +))) 1098 1098 1099 -Means set +3v3 valid time to have 1000ms. So, the real +3v3 output will actually have 1000ms + sampling time for other sensors. 1557 +((( 1558 +(% style="color:#037691" %)**AT+3V3T=1000** 1559 +))) 1100 1100 1561 +((( 1562 + 1563 +))) 1101 1101 1565 +((( 1566 +Means set +3v3 valid time to have 1000ms. So, the real +3v3 output will actually have 1000ms + sampling time for other sensors. 1567 +))) 1568 + 1569 +((( 1102 1102 By default, the AT+3V3T=0. This is a special case, means the +3V3 output is always on at any time 1571 +))) 1103 1103 1104 1104 1105 -1. 1106 -11. +5V Output 1574 +== 3.8 +5V Output == 1107 1107 1576 +((( 1108 1108 RS485-BL has a Controllable +5V output, user can use this output to power external sensor. 1578 +))) 1109 1109 1580 +((( 1110 1110 The +5V output will be valid for every sampling. RS485-BL will enable +5V output before all sampling and disable the +5v after all sampling. 1582 +))) 1111 1111 1112 - 1584 +((( 1113 1113 The 5V output time can be controlled by AT Command. 1586 +))) 1114 1114 1115 -**AT+5VT=1000** 1588 +((( 1589 + 1590 +))) 1116 1116 1117 -Means set 5V valid time to have 1000ms. So, the real 5V output will actually have 1000ms + sampling time for other sensors. 1592 +((( 1593 +(% style="color:#037691" %)**AT+5VT=1000** 1594 +))) 1118 1118 1596 +((( 1597 + 1598 +))) 1119 1119 1600 +((( 1601 +Means set 5V valid time to have 1000ms. So, the real 5V output will actually have 1000ms + sampling time for other sensors. 1602 +))) 1603 + 1604 +((( 1120 1120 By default, the AT+5VT=0. If the external sensor which require 5v and require more time to get stable state, user can use this command to increase the power ON duration for this sensor. 1606 +))) 1121 1121 1122 1122 1123 1123 1610 +== 3.9 LEDs == 1124 1124 1125 -1. 1126 -11. LEDs 1612 +(% border="1" style="background-color:#ffffcc; color:green; width:332px" %) 1613 +|=**LEDs**|=(% style="width: 274px;" %)**Feature** 1614 +|**LED1**|(% style="width:274px" %)Blink when device transmit a packet. 1127 1127 1128 -|**LEDs**|**Feature** 1129 -|**LED1**|Blink when device transmit a packet. 1130 1130 1131 -1. 1132 -11. Switch Jumper 1617 +== 3.10 Switch Jumper == 1133 1133 1134 -|**Switch Jumper**|**Feature** 1135 -|**SW1**|((( 1136 -ISP position: Upgrade firmware via UART 1137 - 1619 +(% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:400px" %) 1620 +|=(% style="width: 123px;" %)**Switch Jumper**|=(% style="width: 277px;" %)**Feature** 1621 +|(% style="width:123px" %)**SW1**|(% style="width:277px" %)ISP position: Upgrade firmware via UART 1138 1138 Flash position: Configure device, check running status. 1623 +|(% style="width:123px" %)**SW2**|(% style="width:277px" %)5V position: set to compatible with 5v I/O. 1624 +3.3v position: set to compatible with 3.3v I/O., 1625 + 1626 +((( 1627 +**+3.3V**: is always ON 1139 1139 ))) 1140 -|**SW2**|((( 1141 -5V position: set to compatible with 5v I/O. 1142 1142 1143 -3.3v position: set to compatible with 3.3v I/O., 1630 +((( 1631 +**+5V**: Only open before every sampling. The time is by default, it is AT+5VT=0. Max open time. 5000 ms. 1144 1144 ))) 1145 1145 1146 -+3.3V: is always ON 1147 1147 1148 - +5V:Only open before every sampling.The time is by default, it isAT+5VT=0. Max opentime.5000 ms.1635 += 4. Case Study = 1149 1149 1150 - 1.CaseStudy1637 +User can check this URL for some case studies: [[APP RS485 COMMUNICATE WITH SENSORS>>doc:Main.Application Note \: Communicate with Different Sensors ----- RS485-LN RS485-BL.WebHome]] 1151 1151 1152 -User can check this URL for some case studies. 1153 1153 1154 - [[http:~~/~~/wiki.dragino.com/index.php?title=APP_RS485_COMMUNICATE_WITH_SENSORS>>url:http://wiki.dragino.com/index.php?title=APP_RS485_COMMUNICATE_WITH_SENSORS]]1640 += 5. Use AT Command = 1155 1155 1642 +== 5.1 Access AT Command == 1156 1156 1644 +((( 1645 +RS485-BL supports AT Command set. User can use a USB to TTL adapter plus the 3.5mm Program Cable to connect to RS485-BL to use AT command, as below. 1646 +))) 1157 1157 1648 +[[image:1654135840598-282.png]] 1158 1158 1159 -1. Use AT Command 1160 -11. Access AT Command 1161 1161 1162 -RS485-BL supports AT Command set. User can use a USB to TTL adapter plus the 3.5mm Program Cable to connect to RS485-BL to use AT command, as below. 1651 +((( 1652 +In PC, User needs to set (% style="color:blue" %)**serial tool**(%%)(such as [[putty>>url:https://www.chiark.greenend.org.uk/~~sgtatham/putty/latest.html]], SecureCRT) baud rate to (% style="color:green" %)**9600**(%%) to access to access serial console of RS485-BL. The default password is 123456. Below is the output for reference: 1653 +))) 1163 1163 1164 -[[image: file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image027.png]]1655 +[[image:1654136105500-922.png]] 1165 1165 1166 1166 1167 -In PC, User needs to set **serial tool**(such as [[putty>>url:https://www.chiark.greenend.org.uk/~~sgtatham/putty/latest.html]], SecureCRT) baud rate to **9600** to access to access serial console of RS485-BL. The default password is 123456. Below is the output for reference: 1658 +((( 1659 +More detail AT Command manual can be found at [[AT Command Manual>>||anchor="H3.5ConfigureRS485-BLviaATorDownlink"]] 1660 +))) 1168 1168 1169 -[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image028.png]] 1170 1170 1663 +== 5.2 Common AT Command Sequence == 1171 1171 1665 +=== 5.2.1 Multi-channel ABP mode (Use with SX1301/LG308) === 1172 1172 1173 - MoredetailAT Commandmanual can be found at[[AT CommandManual>>path:#AT_COMMAND]]1667 +If device has not joined network yet: 1174 1174 1669 +(% class="box infomessage" %) 1670 +((( 1671 +**AT+FDR** 1672 +))) 1175 1175 1674 +(% class="box infomessage" %) 1675 +((( 1676 +**AT+NJM=0** 1677 +))) 1176 1176 1177 -1. 1178 -11. Common AT Command Sequence 1179 -111. Multi-channel ABP mode (Use with SX1301/LG308) 1679 +(% class="box infomessage" %) 1680 +((( 1681 +**ATZ** 1682 +))) 1180 1180 1181 -If device has not joined network yet: 1182 1182 1183 -AT+FDR 1685 +((( 1686 +If device already joined network: 1687 +))) 1184 1184 1185 -AT+NJM=0 1689 +(% class="box infomessage" %) 1690 +((( 1691 +**AT+NJM=0** 1692 +))) 1186 1186 1187 -ATZ 1694 +(% class="box infomessage" %) 1695 +((( 1696 +**ATZ** 1697 +))) 1188 1188 1189 1189 1190 - Ifdevicealready joinednetwork:1700 +=== 5.5.2 Single-channel ABP mode (Use with LG01/LG02) === 1191 1191 1192 -AT+NJM=0 1193 1193 1194 -AT Z1703 +(% style="background-color:#dcdcdc" %)**AT+FDR** (%%) Reset Parameters to Factory Default, Keys Reserve 1195 1195 1196 -1. 1197 -11. 1198 -111. Single-channel ABP mode (Use with LG01/LG02) 1705 +(% style="background-color:#dcdcdc" %)**AT+NJM=0 **(%%)Set to ABP mode 1199 1199 1200 -AT+ FDRResetParametersto FactoryDefault,KeysReserve1707 +(% style="background-color:#dcdcdc" %)**AT+ADR=0** (%%)Set the Adaptive Data Rate Off 1201 1201 1202 -AT+ NJM=0Set toABP mode1709 +(% style="background-color:#dcdcdc" %)**AT+DR=5** (%%)Set Data Rate 1203 1203 1204 -AT+ ADR=0 Set the AdaptiveDataRateOff1711 +(% style="background-color:#dcdcdc" %)**AT+TDC=60000** (%%) Set transmit interval to 60 seconds 1205 1205 1206 -AT+ DR=5SetDataRate1713 +(% style="background-color:#dcdcdc" %)**AT+CHS=868400000**(%%) Set transmit frequency to 868.4Mhz 1207 1207 1208 -AT+ TDC=60000transmit interval60seconds1715 +(% style="background-color:#dcdcdc" %)**AT+RX2FQ=868400000** (%%) Set RX2Frequency to 868.4Mhz (according to the result from server) 1209 1209 1210 -AT+ CHS=868400000Set transmitfrequencyto868.4Mhz1717 +(% style="background-color:#dcdcdc" %)**AT+RX2DR=5** (%%) Set RX2DR to match the downlink DR from server. see below 1211 1211 1212 -AT+R X2FQ=868400000SetRX2Frequencyto868.4Mhz(accordingto theresult fromserver)1719 +(% style="background-color:#dcdcdc" %)**AT+DADDR=26** (%%) 01 1A F1 Set Device Address to 26 01 1A F1, this ID can be found in the LoRa Server portal. 1213 1213 1214 - AT+RX2DR=5SetRX2DR to match the downlinkDRfromserver.seebelow1721 +(% style="background-color:#dcdcdc" %)**ATZ** (%%) Reset MCU 1215 1215 1216 -AT+DADDR=26 01 1A F1 Set Device Address to 26 01 1A F1, this ID can be found in the LoRa Server portal. 1217 1217 1218 - ATZResetMCU1724 +(% style="color:red" %)**Note:** 1219 1219 1220 -**Note:** 1726 +((( 1727 +(% style="color:red" %)1. Make sure the device is set to ABP mode in the IoT Server. 1728 +2. Make sure the LG01/02 gateway RX frequency is exactly the same as AT+CHS setting. 1729 +3. Make sure SF / bandwidth setting in LG01/LG02 match the settings of AT+DR. refer [[this link>>url:http://www.dragino.com/downloads/index.php?dir=LoRa_Gateway/&file=LoRaWAN%201.0.3%20Regional%20Parameters.xlsx]] to see what DR means. 1730 +4. The command AT+RX2FQ and AT+RX2DR is to let downlink work. to set the correct parameters, user can check the actually downlink parameters to be used. As below. Which shows the RX2FQ should use 868400000 and RX2DR should be 5 1731 +))) 1221 1221 1222 -1. Make sure the device is set to ABP mode in the IoT Server. 1223 -1. Make sure the LG01/02 gateway RX frequency is exactly the same as AT+CHS setting. 1224 -1. Make sure SF / bandwidth setting in LG01/LG02 match the settings of AT+DR. refer [[this link>>url:http://www.dragino.com/downloads/index.php?dir=LoRa_Gateway/&file=LoRaWAN%201.0.3%20Regional%20Parameters.xlsx]] to see what DR means. 1225 -1. The command AT+RX2FQ and AT+RX2DR is to let downlink work. to set the correct parameters, user can check the actually downlink parameters to be used. As below. Which shows the RX2FQ should use 868400000 and RX2DR should be 5 1733 +[[image:1654136435598-589.png]] 1226 1226 1227 -[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image029.png]] 1228 1228 1736 += 6. FAQ = 1229 1229 1230 -1. FAQ 1231 -11. How to upgrade the image? 1738 +== 6.1 How to upgrade the image? == 1232 1232 1740 +((( 1233 1233 The RS485-BL LoRaWAN Controller is shipped with a 3.5mm cable, the cable is used to upload image to RS485-BL to: 1742 +))) 1234 1234 1235 -* Support new features 1236 -* For bug fix 1237 -* Change LoRaWAN bands. 1744 +* ((( 1745 +Support new features 1746 +))) 1747 +* ((( 1748 +For bug fix 1749 +))) 1750 +* ((( 1751 +Change LoRaWAN bands. 1752 +))) 1238 1238 1754 +((( 1239 1239 Below shows the hardware connection for how to upload an image to RS485-BL: 1756 +))) 1240 1240 1241 -[[image: file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image030.png]]1758 +[[image:1654136646995-976.png]] 1242 1242 1243 1243 **Step1:** Download [[flash loader>>url:https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/flasher-stm32.html]]. 1244 1244 ... ... @@ -1246,97 +1246,103 @@ 1246 1246 1247 1247 **Step3: **Open flashloader; choose the correct COM port to update. 1248 1248 1766 +[[image:image-20220602102605-1.png]] 1249 1249 1250 -|((( 1251 -HOLD PRO then press the RST button, SYS will be ON, then click next 1252 -))) 1253 1253 1254 -|((( 1255 -Board detected 1256 -))) 1769 +[[image:image-20220602102637-2.png]] 1257 1257 1258 -|((( 1259 - 1260 -))) 1261 1261 1262 -[[image: file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image031.png]] [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image032.png]]1772 +[[image:image-20220602102715-3.png]] 1263 1263 1264 1264 1265 1265 1266 - [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image033.png]][[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image034.png]]1776 +== 6.2 How to change the LoRa Frequency Bands/Region? == 1267 1267 1778 +((( 1779 +User can follow the introduction for [[how to upgrade image>>||anchor="H6.1Howtoupgradetheimage3F"]]. When download the images, choose the required image file for download. 1780 +))) 1268 1268 1269 -[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image035.png]] [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image036.png]] 1270 1270 1271 1271 1272 -1. 1273 -11. How to change the LoRa Frequency Bands/Region? 1784 +== 6.3 How many RS485-Slave can RS485-BL connects? == 1274 1274 1275 -User can follow the introduction for [[how to upgrade image>>path:#upgrade_image]]. When download the images, choose the required image file for download. 1786 +((( 1787 +The RS485-BL can support max 32 RS485 devices. Each uplink command of RS485-BL can support max 16 different RS485 command. So RS485-BL can support max 16 RS485 devices pre-program in the device for uplink. For other devices no pre-program, user can use the [[downlink message (type code 0xA8) to poll their info>>||anchor="H3.3.3Configurereadcommandsforeachsampling"]]. 1788 +))) 1276 1276 1277 1277 1278 1278 1279 -1. 1280 -11. How many RS485-Slave can RS485-BL connects? 1792 += 7. Trouble Shooting = 1281 1281 1282 -The RS485-BL can support max 32 RS485 devices. Each uplink command of RS485-BL can support max 16 different RS485 command. So RS485-BL can support max 16 RS485 devices pre-program in the device for uplink. For other devices no pre-program, user can use the [[downlink message (type code 0xA8) to poll their info>>path:#downlink_A8]]. 1283 1283 1795 +== 7.1 Downlink doesn’t work, how to solve it? == 1284 1284 1797 +Please see this link for debug: [[LoRaWAN Communication Debug>>doc:Main.LoRaWAN Communication Debug.WebHome]] 1285 1285 1286 1286 1287 -1. Trouble Shooting 1288 -11. Downlink doesn’t work, how to solve it? 1800 +== 7.2 Why I can’t join TTN V3 in US915 /AU915 bands? == 1289 1289 1290 -Please see t hislinkfor debug:1802 +It might about the channels mapping. Please see for detail: [[Notice of Frequency band>>doc:Main.LoRaWAN Communication Debug.WebHome||anchor="H2.NoticeofUS9152FCN4702FAU915Frequencyband"]] 1291 1291 1292 -[[http:~~/~~/wiki.dragino.com/index.php?title=Main_Page#LoRaWAN_Communication_Debug>>url:http://wiki.dragino.com/index.php?title=Main_Page#LoRaWAN_Communication_Debug]] 1293 1293 1805 += 8. Order Info = 1294 1294 1807 +(% style="color:blue" %)**Part Number: RS485-BL-XXX** 1295 1295 1296 -1. 1297 -11. Why I can’t join TTN V3 in US915 /AU915 bands? 1809 +(% style="color:blue" %)**XXX:** 1298 1298 1299 -It might about the channels mapping. Please see for detail. 1811 +* (% style="color:blue" %)**EU433**(%%): frequency bands EU433 1812 +* (% style="color:blue" %)**EU868**(%%): frequency bands EU868 1813 +* (% style="color:blue" %)**KR920**(%%): frequency bands KR920 1814 +* (% style="color:blue" %)**CN470**(%%): frequency bands CN470 1815 +* (% style="color:blue" %)**AS923**(%%): frequency bands AS923 1816 +* (% style="color:blue" %)**AU915**(%%): frequency bands AU915 1817 +* (% style="color:blue" %)**US915**(%%): frequency bands US915 1818 +* (% style="color:blue" %)**IN865**(%%): frequency bands IN865 1819 +* (% style="color:blue" %)**RU864**(%%): frequency bands RU864 1820 +* (% style="color:blue" %)**KZ865**(%%): frequency bands KZ865 1300 1300 1301 -[[http:~~/~~/wiki.dragino.com/index.php?title=LoRaWAN_Communication_Debug#Notice_of_US915.2FCN470.2FAU915_Frequency_band>>url:http://wiki.dragino.com/index.php?title=LoRaWAN_Communication_Debug#Notice_of_US915.2FCN470.2FAU915_Frequency_band]] 1302 1302 1823 += 9. Packing Info = 1303 1303 1304 - 1305 -1. Order Info 1306 - 1307 -**Part Number: RS485-BL-XXX** 1308 - 1309 -**XXX:** 1310 - 1311 -* **EU433**: frequency bands EU433 1312 -* **EU868**: frequency bands EU868 1313 -* **KR920**: frequency bands KR920 1314 -* **CN470**: frequency bands CN470 1315 -* **AS923**: frequency bands AS923 1316 -* **AU915**: frequency bands AU915 1317 -* **US915**: frequency bands US915 1318 -* **IN865**: frequency bands IN865 1319 -* **RU864**: frequency bands RU864 1320 -* **KZ865: **frequency bands KZ865 1321 - 1322 -1. Packing Info 1323 - 1825 +((( 1324 1324 **Package Includes**: 1827 +))) 1325 1325 1326 -* RS485-BL x 1 1327 -* Stick Antenna for LoRa RF part x 1 1328 -* Program cable x 1 1829 +* ((( 1830 +RS485-BL x 1 1831 +))) 1832 +* ((( 1833 +Stick Antenna for LoRa RF part x 1 1834 +))) 1835 +* ((( 1836 +Program cable x 1 1837 +))) 1329 1329 1839 +((( 1330 1330 **Dimension and weight**: 1841 +))) 1331 1331 1332 -* Device Size: 13.5 x 7 x 3 cm 1333 -* Device Weight: 105g 1334 -* Package Size / pcs : 14.5 x 8 x 5 cm 1335 -* Weight / pcs : 170g 1843 +* ((( 1844 +Device Size: 13.5 x 7 x 3 cm 1845 +))) 1846 +* ((( 1847 +Device Weight: 105g 1848 +))) 1849 +* ((( 1850 +Package Size / pcs : 14.5 x 8 x 5 cm 1851 +))) 1852 +* ((( 1853 +Weight / pcs : 170g 1336 1336 1337 -1. Support 1855 + 1856 +))) 1338 1338 1339 -* Support is provided Monday to Friday, from 09:00 to 18:00 GMT+8. Due to different timezones we cannot offer live support. However, your questions will be answered as soon as possible in the before-mentioned schedule. 1340 -* Provide as much information as possible regarding your enquiry (product models, accurately describe your problem and steps to replicate it etc) and send a mail to 1858 += 10. Support = 1341 1341 1342 -[[support@dragino.com>>url:file:///D:/市场资料/说明书/LoRa/LT系列/support@dragino.com]] 1860 +* ((( 1861 +Support is provided Monday to Friday, from 09:00 to 18:00 GMT+8. Due to different timezones we cannot offer live support. However, your questions will be answered as soon as possible in the before-mentioned schedule. 1862 +))) 1863 +* ((( 1864 +Provide as much information as possible regarding your enquiry (product models, accurately describe your problem and steps to replicate it etc) and send a mail to [[support@dragino.com>>url:file:///D:/市场资料/说明书/LoRa/LT系列/support@dragino.com]] 1865 +)))
- 1654134704555-320.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +91.4 KB - Content
- 1654135840598-282.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +1.3 MB - Content
- 1654136105500-922.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +203.7 KB - Content
- 1654136435598-589.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +158.9 KB - Content
- 1654136646995-976.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +1.3 MB - Content
- image-20220602102605-1.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +102.6 KB - Content
- image-20220602102637-2.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +250.8 KB - Content
- image-20220602102715-3.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +176.2 KB - Content
- image-20220606105412-1.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +13.9 KB - Content