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,186 @@ 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 +((( 513 + 514 +))) 515 + 516 +((( 508 508 **AT+SEARCHx**: This command defines how to handle the return from AT+COMMANDx. 518 +))) 509 509 510 510 (% border="1" class="table-bordered" style="background-color:#4f81bd; color:white; width:500px" %) 511 511 |(% style="width:577px" %)((( 522 +((( 512 512 **AT+SEARCHx=aa,xx xx xx xx xx** 524 +))) 513 513 514 -* **aa: 1: prefix match mode; 2: prefix and suffix match mode**515 -* *xxxxxxxx xx:matchstring. Max 5 bytesforprefix and5 bytesfor suffix**526 +* ((( 527 +**aa: 1: prefix match mode; 2: prefix and suffix match mode** 516 516 ))) 529 +* ((( 530 +**xx xx xx xx xx: match string. Max 5 bytes for prefix and 5 bytes for suffix** 531 +))) 532 +))) 517 517 534 +((( 518 518 **Examples:** 536 +))) 519 519 538 +((( 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 540 +))) 521 521 542 +((( 522 522 If we set AT+SEARCH1=1,1E 56 34. (max 5 bytes for prefix) 544 +))) 523 523 546 +((( 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** 548 +))) 525 525 550 +((( 526 526 [[image:1653271044481-711.png]] 552 +))) 527 527 554 +((( 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 556 +))) 529 529 558 +((( 530 530 If we set AT+SEARCH1=2, 1E 56 34+31 00 49 560 +))) 531 531 562 +((( 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** 564 +))) 533 533 566 +((( 534 534 [[image:1653271276735-972.png]] 568 +))) 535 535 570 +((( 536 536 **AT+DATACUTx : **This command defines how to handle the return from AT+COMMANDx, max return length is 45 bytes. 572 +))) 537 537 538 538 (% style="background-color:#4f81bd; color:white; width:510px" %) 539 539 |(% style="width:726px" %)((( 576 +((( 540 540 **AT+DATACUTx=a,b,c** 578 +))) 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. ** 580 +* ((( 581 +**a: length for the return of AT+COMMAND** 545 545 ))) 583 +* ((( 584 +**b:1: grab valid value by byte, max 6 bytes. 2: grab valid value by bytes section, max 3 sections.** 585 +))) 586 +* ((( 587 +**c: define the position for valid value. ** 588 +))) 589 +))) 546 546 591 +((( 547 547 **Examples:** 593 +))) 548 548 549 -* Grab bytes: 595 +* ((( 596 +Grab bytes: 597 +))) 550 550 599 +((( 551 551 [[image:1653271581490-837.png||height="313" width="722"]] 601 +))) 552 552 603 +((( 604 + 605 +))) 553 553 554 -* Grab a section. 607 +* ((( 608 +Grab a section. 609 +))) 555 555 611 +((( 556 556 [[image:1653271648378-342.png||height="326" width="720"]] 613 +))) 557 557 615 +((( 616 + 617 +))) 558 558 559 -* Grab different sections. 619 +* ((( 620 +Grab different sections. 621 +))) 560 560 623 +((( 561 561 [[image:1653271657255-576.png||height="305" width="730"]] 625 +))) 562 562 563 563 ((( 628 +((( 564 564 (% style="color:red" %)**Note:** 565 565 ))) 631 +))) 566 566 567 567 ((( 634 +((( 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 ))) 637 +))) 570 570 571 571 ((( 640 +((( 572 572 **Example:** 573 573 ))) 643 +))) 574 574 575 575 ((( 646 +((( 576 576 (% style="color:red" %)AT+COMMAND1=11 01 1E D0,0 577 577 ))) 649 +))) 578 578 579 579 ((( 652 +((( 580 580 (% style="color:red" %)AT+SEARCH1=1,1E 56 34 581 581 ))) 655 +))) 582 582 583 583 ((( 658 +((( 584 584 (% style="color:red" %)AT+DATACUT1=0,2,1~~5 585 585 ))) 661 +))) 586 586 587 587 ((( 664 +((( 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 ))) 667 +))) 590 590 591 591 ((( 670 +((( 592 592 (% style="color:red" %)String after SEARCH command: 2e 30 58 5f 36 41 30 31 00 49 593 593 ))) 673 +))) 594 594 595 595 ((( 676 +((( 596 596 (% style="color:red" %)Valid payload after DataCUT command: 2e 30 58 5f 36 597 597 ))) 679 +))) 598 598 681 +((( 599 599 [[image:1653271763403-806.png]] 683 +))) 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 -))) 830 +[[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 ((( ... ... @@ -820,14 +820,24 @@ 820 820 821 821 == 3.5 Configure RS485-BL via AT or Downlink == 822 822 889 +((( 823 823 User can configure RS485-BL via AT Commands or LoRaWAN Downlink Commands 891 +))) 824 824 893 +((( 825 825 There are two kinds of Commands: 895 +))) 826 826 827 -* (% 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]] 897 +* ((( 898 +(% 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]] 899 +))) 828 828 829 -* (% style="color:#4f81bd" %)**Sensor Related Commands**(%%): These commands are special designed for RS485-BL. User can see these commands below: 901 +* ((( 902 +(% style="color:#4f81bd" %)**Sensor Related Commands**(%%): These commands are special designed for RS485-BL. User can see these commands below: 903 +))) 830 830 905 + 906 + 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 915 + 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 939 + 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 991 + 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 1012 + 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 1074 + 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 1108 + 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 1140 + 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 1187 +((( 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 1189 +))) 1105 1105 1106 1106 Example screen shot after clear all RS485 commands. 1107 1107 ... ... @@ -1117,6 +1117,7 @@ 1117 1117 1118 1118 1119 1119 1205 + 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 1249 + 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 1277 + 1278 + 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