Changes for page SPH01-LB -- LoRaWAN Soil pH Sensor User Manual
Last modified by Xiaoling on 2024/01/15 09:36
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -304,7 +304,7 @@ 304 304 === 2.3.5 Interrupt Pin === 305 305 306 306 307 -This data field shows if this packet is generated by interrupt or not. [[Click here>>||anchor="H3. 3.2SetInterruptMode"]] for the hardware and software set up.307 +This data field shows if this packet is generated by interrupt or not. [[Click here>>||anchor="H3.2SetInterruptMode"]] for the hardware and software set up. 308 308 309 309 310 310 **Example:** ... ... @@ -581,7 +581,6 @@ 581 581 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/]] 582 582 583 583 584 - 585 585 = 3. Configure SPH01-LB = 586 586 587 587 == 3.1 Configure Methods == ... ... @@ -656,131 +656,285 @@ 656 656 657 657 * ((( 658 658 Example 2: Downlink Payload: 0100003C ~/~/ Set Transmit Interval (TDC) = 60 seconds 658 + 659 + 660 + 659 659 ))) 660 660 663 +=== 3.3.2 Quit AT Command === 661 661 662 662 663 - ===3.3.2SetInterruptMode ===666 +Feature: Quit AT Command mode, so user needs to input the password again before using AT Commands. 664 664 668 +(% style="color:blue" %)**AT Command: AT+DISAT** 665 665 666 -Feature, Set Interrupt mode for PA8 of pin. 670 +(% border="1" cellspacing="5" style="background-color:#f2f2f2; width:452px" %) 671 +|=(% style="width: 155px;background-color:#D9E2F3;color:#0070C0" %)**Command Example**|=(% style="width: 198px;background-color:#D9E2F3;color:#0070C0" %)**Function**|=(% style="width: 99px;background-color:#D9E2F3;color:#0070C0" %)**Response** 672 +|(% style="width:155px" %)AT+DISAT|(% style="width:198px" %)Quit AT Commands mode|(% style="width:96px" %)OK 667 667 668 - WhenAT+INTMOD=0 isset, PA8 isusedas a digitalputport.674 +(% style="color:blue" %)**Downlink Command:** 669 669 670 - (%style="color:blue"%)**AT Command:AT+INTMOD**676 +No downlink command for this feature. 671 671 672 -(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %) 673 -|=(% style="width: 155px;background-color:#D9E2F3;color:#0070C0" %)**Command Example**|=(% style="width: 197px;background-color:#D9E2F3;color:#0070C0" %)**Function**|=(% style="width: 158px;background-color:#D9E2F3;color:#0070C0" %)**Response** 674 -|(% style="width:154px" %)AT+INTMOD=?|(% style="width:196px" %)Show current interrupt mode|(% style="width:157px" %)((( 675 -0 676 -OK 677 -the mode is 0 =Disable Interrupt 678 + 679 +=== 3.3.3 Get Device Status === 680 + 681 + 682 +Send a LoRaWAN downlink to ask device send Alarm settings. 683 + 684 +(% style="color:blue" %)**Downlink Payload: **(%%)0x26 01 685 + 686 +Sensor will upload Device Status via FPORT=5. See payload section for detail. 687 + 688 + 689 +=== 3.3.4 Enable / Disable Alarm === 690 + 691 + 692 +Feature: Enable/Disable Alarm for open/close event. Default value 0. 693 + 694 +(% style="color:blue" %)**AT Command:** 695 + 696 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:520px" %) 697 +|(% style="background-color:#d9e2f3; color:#0070c0; width:154px" %)**Command Example**|(% style="background-color:#d9e2f3; color:#0070c0; width:278px" %)**Function**|(% style="background-color:#d9e2f3; color:#0070c0; width:88px" %)**Response** 698 +|(% style="width:154px" %)AT+DISALARM=1|(% style="width:278px" %)End node will only send packets in TDC time.|OK 699 +|(% style="width:154px" %)AT+DISALARM=0|(% style="width:278px" %)End node will send packets in TDC time or status change for door sensor|OK 700 + 701 +(% style="color:blue" %)**Downlink Command:** 702 + 703 +**0xA7 01** ~/~/ Same As AT+DISALARM=1 704 + 705 +**0xA7 00 ** ~/~/ Same As AT+DISALARM=0 706 + 707 + 708 +=== 3.3.5 Alarm Base on Timeout === 709 + 710 + 711 +((( 712 +CPL03-LB can monitor the timeout for a status change, this feature can be used to monitor some events such as door opening too long etc. Related Parameters are: 678 678 ))) 679 -|(% style="width:154px" %)AT+INTMOD=2|(% style="width:196px" %)((( 680 -Set Transmit Interval 681 -0. (Disable Interrupt), 682 -~1. (Trigger by rising and falling edge) 683 -2. (Trigger by falling edge) 684 -3. (Trigger by rising edge) 685 -)))|(% style="width:157px" %)OK 686 686 687 -(% style="color:blue" %)**Downlink Command: 0x06** 688 688 689 -Format: Command Code (0x06) followed by 3 bytes. 716 +((( 717 +(% style="color:#4f81bd" %)**1. Keep Status: Status to be monitor** 718 +))) 690 690 691 -This means that the interrupt mode of the end node is set to 0x000003=3 (rising edge trigger), and the type code is 06. 720 +((( 721 +**Keep Status = 1**: Monitor Close to Open event 722 +))) 692 692 693 -* Example 1: Downlink Payload: 06000000 ~/~/ Turn off interrupt mode 724 +((( 725 +**Keep Status = 0**: Monitor Open to Close event 726 +))) 694 694 695 -* Example 2: Downlink Payload: 06000003 ~/~/ Set the interrupt mode to rising edge trigger 696 696 729 +((( 730 +(% style="color:#4f81bd" %)**2. Keep Time: Timeout to send an Alarm** 731 +))) 697 697 733 +((( 734 +Range 0 ~~ 65535(0xFFFF) seconds. 735 +))) 698 698 737 +((( 738 +If** keep time = 0**, Disable Alarm Base on Timeout feature. 739 +))) 699 699 700 -=== 3.3.3 Calibrate Sensor === 741 +((( 742 +If **keep time > 0**, device will monitor the keep status event and send an alarm when status doesn’t change after timeout. 743 +))) 701 701 702 702 703 -Detail See [[Calibration Guide>>||anchor="H2.7Calibration"]] for the user of 0x13 and 0x14 downlink commands 746 +((( 747 +(% style="color:#4f81bd" %)**AT Command**(%%) to configure: 748 +))) 704 704 750 +((( 751 +(% style="color:blue" %)**AT+TTRIG=1,30**(%%) ~-~-> When the **Keep Status** change from connect to disconnect, and device remains in disconnect status for more than 30 seconds. CPL03-LB will send an uplink packet, the [[Alarm bit>>||anchor="H2.3.3Real-TimeOpen2FCloseStatus2CUplinkFPORT3D2"]] (the second bit of 1^^st^^ byte of payload) on this uplink packet is set to 1. 752 +))) 705 705 706 -=== 3.3.4 Get Firmware Version Info === 754 +((( 755 +(% style="color:blue" %)**AT+TTIG=0,0 **(%%) ~-~-> Default Value, disable timeout Alarm. 756 +))) 707 707 708 708 709 -Feature: use downlink to get firmware version. 759 +((( 760 +(% style="color:#4f81bd" %)**Downlink Command**(%%) to configure: 761 +))) 710 710 711 -(% style="color:#037691" %)**Downlink Command: 0x26** 763 +((( 764 +**Command: 0xA9 aa bb cc** 765 +))) 712 712 767 +((( 768 +**A9: **Command Type Code 769 +))) 770 + 771 +((( 772 +**aa: **status to be monitored 773 +))) 774 + 775 +((( 776 +**bb cc: **timeout. 777 +))) 778 + 779 + 780 +((( 781 +If user send 0xA9 01 00 1E: equal to AT+TTRIG=1,30 782 +))) 783 + 784 +((( 785 +Or 786 +))) 787 + 788 +((( 789 +0xA9 00 00 00: Equal to AT+TTRIG=0,0. Disable timeout Alarm. 790 +))) 791 + 792 + 793 +=== 3.3.6 Clear Flash Record === 794 + 795 + 796 +Feature: Clear flash storage for data log feature. 797 + 798 +(% style="color:blue" %)**AT Command: AT+CLRDTA** 799 + 713 713 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:500px" %) 714 -|(% style="background-color:# d9e2f3;c0; width:193px" %)**DownlinkControlType**|(% style="background-color:#d9e2f3;c0; width:57px" %)**FPort**|(% style="background-color:#d9e2f3; color:#0070c0;width:91px" %)**Type Code**|(% style="background-color:#d9e2f3;c0; width:159px" %)**Downlinkpayloadsize(bytes)**715 -|(% style="width:1 93px" %)Get Firmware Version Info|(% style="width:57px" %)Any|(%style="width:91px"%)26|(%style="width:149px"%)2801 +|=(% style="width: 157px;background-color:#D9E2F3;color:#0070C0" %)**Command Example**|=(% style="width: 169px;background-color:#D9E2F3;color:#0070C0" %)**Function**|=(% style="width: 174px;background-color:#D9E2F3;color:#0070C0" %)**Response** 802 +|(% style="width:157px" %)AT+CLRDTA|(% style="width:169px" %)Clear flash storage for data log feature.|Clear all stored sensor data… OK 716 716 717 -* Reply to the confirmation package: 26 01 718 -* Reply to non-confirmed packet: 26 00 804 +((( 805 +(% style="color:blue" %)**Downlink Command:** 806 +))) 719 719 720 -Device will send an uplink after got this downlink command. With below payload: 808 +((( 809 +* **Example**: 0xA301 ~/~/ Same as AT+CLRDTA 810 +))) 721 721 722 -Configures info payload: 723 723 724 -(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:520px" %) 725 -|(% style="background-color:#d9e2f3; color:#0070c0; width:50px" %)**Size(bytes)**|(% style="background-color:#d9e2f3; color:#0070c0; width:70px" %)**1**|(% style="background-color:#d9e2f3; color:#0070c0; width:70px" %)**1**|(% style="background-color:#d9e2f3; color:#0070c0; width:50px" %)**1**|(% style="background-color:#d9e2f3; color:#0070c0; width:70px" %)**1**|(% style="background-color:#d9e2f3; color:#0070c0; width:60px" %)**1**|(% style="background-color:#d9e2f3; color:#0070c0; width:50px" %)**5**|(% style="background-color:#d9e2f3; color:#0070c0; width:100px" %)**1** 726 -|Value|Software Type|((( 727 -Frequency 728 -Band 729 -)))|Sub-band|((( 730 -Firmware 731 -Version 732 -)))|Sensor Type|Reserve|((( 733 -[[Message Type>>||anchor="H2.3.6MessageType"]] 734 -Always 0x02 813 + 814 +=== 3.3.7 Set trigger mode === 815 + 816 + 817 +Feature: Set the trigger interrupt mode. 818 + 819 +(% style="color:blue" %)**AT Command: AT+TTRMOD** 820 + 821 +(% border="1" cellspacing="5" style="background-color:#f2f2f2; width:495px" %) 822 +|=(% style="width: 157px;background-color:#D9E2F3;color:#0070C0" %)**Command Example**|=(% style="width: 246px;background-color:#D9E2F3;color:#0070C0" %)**Function**|=(% style="width: 92px;background-color:#D9E2F3;color:#0070C0" %)**Response** 823 +|(% style="width:157px" %)((( 824 +AT+TTRMOD=1 825 +)))|(% style="width:156px" %)Count and trigger from open to close (rising edge)|(% style="width:89px" %)((( 826 +((( 827 +OK 735 735 ))) 829 +))) 830 +|(% style="width:157px" %)((( 831 +AT+TTRMOD=0 832 +)))|(% style="width:156px" %)Count and trigger from close to open (falling edge)|(% style="width:89px" %)((( 833 +OK 834 +))) 736 736 737 -(% style="color: #037691" %)**Software Type**(%%): Always0x03 for LSPH01836 +(% style="color:blue" %)**Downlink Command:** 738 738 739 - (%style="color:#037691"%)**FrequencyBand**:838 +* **Example**: 0xA401 ~/~/ Same as AT+ TTRMOD =1 740 740 741 - *0x01:EU868840 +=== 3.3.8 Set the calculate flag === 742 742 743 -*0x02: US915 744 744 745 - *0x03:IN865843 +Feature: Set the calculate flag 746 746 747 -* 0x04: AU915845 +(% style="color:blue" %)**AT Command: AT+CALCFLAG** 748 748 749 -*0x05: KZ865 847 +(% border="1" cellspacing="5" style="background-color:#f2f2f2; width:461px" %) 848 +|=(% style="width: 158px;background-color:#D9E2F3;color:#0070C0" %)**Command Example**|=(% style="width: 193px;background-color:#D9E2F3;color:#0070C0" %)**Function**|=(% style="width: 110px;background-color:#D9E2F3;color:#0070C0" %)**Response** 849 +|(% style="width:158px" %)AT+CALCFLAG =1|(% style="width:192px" %)Set the calculate flag to 1.|(% style="width:109px" %)OK 850 +|(% style="width:158px" %)AT+CALCFLAG =2|(% style="width:192px" %)Set the calculate flag to 2.|(% style="width:109px" %)OK 750 750 751 - *0x06:RU864852 +(% style="color:blue" %)**Downlink Command:** 752 752 753 -* 0x07: AS923854 +* **Example**: 0XA501 ~/~/ Same as AT+CALCFLAG =1 754 754 755 - *0x08:AS923-1856 +=== 3.3.9 Set count number === 756 756 757 -*0x09: AS923-2 758 758 759 - *0xa0:AS923-3859 +Feature: Manually set the count number 760 760 861 +(% style="color:blue" %)**AT Command: AT+SETCNT** 761 761 762 -(% style="color:#037691" %)**Sub-Band**(%%): value 0x00 ~~ 0x08 863 +(% border="1" cellspacing="5" style="background-color:#f2f2f2; width:479px" %) 864 +|=(% style="width: 160px;background-color:#D9E2F3;color:#0070C0" %)**Command Example**|=(% style="width: 223px;background-color:#D9E2F3;color:#0070C0" %)**Function**|=(% style="width: 96px;background-color:#D9E2F3;color:#0070C0" %)**Response** 865 +|(% style="width:160px" %)AT+ SETCNT =0|(% style="width:221px" %)Set the count number to 0.|(% style="width:95px" %)OK 866 +|(% style="width:160px" %)AT+ SETCNT =100|(% style="width:221px" %)Set the count number to 100.|(% style="width:95px" %)OK 763 763 764 -(% style="color: #037691" %)**Firmware Version**(%%):0x0100, Means:v1.0.0 version868 +(% style="color:blue" %)**Downlink Command:** 765 765 766 - (%style="color:#037691"%)**SensorType**:870 +* **Example**: 0xA6000001 ~/~/ Same as AT+ SETCNT =1 767 767 768 -0x0 1:LSE01872 +* **Example**: 0xA6000064 ~/~/ Same as AT+ SETCNT =100 769 769 770 -0 x02:LDDS75874 +=== 3.3.10 Set Interrupt Mode === 771 771 772 -0x03: LDDS20 773 773 774 - 0x04:LLMS01877 +Feature, Set Interrupt mode for PA8 of pin. 775 775 776 -0 x05:LSPH01879 +When AT+INTMOD=0 is set, PA8 is used as a digital input port. 777 777 778 - 0x06:LSNPK01881 +(% style="color:blue" %)**AT Command: AT+INTMOD** 779 779 780 -0x07: LDDS12 883 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %) 884 +|=(% style="width: 155px;background-color:#D9E2F3;color:#0070C0" %)**Command Example**|=(% style="width: 197px;background-color:#D9E2F3;color:#0070C0" %)**Function**|=(% style="width: 158px;background-color:#D9E2F3;color:#0070C0" %)**Response** 885 +|(% style="width:154px" %)AT+INTMOD=?|(% style="width:196px" %)Show current interrupt mode|(% style="width:157px" %)((( 886 +0 887 +OK 888 +the mode is 0 =Disable Interrupt 889 +))) 890 +|(% style="width:154px" %)AT+INTMOD=2|(% style="width:196px" %)((( 891 +Set Transmit Interval 892 +0. (Disable Interrupt), 893 +~1. (Trigger by rising and falling edge) 894 +2. (Trigger by falling edge) 895 +3. (Trigger by rising edge) 896 +)))|(% style="width:157px" %)OK 781 781 898 +(% style="color:blue" %)**Downlink Command: 0x06** 782 782 900 +Format: Command Code (0x06) followed by 3 bytes. 783 783 902 +This means that the interrupt mode of the end node is set to 0x000003=3 (rising edge trigger), and the type code is 06. 903 + 904 +* Example 1: Downlink Payload: 06000000 ~/~/ Turn off interrupt mode 905 + 906 +* Example 2: Downlink Payload: 06000003 ~/~/ Set the interrupt mode to rising edge trigger 907 + 908 +=== 3.3.11 Set Power Output Duration === 909 + 910 + 911 +Control the output duration 5V . Before each sampling, device will 912 + 913 +~1. first enable the power output to external sensor, 914 + 915 +2. keep it on as per duration, read sensor value and construct uplink payload 916 + 917 +3. final, close the power output. 918 + 919 +(% style="color:blue" %)**AT Command: AT+5VT** 920 + 921 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %) 922 +|=(% style="width: 155px;background-color:#D9E2F3;color:#0070C0" %)**Command Example**|=(% style="width: 197px;background-color:#D9E2F3;color:#0070C0" %)**Function**|=(% style="width: 158px;background-color:#D9E2F3;color:#0070C0" %)**Response** 923 +|(% style="width:154px" %)AT+5VT=?|(% style="width:196px" %)Show 5V open time.|(% style="width:157px" %)0 (default) 924 +OK 925 +|(% style="width:154px" %)AT+5VT=500|(% style="width:196px" %)Close after a delay of 1000 milliseconds.|(% style="width:157px" %)OK 926 + 927 +(% style="color:blue" %)**Downlink Command: 0x07** 928 + 929 +Format: Command Code (0x07) followed by 2 bytes. 930 + 931 +The first and second bytes are the time to turn on. 932 + 933 +* Example 1: Downlink Payload: 070000 **~-~-->** AT+5VT=0 934 + 935 +* Example 2: Downlink Payload: 0701F4 **~-~-->** AT+5VT=500 936 + 784 784 = 4. Battery & Power Consumption = 785 785 786 786