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, 1 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -501,102 +501,182 @@ 501 501 ))) 502 502 ))) 503 503 504 +((( 504 504 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. 506 +))) 505 505 508 +((( 506 506 In the RS485-BL, we should use this command AT+COMMAND1=01 03 0B B8 00 02,1 for the same. 510 +))) 507 507 512 +((( 508 508 **AT+SEARCHx**: This command defines how to handle the return from AT+COMMANDx. 514 +))) 509 509 510 510 (% border="1" class="table-bordered" style="background-color:#4f81bd; color:white; width:500px" %) 511 511 |(% style="width:577px" %)((( 518 +((( 512 512 **AT+SEARCHx=aa,xx xx xx xx xx** 520 +))) 513 513 514 -* **aa: 1: prefix match mode; 2: prefix and suffix match mode**515 -* *xxxxxxxx xx:matchstring. Max 5 bytesforprefix and5 bytesfor suffix**522 +* ((( 523 +**aa: 1: prefix match mode; 2: prefix and suffix match mode** 516 516 ))) 525 +* ((( 526 +**xx xx xx xx xx: match string. Max 5 bytes for prefix and 5 bytes for suffix** 527 +))) 528 +))) 517 517 530 +((( 518 518 **Examples:** 532 +))) 519 519 534 +((( 520 520 1)For a return string from AT+COMMAND1: 16 0c 1e 56 34 2e 30 58 5f 36 41 30 31 00 49 536 +))) 521 521 538 +((( 522 522 If we set AT+SEARCH1=1,1E 56 34. (max 5 bytes for prefix) 540 +))) 523 523 542 +((( 524 524 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** 544 +))) 525 525 546 +((( 526 526 [[image:1653271044481-711.png]] 548 +))) 527 527 550 +((( 528 528 2)For a return string from AT+COMMAND1: 16 0c 1e 56 34 2e 30 58 5f 36 41 30 31 00 49 552 +))) 529 529 554 +((( 530 530 If we set AT+SEARCH1=2, 1E 56 34+31 00 49 556 +))) 531 531 558 +((( 532 532 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** 560 +))) 533 533 562 +((( 534 534 [[image:1653271276735-972.png]] 564 +))) 535 535 566 +((( 536 536 **AT+DATACUTx : **This command defines how to handle the return from AT+COMMANDx, max return length is 45 bytes. 568 +))) 537 537 538 538 (% style="background-color:#4f81bd; color:white; width:510px" %) 539 539 |(% style="width:726px" %)((( 572 +((( 540 540 **AT+DATACUTx=a,b,c** 574 +))) 541 541 542 -* **a: length for the return of AT+COMMAND** 543 -* **b:1: grab valid value by byte, max 6 bytes. 2: grab valid value by bytes section, max 3 sections.** 544 -* **c: define the position for valid value. ** 576 +* ((( 577 +**a: length for the return of AT+COMMAND** 545 545 ))) 579 +* ((( 580 +**b:1: grab valid value by byte, max 6 bytes. 2: grab valid value by bytes section, max 3 sections.** 581 +))) 582 +* ((( 583 +**c: define the position for valid value. ** 584 +))) 585 +))) 546 546 587 +((( 547 547 **Examples:** 589 +))) 548 548 549 -* Grab bytes: 591 +* ((( 592 +Grab bytes: 593 +))) 550 550 595 +((( 551 551 [[image:1653271581490-837.png||height="313" width="722"]] 597 +))) 552 552 599 +((( 600 + 601 +))) 553 553 554 -* Grab a section. 603 +* ((( 604 +Grab a section. 605 +))) 555 555 607 +((( 556 556 [[image:1653271648378-342.png||height="326" width="720"]] 609 +))) 557 557 611 +((( 612 + 613 +))) 558 558 559 -* Grab different sections. 615 +* ((( 616 +Grab different sections. 617 +))) 560 560 619 +((( 561 561 [[image:1653271657255-576.png||height="305" width="730"]] 621 +))) 562 562 563 563 ((( 624 +((( 564 564 (% style="color:red" %)**Note:** 565 565 ))) 627 +))) 566 566 567 567 ((( 630 +((( 568 568 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. 569 569 ))) 633 +))) 570 570 571 571 ((( 636 +((( 572 572 **Example:** 573 573 ))) 639 +))) 574 574 575 575 ((( 642 +((( 576 576 (% style="color:red" %)AT+COMMAND1=11 01 1E D0,0 577 577 ))) 645 +))) 578 578 579 579 ((( 648 +((( 580 580 (% style="color:red" %)AT+SEARCH1=1,1E 56 34 581 581 ))) 651 +))) 582 582 583 583 ((( 654 +((( 584 584 (% style="color:red" %)AT+DATACUT1=0,2,1~~5 585 585 ))) 657 +))) 586 586 587 587 ((( 660 +((( 588 588 (% style="color:red" %)Return string from AT+COMMAND1: 16 0c 1e 56 34 2e 30 58 5f 36 41 30 31 00 49 589 589 ))) 663 +))) 590 590 591 591 ((( 666 +((( 592 592 (% style="color:red" %)String after SEARCH command: 2e 30 58 5f 36 41 30 31 00 49 593 593 ))) 669 +))) 594 594 595 595 ((( 672 +((( 596 596 (% style="color:red" %)Valid payload after DataCUT command: 2e 30 58 5f 36 597 597 ))) 675 +))) 598 598 677 +((( 599 599 [[image:1653271763403-806.png]] 679 +))) 600 600 601 601 602 602 === 3.3.4 Compose the uplink payload === ... ... @@ -743,26 +743,8 @@ 743 743 744 744 == 3.4 Uplink Payload == 745 745 746 -(% border="1" style="background-color:#4f81bd; color:white; width:850px" %) 747 -|**Size(bytes)**|(% style="width:130px" %)**2**|(% style="width:93px" %)**1**|(% style="width:509px" %)**Length depends on the return from the commands** 748 -|Value|(% style="width:130px" %)((( 749 -((( 750 -Battery(mV) 751 -))) 826 +[[image:image-20220606105412-1.png]] 752 752 753 -((( 754 -& 755 -))) 756 - 757 -((( 758 -Interrupt _Flag 759 -))) 760 -)))|(% style="width:93px" %)((( 761 -PAYLOAD_VER 762 - 763 - 764 -)))|(% 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. 765 - 766 766 Below is the decoder for the first 3 bytes. The rest bytes are dynamic depends on different RS485 sensors. 767 767 768 768 ((( ... ... @@ -828,6 +828,8 @@ 828 828 829 829 * (% style="color:#4f81bd" %)**Sensor Related Commands**(%%): These commands are special designed for RS485-BL. User can see these commands below: 830 830 893 + 894 + 831 831 === 3.5.1 Common Commands: === 832 832 833 833 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]] ... ... @@ -836,6 +836,7 @@ 836 836 === 3.5.2 Sensor related commands: === 837 837 838 838 903 + 839 839 ==== **Choose Device Type (RS485 or TTL)** ==== 840 840 841 841 RS485-BL can connect to either RS485 sensors or TTL sensor. User need to specify what type of sensor need to connect. ... ... @@ -859,6 +859,7 @@ 859 859 860 860 861 861 927 + 862 862 ==== **RS485 Debug Command (AT+CFGDEV)** ==== 863 863 864 864 This command is used to configure the RS485 or TTL sensors; they won’t be used during sampling. ... ... @@ -910,6 +910,7 @@ 910 910 911 911 912 912 979 + 913 913 ==== **Set Payload version** ==== 914 914 915 915 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. ... ... @@ -930,6 +930,7 @@ 930 930 931 931 932 932 1000 + 933 933 ==== **Set RS485 Sampling Commands** ==== 934 934 935 935 AT+COMMANDx, AT+DATACUTx and AT+SEARCHx ... ... @@ -991,6 +991,7 @@ 991 991 992 992 993 993 1062 + 994 994 ==== **Fast command to handle MODBUS device** ==== 995 995 996 996 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]]. ... ... @@ -1024,6 +1024,7 @@ 1024 1024 1025 1025 1026 1026 1096 + 1027 1027 ==== **RS485 command timeout** ==== 1028 1028 1029 1029 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. ... ... @@ -1055,6 +1055,7 @@ 1055 1055 1056 1056 1057 1057 1128 + 1058 1058 ==== **Uplink payload mode** ==== 1059 1059 1060 1060 Define to use one uplink or multiple uplinks for the sampling. ... ... @@ -1101,7 +1101,9 @@ 1101 1101 1102 1102 * **AT Command:** 1103 1103 1175 +((( 1104 1104 (% 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 1177 +))) 1105 1105 1106 1106 Example screen shot after clear all RS485 commands. 1107 1107 ... ... @@ -1117,6 +1117,7 @@ 1117 1117 1118 1118 1119 1119 1193 + 1120 1120 ==== **Set Serial Communication Parameters** ==== 1121 1121 1122 1122 Set the Rs485 serial communication parameters: ... ... @@ -1160,6 +1160,7 @@ 1160 1160 1161 1161 1162 1162 1237 + 1163 1163 ==== **Control output power duration** ==== 1164 1164 1165 1165 User can set the output power duration before each sampling. ... ... @@ -1187,6 +1187,8 @@ 1187 1187 |=(% style="width: 89px;" %)**Button**|=(% style="width: 141px;" %)**Feature** 1188 1188 |(% style="width:89px" %)**RST**|(% style="width:141px" %)Reboot RS485-BL 1189 1189 1265 + 1266 + 1190 1190 == 3.7 +3V3 Output == 1191 1191 1192 1192 RS485-BL has a Controllable +3V3 output, user can use this output to power external sensor.
- image-20220606105412-1.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +13.9 KB - Content