Changes for page RS485-LN – RS485 to LoRaWAN Converter User Manual
Last modified by Karry Zhuang on 2025/03/06 16:34
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 2 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -499,7 +499,6 @@ 499 499 500 500 * (% style="color:#4f81bd" %)**Sensor Related Commands**(%%): These commands are special designed for RS485-LN. User can see these commands below: 501 501 502 - 503 503 === 3.5.1 Common Commands === 504 504 505 505 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]] ... ... @@ -545,7 +545,6 @@ 545 545 ** if YY>0, RS485-LN will uplink total YY bytes from the output of this RS485 command; Fport=200 546 546 ** if YY=FF, RS485-LN will uplink RS485 output with the downlink command content; Fport=200. 547 547 548 - 549 549 **Example 1** ~-~-> Configure without ask for uplink (YY=0) 550 550 551 551 To connect a Modbus Alarm with below commands. ... ... @@ -574,4 +574,243 @@ 574 574 575 575 [[image:1654159460680-153.png]] 576 576 577 -==== ==== 575 + 576 + 577 +==== **Set Payload version** ==== 578 + 579 +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. 580 + 581 +* **AT Command:** 582 + 583 +(% class="box infomessage" %) 584 +((( 585 +**AT+PAYVER: Set PAYVER field = 1** 586 +))) 587 + 588 +* **Downlink Payload:** 589 + 590 +**0xAE 01** ~-~-> Set PAYVER field = 0x01 591 + 592 +**0xAE 0F** ~-~-> Set PAYVER field = 0x0F 593 + 594 + 595 + 596 +==== **Set RS485 Sampling Commands** ==== 597 + 598 +AT+COMMANDx or AT+DATACUTx 599 + 600 +These three commands are used to configure how the RS485-LN polling data from Modbus device. Detail of usage please see : [[polling RS485 device>>||anchor="H3.3.3Configurereadcommandsforeachsampling"]]. 601 + 602 + 603 +* **AT Command:** 604 + 605 +(% class="box infomessage" %) 606 +((( 607 +**AT+COMMANDx: Configure RS485 read command to sensor.** 608 +))) 609 + 610 +(% class="box infomessage" %) 611 +((( 612 +**AT+DATACUTx: Configure how to handle return from RS485 devices.** 613 +))) 614 + 615 + 616 +* **Downlink Payload:** 617 + 618 +**0xAF** downlink command can be used to set AT+COMMANDx or AT+DATACUTx. 619 + 620 +(% style="color:red" %)**Note**(%%): if user use AT+COMMANDx to add a new command, he also need to send AT+DATACUTx downlink. 621 + 622 +Format: AF MM NN LL XX XX XX XX YY 623 + 624 +Where: 625 + 626 +* MM: the ATCOMMAND or AT+DATACUT to be set. Value from 01 ~~ 0F, 627 +* NN: 0: no CRC; 1: add CRC-16/MODBUS ; 2: set the AT+DATACUT value. 628 +* LL: The length of AT+COMMAND or AT+DATACUT command 629 +* XX XX XX XX: AT+COMMAND or AT+DATACUT command 630 +* YY: If YY=0, RS485-BL will execute the downlink command without uplink; if YY=1, RS485-LN will execute an uplink after got this command. 631 + 632 +**Example:** 633 + 634 +(% 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 635 + 636 +(% 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** 637 + 638 +(% 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** 639 + 640 + 641 + 642 +==== **Fast command to handle MODBUS device** ==== 643 + 644 +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]]. 645 + 646 +This command is valid since v1.3 firmware version 647 + 648 +AT+MBFUN 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. 649 + 650 + 651 +**Example:** 652 + 653 +* AT+MBFUN=1 and AT+DATACUT1/AT+DATACUT2 are not configure (0,0,0). So RS485-LN. 654 +* 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. 655 +* 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. 656 + 657 +[[image:image-20220602165351-6.png]] 658 + 659 +[[image:image-20220602165351-7.png]] 660 + 661 + 662 + 663 +==== **RS485 command timeout** ==== 664 + 665 +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. 666 + 667 +Default value: 0, range: 0 ~~ 5 seconds 668 + 669 + 670 +* **AT Command:** 671 + 672 +(% class="box infomessage" %) 673 +((( 674 +**AT+CMDDLaa=hex(bb cc)** 675 +))) 676 + 677 +**Example:** 678 + 679 +**AT+CMDDL1=1000** to send the open time to 1000ms 680 + 681 + 682 +* **Downlink Payload:** 683 + 684 +0x AA aa bb cc 685 + 686 +Same as: AT+CMDDLaa=hex(bb cc) 687 + 688 + **Example:** 689 + 690 + **0xAA 01 03 E8** ~-~-> Same as **AT+CMDDL1=1000 ms** 691 + 692 + 693 + 694 +==== **Uplink payload mode** ==== 695 + 696 +Define to use one uplink or multiple uplinks for the sampling. 697 + 698 +The use of this command please see: [[Compose Uplink payload>>||anchor="H3.3.4Composetheuplinkpayload"]] 699 + 700 +* **AT Command:** 701 + 702 +(% class="box infomessage" %) 703 +((( 704 +**AT+DATAUP=0** 705 +))) 706 + 707 +(% class="box infomessage" %) 708 +((( 709 +**AT+DATAUP=1** 710 +))) 711 + 712 + 713 +* **Downlink Payload:** 714 + 715 +**0xAD 00** **~-~->** Same as AT+DATAUP=0 716 + 717 +**0xAD 01** **~-~->** Same as AT+DATAUP=1 718 + 719 + 720 + 721 +==== **Manually trigger an Uplink** ==== 722 + 723 +Ask device to send an uplink immediately. 724 + 725 +* **Downlink Payload:** 726 + 727 +**0x08 FF**, RS485-BL will immediately send an uplink. 728 + 729 + 730 + 731 +==== **Clear RS485 Command** ==== 732 + 733 +The AT+COMMANDx and AT+DATACUTx settings are stored in special location, user can use below command to clear them. 734 + 735 + 736 +* **AT Command:** 737 + 738 +(% 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 739 + 740 +Example screen shot after clear all RS485 commands. 741 + 742 + 743 +The uplink screen shot is: 744 + 745 +[[image:1654134704555-320.png]] 746 + 747 + 748 +* **Downlink Payload:** 749 + 750 +**0x09 aa bb** same as AT+CMDEAR=aa,bb 751 + 752 + 753 + 754 +==== **Set Serial Communication Parameters** ==== 755 + 756 +Set the Rs485 serial communication parameters: 757 + 758 +* **AT Command:** 759 + 760 +Set Baud Rate: 761 + 762 +(% class="box infomessage" %) 763 +((( 764 +**AT+BAUDR=9600** ~/~/ Options: (1200,2400,4800,14400,19200,115200) 765 +))) 766 + 767 +Set UART Parity 768 + 769 +(% class="box infomessage" %) 770 +((( 771 +**AT+PARITY=0** ~/~/ Option: 0: no parity, 1: odd parity, 2: even parity 772 +))) 773 + 774 +Set STOPBIT 775 + 776 +(% class="box infomessage" %) 777 +((( 778 +**AT+STOPBIT=0** ~/~/ Option: 0 for 1bit; 1 for 1.5 bit ; 2 for 2 bits 779 +))) 780 + 781 + 782 +* **Downlink Payload:** 783 + 784 +**A7 01 aa bb**: Same AT+BAUDR=hex(aa bb)*100 785 + 786 +**Example:** 787 + 788 +* A7 01 00 60 same as AT+BAUDR=9600 789 +* A7 01 04 80 same as AT+BAUDR=115200 790 + 791 +A7 02 aa: Same as AT+PARITY=aa (aa value: 00 , 01 or 02) 792 + 793 +A7 03 aa: Same as AT+STOPBIT=aa (aa value: 00 , 01 or 02) 794 + 795 + 796 + 797 +==== **Control output power duration** ==== 798 + 799 +User can set the output power duration before each sampling. 800 + 801 +* **AT Command:** 802 + 803 +**Example:** 804 + 805 +**AT+3V3T=1000** ~/~/ 3V3 output power will open 1s before each sampling. 806 + 807 +**AT+5VT=1000** ~/~/ +5V output power will open 1s before each sampling. 808 + 809 + 810 +* **LoRaWAN Downlink Command:** 811 + 812 +**07 01 aa bb** Same as AT+5VT=(aa bb) 813 + 814 +**07 02 aa bb** Same as AT+3V3T=(aa bb)
- image-20220602165351-6.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +10.6 KB - Content
- image-20220602165351-7.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +19.3 KB - Content