Changes for page SDI-12-LB/LS -- SDI-12 to LoRaWAN Converter User Manual
Last modified by Mengting Qiu on 2025/07/03 15:42
From version 166.1
edited by Mengting Qiu
on 2025/06/05 09:19
on 2025/06/05 09:19
Change comment:
There is no comment for this version
To version 179.1
edited by Mengting Qiu
on 2025/07/03 15:41
on 2025/07/03 15:41
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 6 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,7 +1,6 @@ 1 1 2 2 3 -(% style="text-align:center" %) 4 -[[image:image-20240103165259-3.png||height="433" width="591"]] 3 +[[image:image-20240103165259-3.png||data-xwiki-image-style-alignment="center" height="433" width="591"]] 5 5 6 6 7 7 ... ... @@ -139,16 +139,16 @@ 139 139 140 140 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %) 141 141 |=(% style="width: 167px;background-color:#4F81BD;color:white" %)**Behavior on ACT**|=(% style="width: 117px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 226px;background-color:#4F81BD;color:white" %)**Action** 142 -| (% style="background-color:#f2f2f2; width:167px" %)PressingACT between1s < time <3s|(% style="background-color:#f2f2f2; width:117px" %)Send an uplink|(% style="background-color:#f2f2f2; width:225px" %)(((141 +|[[image:1749523850351-927.png]] 1~~3s|(% style="background-color:#f2f2f2; width:117px" %)Send an uplink|(% style="background-color:#f2f2f2; width:225px" %)((( 143 143 If sensor is already Joined to LoRaWAN network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once. 144 144 Meanwhile, BLE module will be active and user can connect via BLE to configure device. 145 145 ))) 146 -| (% style="background-color:#f2f2f2; width:167px" %)PressingACT for more than3s|(% style="background-color:#f2f2f2; width:117px" %)Active Device|(% style="background-color:#f2f2f2; width:225px" %)(((145 +|[[image:1749523852387-583.png]] >3s|(% style="background-color:#f2f2f2; width:117px" %)Active Device|(% style="background-color:#f2f2f2; width:225px" %)((( 147 147 (% style="background-color:#f2f2f2; color:green" %)**Green led**(%%) will fast blink 5 times, device will enter (% style="color:#037691" %)**OTA mode**(%%) for 3 seconds. And then start to JOIN LoRaWAN network. 148 148 (% style="background-color:#f2f2f2; color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network. 149 149 Once sensor is active, BLE module will be active and user can connect via BLE to configure device, no matter if device join or not join LoRaWAN network. 150 150 ))) 151 -| (% style="background-color:#f2f2f2; width:167px"%)Fast press ACT5times.|(% style="background-color:#f2f2f2; width:117px" %)Deactivate Device|(% style="background-color:#f2f2f2; width:225px" %)(% style="color:red" %)**Red led**(%%) will solid on for 5 seconds. Means SDI-12-LB/LS is in Deep Sleep Mode.150 +|[[image:1749523825515-716.png]] x5|(% style="background-color:#f2f2f2; width:117px" %)Deactivate Device|(% style="background-color:#f2f2f2; width:225px" %)(% style="color:red" %)**Red led**(%%) will solid on for 5 seconds. Means SDI-12-LB/LS is in Deep Sleep Mode. 152 152 153 153 == 1.7 Pin Mapping == 154 154 ... ... @@ -511,8 +511,10 @@ 511 511 512 512 (% style="color:red" %)**var2**(%%): Wait timeout for return. (unit: second) 513 513 514 -(% style="color:red" %)**var3**(%%): Whether to send //addrD0!// to get return after var2 timeout. 0: Don't Send //addrD0! //; 1: Send //addrD0!//. (% style="color:red" %)**2: Thereturneddatawill not be clipped.(since v1.3.0)**513 +(% style="color:red" %)**var3**(%%): Whether to send //addrD0!// to get return after var2 timeout. 0: Don't Send //addrD0! //; 1: Send //addrD0!//. (% style="color:red" %)**2: When set to 2, AT+ALDATAMOD=1 does not intercept data returned by the current COMMAND command.(since v1.3.0)** 515 515 515 +(% style="color:red" %)**(Function set to 2: When the device is connected to more than two sensors with different sampling addresses, concurrent measurement can be used to reduce data acquisition time and save battery power; for example, when a device is connected to two sensors with different addresses, and both sensors are to use concurrent measurements, then both sensors can be measured at the same time without the second one having to wait until after the first one.)** 516 + 516 516 (% style="color:red" %)**var4**(%%): validation check for return. If return invalid, SDI-12-LB/LS will resend this command. Max 3 retries. 517 517 518 518 (% style="color:red" %)**0 **(%%) No validation check; ... ... @@ -677,42 +677,86 @@ 677 677 678 678 (% style="color:red" %)**Notice: Among them, var1, var3, var5, var7, and var9 are the data to be selected for conversion, and var2, var4, var6, var8, and var10 are the number of bytes to be uploaded. The values of var2, var4, var6, var8, and var10 range from 1 to 4.** 679 679 681 +* (% style="color:blue" %)**Downlink Command:** 680 680 683 +Format: Command code (0xAC) followed by up to 20 bytes. 684 + 685 + 686 +Example 1 1:AT+DATACONVx=var1, var2 687 + 688 +Downlink Command:AC x var1 var2 689 + 690 +Example 1 2:AT+DATACONVx=var1, var2+ var3, var4 691 + 692 +Downlink Command:AC x var1 var2 var3 var4 693 + 694 +Example 1 3:AT+DATACONVx=var1, var2+ var3, var4+ var5, var6 695 + 696 +Downlink Command:AC x var1 var2 var3 var4 var5 var6 697 + 698 +Example 1 4:AT+DATACONVx=var1, var2+ var3, var4+ var5, var6+ var7, var8 699 + 700 +Downlink Command:AC x var1 var2 var3 var4 var5 var6 var7 var8 701 + 702 +Example 1 5:AT+DATACONVx=var1, var2+ var3, var4+ var5, var6+ var7, var8+ var9, var10 703 + 704 +Downlink Command:AC x var1 var2 var3 var4 var5 var6 var7 var8 var9 var10 705 + 706 + 707 +Example: 708 + 709 +* Example 1: Downlink Payload: AC 01 01 02 02 02 ~/~/ AT+DATACONV1=1,2+2,2 710 +* Example 2: Downlink Payload: AC 02 01 02 02 02 03 02 ~/~/ AT+DATACONV2=1,2+2,2+3,2 711 + 681 681 **For example:** 682 682 683 683 This is my configuration: 684 684 685 -[[image:image-2025060 5091006-1.png]]716 +[[image:image-20250609134137-1.png]] 686 686 687 687 688 -* AT+COMMAND1=0C!,0,2,0 After sending the concurrent command of device 0, the data will not be cut, and the next command will be sent immediately. 689 -* AT+COMMAND2=0M!,1,2,0 After sending the concurrent command of device 0, do not cut the data and wait for one second. (The last concurrent command needs to wait for the measurement time of all sensors) 690 -* AT+COMMAND3=0D0!,0,0,0 Query the data measured by device 0 719 +* AT+COMMAND1=0C!,0,2,0 Use concurrent measurement commands without intercepting the returned data. 720 +* AT+COMMAND2=1C!,1,2,0 Use concurrent measurement commands without intercepting the returned data, with a second parameter to be set at the last concurrent command (the second parameter takes the maximum transition time between the two sensors) 721 +* AT+COMMAND3=0D0!,0,0,0 Query the data measured by device 0 722 +* AT+COMMAND4=1D0!,0,0,0 Query the data measured by device 1 691 691 692 692 This is the data obtained: 693 693 694 -[[image:image-20250 516145402-2.png]]726 +[[image:image-20250609134901-2.png]] 695 695 696 696 697 697 When using the AT+DATACONVx command, 698 698 699 -The data of RETURN3 will be converted into 2 data, the first data is +9 5, and the second data is +260.731 +The data of RETURN3 will be converted into 2 data, the first data is +192, and the second data is +258. 700 700 733 +The data of RETURN4 will be converted into 3 data, the first data is +187716, and the second data is +252, and the third data is +1. 734 + 701 701 * AT+DATACONV3=1,2+2,2 The first data is uploaded as 2 bytes and the second data is uploaded as 2 bytes. The form converted to hexadecimal is as shown above,as below: 736 +* ((( 737 +AT+DATACONV4=1,3+2,2+3,2 The first data uploads 3 bytes, the second data also uploads 2 bytes, and the third data also uploads 2 bytes. The hexadecimal form is shown above and as shown in the following figure: 738 +))) 702 702 703 -[[image:image-20250516144559-1.png]] 704 704 705 -0C90 01 005F 0104 706 706 707 - (%style="color:#037691" %)**BAT**(%%): 0x0c90 = 3216mV = 3.216V742 +**For example,the uplink payload as below:** 708 708 744 +0CFC 01 00C0 0102 02DD44 00FC 0001 745 + 746 +(% style="color:#037691" %)**BAT**(%%): 0x0CFC = 3324mV = 3.324V 747 + 709 709 (% style="color:#037691" %)**Payload Version**(%%): 0x01, Means: v1.0 version 710 710 711 -(% style="color:#037691" %)**Data 1: **(%%)0x00 5F(H) = 95(D) / 100 =0.95750 +(% style="color:#037691" %)**Data 1: **(%%)0x00C0(H) = 192(D) / 100 = 19.2 712 712 713 -(% style="color:#037691" %)**Data 2: **(%%)0x010 4(H) = 260(D) / 10 = 26.0752 +(% style="color:#037691" %)**Data 2: **(%%)0x0102(H) = 258(D) / 10 = 25.8 714 714 754 +(% style="color:#037691" %)**Data 3: **(%%)0x02DD44(H) = 187716(D) / 100 = 1877.16 715 715 756 +(% style="color:#037691" %)**Data 4: **(%%)0x00FC(H) = 252(D) / 10 = 25.2 757 + 758 +(% style="color:#037691" %)**Data 5: **(%%)0x0001(H) = 1(D) = 1 759 + 760 + 716 716 == 2.4 Uplink Payload == 717 717 718 718 === 2.4.1 Device Payload, FPORT~=5 === ... ... @@ -1222,26 +1222,37 @@ 1222 1222 == 2.9 Datalog Feature(Since v1.3.0) == 1223 1223 1224 1224 1225 -((( 1226 -Datalog Feature is to ensure IoT Server can get all sampling data from Sensor even if the LoRaWAN network is down. For each sampling, SDI-12-LB will store the reading for future retrieving purposes. There are two ways for IoT servers to get datalog from SDI-12-LB. 1270 +Datalog Feature is to ensure IoT Server can get all sampling data from Sensor even if the LoRaWAN network is down. For each sampling, SDI-12-LB will store the reading for future retrieving purposes. 1271 + 1272 + 1273 +=== 2.5.1 How datalog works === 1274 + 1275 + 1276 +SDI-12-LB will wait for ACK for every uplink, when there is no LoRaWAN network,SDI-12-LB will mark these records with non-ack messages and store the sensor data, and it will send all messages (10s interval) after the network recovery. 1277 + 1278 +* ((( 1279 +a) SDI-12-LB will do an ACK check for data records sending to make sure every data arrive server. 1227 1227 ))) 1281 +* ((( 1282 +b) SDI-12-LB will send data in **CONFIRMED Mode**, but SDI-12-LB won't re-transmit the packet if it doesn't get ACK, it will just mark it as a NONE-ACK message. In a future uplink if SDI-12-LB gets a ACK, SDI-12-LB will consider there is a network connection and resend all NONE-ACK messages. 1228 1228 1284 + 1285 +))) 1229 1229 1230 -=== 2. 9.1Ways to getdatalogvia LoRaWAN===1287 +=== 2.5.2 Enable Datalog === 1231 1231 1232 1232 1233 - There are twomethods:1290 +User need to make sure below two settings are enable to use datalog; 1234 1234 1235 -(% style="color:blue" %)**Method 1:** (%%)IoT Server sends a downlink LoRaWAN command to [[poll the value>>||anchor="H2.8.4Pollsensorvalue"]] for specified time range. 1292 +* (% style="color:blue" %)**SYNCMOD=1(Default)**(%%) to enable sync time via LoRaWAN MAC command, click here ([[AT+SYNCMOD>>https://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/#H4.6Settimesynchronizationmethod28ThenetworkservermustsupportLoRaWANv1.0.329]]) for detailed instructions. 1293 +* (% style="color:blue" %)**PNACKMD=1**(%%)** **to enable datalog feature, click here ([[AT+PNACKMD>>https://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/#H7.26RequesttheservertosendanACK]]) for detailed instructions. 1236 1236 1237 1237 1238 -(% style="color:blue" %)**Method 2: **(%%)Set PNACKMD=1, SDI-12-LB will wait for ACK for every uplink, when there is no LoRaWAN network, SDI-12-LB will mark these records with non-ack messages and store the sensor data, and it will send all messages (10s interval) after the network recovery. 1239 1239 1297 +Once SDI-12-LB Joined LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to SDI-12-LB. If SDI-12-LB fails to get the time from the server, SDI-12-LB will use the internal time and wait for next time request (AT+SYNCTDC to set the time request period, default is 10 days). 1240 1240 1241 -(% style="color:red" %)**Note for method 2 :**1299 +(% style="color:red" %)**Note: LoRaWAN Server need to support LoRaWAN v1.0.3(MAC v1.0.3) or higher to support this MAC command feature, Chirpstack,TTN V3 v3 and loriot support but TTN V3 v2 doesn't support. If server doesn't support this command, it will through away uplink packet with this command, so user will lose the packet with time request for TTN V3 v2 if SYNCMOD=1.** 1242 1242 1243 -* a) SDI-12-LB will do an ACK check for data records sending to make sure every data arrive server. 1244 -* b) SDI-12-LB will send data in **CONFIRMED Mode** when PNACKMD=1, but SDI-12-LB won't re-transmit the packet if it doesn't get ACK, it will just mark it as a NONE-ACK message. In a future uplink if SDI-12-LB gets a ACK, SDI-12-LB will consider there is a network connection and resend all NONE-ACK Message. 1245 1245 1246 1246 === 2.9.2 Unix TimeStamp === 1247 1247 ... ... @@ -1260,39 +1260,6 @@ 1260 1260 So, we can use AT+TIMESTAMP=1742889625 or downlink 3067E26299 to set the current time 2025 – March ~-~- 25 Tuesday 08:00:25 1261 1261 1262 1262 1263 -=== 2.9.3 Set Device Time === 1264 - 1265 - 1266 -((( 1267 -(% style="color:blue" %)**There are two ways to set device's time:** 1268 -))) 1269 - 1270 -((( 1271 -**1. Through LoRaWAN MAC Command (Default settings)** 1272 -))) 1273 - 1274 -((( 1275 -User need to set SYNCMOD=1 to enable sync time via MAC command. 1276 -))) 1277 - 1278 -((( 1279 -Once SDI-12-LB Joined LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to SDI-12-LB. If SDI-12-LB fails to get the time from the server, SDI-12-LB will use the internal time and wait for next time request (AT+SYNCTDC to set the time request period, default is 10 days). 1280 -))) 1281 - 1282 -((( 1283 -(% style="color:red" %)**Note: LoRaWAN Server need to support LoRaWAN v1.0.3(MAC v1.0.3) or higher to support this MAC command feature, Chirpstack,TTN V3 v3 and loriot support but TTN V3 v2 doesn't support. If server doesn't support this command, it will through away uplink packet with this command, so user will lose the packet with time request for TTN V3 v2 if SYNCMOD=1.** 1284 -))) 1285 - 1286 - 1287 -((( 1288 -**2. Manually Set Time** 1289 -))) 1290 - 1291 -((( 1292 -User needs to set SYNCMOD=0 to manual time, otherwise, the user set time will be overwritten by the time set by the server. 1293 -))) 1294 - 1295 - 1296 1296 === 2.9.4 Poll sensor value === 1297 1297 1298 1298 ... ... @@ -1773,7 +1773,7 @@ 1773 1773 No downlink commands for feature 1774 1774 1775 1775 1776 -== =3.9 Clear Flash Record(Since v1.3.0) ===1799 +== 3.9 Clear Flash Record(Since v1.3.0) == 1777 1777 1778 1778 1779 1779 Feature: Clear flash storage for data log feature. ... ... @@ -1818,6 +1818,9 @@ 1818 1818 1819 1819 * Example: 0xA90D09 ~/~/ Same as AT+SDITIMING=13,9 1820 1820 1844 + 1845 + 1846 + 1821 1821 == 3.11 add Pulse_count, VDC_input, IDC_input(Since firmware V1.3.0) == 1822 1822 1823 1823 ... ... @@ -1913,6 +1913,45 @@ 1913 1913 1914 1914 1915 1915 1942 +== 3.12 Cut data separation processing(Since firmware V1.3.2) == 1943 + 1944 + 1945 +AT+NEWLINE command, which only takes effect when AT+DATAUP=1 or AT+DATAUP=1, timeout. 1946 + 1947 +When not set, each part of AT+DATAUP is sent according to the maximum number of bytes of DR. 1948 + 1949 +When setting, each part of AT+DATAUP is sent according to the value set by AT+NEWLINE. 1950 + 1951 + 1952 +* ((( 1953 +(% style="color:#037691" %)** AT Command:** 1954 +))) 1955 + 1956 +(% style="color:#4472c4" %)//**AT+NEWLINE=ALL**//(%%)// //The data cut out by each AT+COMMANDx command is sent separately as an uplink. 1957 + 1958 +(% style="color:#4472c4" %)//**AT+NEWLINE=ALL**//(%%)// equal: (% style="color:#4472c4" %)**AT+NEWLINE=1+2+3+4+5+6+7+8+9+10+11+12+13+14+15**// 1959 + 1960 + 1961 +(% style="color:#4472c4" %)//**AT+NEWLINE=a+b+c**//(%%)// //The data returned by all commands is divided into three parts, COMMAND(1~~a) is the first part, COMMAND(a+1~~b) is the second part,COMMAND(b+1~~c) is the third part. 1962 + 1963 + 1964 +(% style="color:#4472c4" %)//**AT+NEWLINE=NULL**//(%%)// //Turn off the functionality of this AT command. 1965 + 1966 + 1967 +* ((( 1968 +(% style="color:#037691" %)** Downlink Payload:** 1969 +))) 1970 + 1971 +//AT+NEWLINE=ALL ~-~--> (% style="color:#4472c4" %)**0xA5 01**// 1972 + 1973 +// AT+NEWLINE= NULL ~-~--> (% style="color:#4472c4" %)**0xA5 00**// 1974 + 1975 +//AT+NEWLINE= a+b+c ~-~--> (% style="color:#4472c4" %)**0xA5 number of bytes a b c**// 1976 + 1977 +//AT+NEWLINE= 1+5+15 ~-~--> (% style="color:#4472c4" %)**0xA5 03 01 05 0F**// 1978 + 1979 + 1980 + 1916 1916 = 4. Battery & Power Consumption = 1917 1917 1918 1918 ... ... @@ -1935,12 +1935,22 @@ 1935 1935 1936 1936 = 6. OTA firmware update = 1937 1937 2003 +User can change firmware TS01-LB/LS to: 1938 1938 1939 -Please see this link for how to do OTA firmware update. 2005 +* Change Frequency band/ region. 2006 +* Update with new features. 2007 +* Fix bugs. 1940 1940 1941 - [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/>>url:http://wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/]]2009 +Firmware and changelog can be downloaded from : [[**Firmware download link**>>https://www.dropbox.com/scl/fo/ztlw35a9xbkomu71u31im/AMbGiR5K1fLcUTLbp44o22Q/LoRaWAN%20End%20Node/SDI-12-LB/Firmware?rlkey=ojjcsw927eaow01dgooldq3nu&subfolder_nav_tracking=1&dl=0]] 1942 1942 2011 +Methods to Update Firmware: 1943 1943 2013 +* (Recommanded way) OTA firmware update via wireless : **[[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/>>url:http://wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/]]** 2014 + 2015 +* Update through UART TTL interface : **[[Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H1.LoRaSTv4baseHardware]]**. 2016 + 2017 + 2018 + 1944 1944 = 7. FAQ = 1945 1945 1946 1946 == 7.1 How to use AT Command via UART to access device? ==
- 1749523825515-716.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +1.4 KB - Content
- 1749523850351-927.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +1.9 KB - Content
- 1749523852387-583.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +1.9 KB - Content
- image-20250609134137-1.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.ting - Size
-
... ... @@ -1,0 +1,1 @@ 1 +48.0 KB - Content
- image-20250609134901-2.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.ting - Size
-
... ... @@ -1,0 +1,1 @@ 1 +16.6 KB - Content
- image-20250609141343-1.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.ting - Size
-
... ... @@ -1,0 +1,1 @@ 1 +76.1 KB - Content