Wiki source code of LMS01-LB/LS -- LoRaWAN Leaf Moisture Sensor User Manual
Last modified by Xiaoling on 2024/01/15 09:37
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | (% style="text-align:center" %) | ||
2 | [[image:image-20240105141518-2.png]] | ||
3 | |||
4 | |||
5 | |||
6 | |||
7 | |||
8 | |||
9 | |||
10 | |||
11 | **Table of Contents:** | ||
12 | |||
13 | {{toc/}} | ||
14 | |||
15 | |||
16 | |||
17 | |||
18 | |||
19 | = 1. Introduction = | ||
20 | |||
21 | == 1.1 What is LoRaWAN Leaf Moisture Sensor == | ||
22 | |||
23 | |||
24 | The Dragino LMS01-LB/LS is a (% style="color:blue" %)**LoRaWAN Leaf Moisture Sensor**(%%) for IoT of Agriculture. It is designed to measure the (% style="color:blue" %)**leaf moisture and temperature**(%%), so to send to the platform to analyze the leaf status such as : watering, moisturizing, dew, frozen. The probe is IP67 waterproof. | ||
25 | |||
26 | LMS01-LB/LS detects leaf's(% style="color:blue" %)** moisture and temperature **(%%)use FDR method, it senses the dielectric constant cause by liquid over the leaf surface, and cover the value to leaf moisture. The probe is design in a leaf shape to best simulate the real leaf characterizes. The probe has as density as 15 leaf vein lines per centimeter which make it can senses small drop and more accuracy. | ||
27 | |||
28 | The LoRa wireless technology used in LMS01-LB/LS allows device to send data and reach extremely long ranges at low data-rates. It provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption. | ||
29 | |||
30 | LMS01-LB/LS (% style="color:blue" %)**Supports BLE configure**(%%) and (% style="color:blue" %)**wireless OTA update**(%%) which make user easy to use. | ||
31 | |||
32 | LMS01-LB/LS is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%) or (% style="color:blue" %)**solar powered + li-on battery **(%%)it is designed for long term use up to 5 years. | ||
33 | |||
34 | Each LMS01-LB/LS is pre-load with a set of unique keys for LoRaWAN registrations, register these keys to local LoRaWAN server and it will auto connect after power on. | ||
35 | |||
36 | |||
37 | [[image:image-20230715090325-2.png||height="433" width="855"]] | ||
38 | |||
39 | |||
40 | == 1.2 Features == | ||
41 | |||
42 | |||
43 | * LoRaWAN 1.0.3 Class A | ||
44 | * Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865 | ||
45 | * Ultra-low power consumption | ||
46 | * Monitor Leaf moisture | ||
47 | * Monitor Leaf temperature | ||
48 | * Monitor Battery Level | ||
49 | * Support Bluetooth v5.1 and LoRaWAN remote configure | ||
50 | * Support wireless OTA update firmware | ||
51 | * AT Commands to change parameters | ||
52 | * Downlink to change configure | ||
53 | * IP66 Waterproof Enclosure | ||
54 | * IP67 rate for the Sensor Probe | ||
55 | * 8500mAh Li/SOCl2 Battery (LMS01-LB) | ||
56 | * Solar panel + 3000mAh Li-on battery (LMS01-LS) | ||
57 | |||
58 | == 1.3 Specification == | ||
59 | |||
60 | |||
61 | (% style="color:blue" %)**Common DC Characteristics:** | ||
62 | |||
63 | * Supply Voltage: Built-in Battery , 2.5v ~~ 3.6v | ||
64 | * Operating Temperature: -40 ~~ 85°C | ||
65 | |||
66 | (% style="color:blue" %)**Leaf Moisture: percentage of water drop over total leaf surface** | ||
67 | |||
68 | * Range: 0~~100% | ||
69 | * Resolution: 0.1% | ||
70 | * Accuracy: ±3%(0~~50%); ±6%(>50%) | ||
71 | * IP67 Protection | ||
72 | * Length: 3.5 meters | ||
73 | |||
74 | (% style="color:blue" %)**Leaf Temperature:** | ||
75 | |||
76 | * Range: -50 ~~ 80°C | ||
77 | * Resolution: 0.1°C | ||
78 | * Accuracy: <±0.5°C(-10°C ~~ 70°C),<±1.0°C (others) | ||
79 | * IP67 Protection | ||
80 | * Length: 3.5 meters | ||
81 | |||
82 | (% style="color:blue" %)**LoRa Spec:** | ||
83 | |||
84 | * Frequency Range, Band 1 (HF): 862 ~~ 1020 Mhz, Band 2 (LF): 410 ~~ 528 Mhz | ||
85 | * Max +22 dBm constant RF output vs. | ||
86 | * RX sensitivity: down to -139 dBm. | ||
87 | * Excellent blocking immunity | ||
88 | |||
89 | (% style="color:blue" %)**Battery:** | ||
90 | |||
91 | * Li/SOCI2 un-chargeable battery | ||
92 | * Capacity: 8500mAh | ||
93 | * Self-Discharge: <1% / Year @ 25°C | ||
94 | * Max continuously current: 130mA | ||
95 | * Max boost current: 2A, 1 second | ||
96 | |||
97 | (% style="color:blue" %)**Power Consumption** | ||
98 | |||
99 | * Sleep Mode: 5uA @ 3.3v | ||
100 | * LoRa Transmit Mode: 125mA @ 20dBm, 82mA @ 14dBm | ||
101 | |||
102 | == 1.4 Applications == | ||
103 | |||
104 | |||
105 | * Smart Agriculture | ||
106 | |||
107 | == 1.5 Sleep mode and working mode == | ||
108 | |||
109 | |||
110 | (% style="color:blue" %)**Deep Sleep Mode: **(%%)Sensor doesn't have any LoRaWAN activate. This mode is used for storage and shipping to save battery life. | ||
111 | |||
112 | (% style="color:blue" %)**Working Mode:** (%%)In this mode, Sensor will work as LoRaWAN Sensor to Join LoRaWAN network and send out sensor data to server. Between each sampling/tx/rx periodically, sensor will be in IDLE mode), in IDLE mode, sensor has the same power consumption as Deep Sleep mode. | ||
113 | |||
114 | |||
115 | == 1.6 Button & LEDs == | ||
116 | |||
117 | |||
118 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/RS485-LB_Waterproof_RS485UART_to_LoRaWAN_Converter/WebHome/image-20240103160425-4.png?rev=1.1||alt="image-20240103160425-4.png"]] | ||
119 | |||
120 | (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %) | ||
121 | |=(% style="width: 167px;background-color:#4F81BD;color:white" %)**Behavior on ACT**|=(% style="width: 117px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 225px;background-color:#4F81BD;color:white" %)**Action** | ||
122 | |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)((( | ||
123 | If sensor is already Joined to LoRaWAN network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once. | ||
124 | Meanwhile, BLE module will be active and user can connect via BLE to configure device. | ||
125 | ))) | ||
126 | |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)((( | ||
127 | (% style="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. | ||
128 | (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network. | ||
129 | 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. | ||
130 | ))) | ||
131 | |(% style="width:167px" %)Fast press ACT 5 times.|(% style="width:117px" %)Deactivate Device|(% style="width:225px" %)(% style="color:red" %)**Red led**(%%) will solid on for 5 seconds. Means device is in Deep Sleep Mode. | ||
132 | |||
133 | == 1.7 BLE connection == | ||
134 | |||
135 | |||
136 | LMS01-LB/LS support BLE remote configure. | ||
137 | |||
138 | |||
139 | BLE can be used to configure the parameter of sensor or see the console output from sensor. BLE will be only activate on below case: | ||
140 | |||
141 | * Press button to send an uplink | ||
142 | * Press button to active device. | ||
143 | * Device Power on or reset. | ||
144 | |||
145 | If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode. | ||
146 | |||
147 | |||
148 | == 1.8 Pin Definitions == | ||
149 | |||
150 | |||
151 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/TS01-LB_LoRaWAN_Titling_Sensor_User_Manual/WebHome/image-20230619114112-4.png?rev=1.1||alt="image-20230619114112-4.png"]] | ||
152 | |||
153 | |||
154 | == 1.9 Mechanical == | ||
155 | |||
156 | === 1.9.1 for LB version === | ||
157 | |||
158 | (% style="color:blue" %)**Main Device Dimension:** | ||
159 | |||
160 | [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143884058-338.png]] | ||
161 | |||
162 | |||
163 | [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143899218-599.png]] | ||
164 | |||
165 | |||
166 | [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143909447-639.png]] | ||
167 | |||
168 | |||
169 | === 1.9.2 for LS version === | ||
170 | |||
171 | |||
172 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SN50v3-LB/WebHome/image-20231231203439-3.png?width=886&height=385&rev=1.1||alt="image-20231231203439-3.png"]] | ||
173 | |||
174 | |||
175 | = 2. Configure LMS01-LB/LS to connect to LoRaWAN network = | ||
176 | |||
177 | == 2.1 How it works == | ||
178 | |||
179 | |||
180 | The LMS01-LB/LS is configured as (% style="color:#037691" %)**LoRaWAN OTAA Class A**(%%) mode by default. It has OTAA keys to join LoRaWAN network. To connect a local LoRaWAN network, you need to input the OTAA keys in the LoRaWAN IoT server and press the button to activate the LMS01-LB/LS. It will automatically join the network via OTAA and start to send the sensor value. The default uplink interval is 20 minutes. | ||
181 | |||
182 | (% style="display:none" %) (%%) | ||
183 | |||
184 | == 2.2 Quick guide to connect to LoRaWAN server (OTAA) == | ||
185 | |||
186 | |||
187 | Following is an example for how to join the [[TTN v3 LoRaWAN Network>>url:https://console.cloud.thethings.network/]]. Below is the network structure; we use the [[LPS8v2>>url:https://www.dragino.com/products/lora-lorawan-gateway/item/228-lps8v2.html]] as a LoRaWAN gateway in this example. | ||
188 | |||
189 | [[image:image-20230715090359-3.png||height="433" width="855"]] | ||
190 | |||
191 | The LPS8v2 is already set to connected to [[TTN network >>url:https://console.cloud.thethings.network/]], so what we need to now is configure the TTN server. | ||
192 | |||
193 | (% style="display:none" %) | ||
194 | |||
195 | |||
196 | (% style="color:blue" %)**Step 1:**(%%) Create a device in TTN with the OTAA keys from LMS01-LB/LS. | ||
197 | |||
198 | Each LMS01-LB/LS is shipped with a sticker with the default device EUI as below: | ||
199 | |||
200 | [[image:image-20230426084152-1.png||alt="图片-20230426084152-1.png" height="233" width="502"]] | ||
201 | |||
202 | |||
203 | You can enter this key in the LoRaWAN Server portal. Below is TTN screen shot: | ||
204 | |||
205 | |||
206 | (% style="color:blue" %)**Register the device** | ||
207 | |||
208 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/1654935135620-998.png?rev=1.1||alt="1654935135620-998.png"]] | ||
209 | |||
210 | |||
211 | (% style="color:blue" %)**Add APP EUI and DEV EUI** | ||
212 | |||
213 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/image-20220611161308-4.png?width=753&height=551&rev=1.1||alt="图片-20220611161308-4.png"]] | ||
214 | |||
215 | |||
216 | (% style="color:blue" %)**Add APP EUI in the application** | ||
217 | |||
218 | |||
219 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/image-20220611161308-5.png?width=742&height=601&rev=1.1||alt="图片-20220611161308-5.png"]] | ||
220 | |||
221 | |||
222 | (% style="color:blue" %)**Add APP KEY** | ||
223 | |||
224 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/image-20220611161308-6.png?width=744&height=485&rev=1.1||alt="图片-20220611161308-6.png"]] | ||
225 | |||
226 | |||
227 | (% style="color:blue" %)**Step 2:**(%%) Activate on LMS01-LB/LS | ||
228 | |||
229 | |||
230 | Press the button for 5 seconds to activate the LMS01-LB/LS. | ||
231 | |||
232 | (% style="color:green" %)**Green led**(%%) will fast blink 5 times, device will enter (% style="color:blue" %)**OTA mode**(%%) for 3 seconds. And then start to JOIN LoRaWAN network. (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network. | ||
233 | |||
234 | After join success, it will start to upload messages to TTN and you can see the messages in the panel. | ||
235 | |||
236 | |||
237 | == 2.3 Uplink Payload == | ||
238 | |||
239 | |||
240 | ((( | ||
241 | LMS01-LB/LS will uplink payload via LoRaWAN with below payload format: | ||
242 | ))) | ||
243 | |||
244 | ((( | ||
245 | Uplink payload includes in total 11 bytes. | ||
246 | ))) | ||
247 | |||
248 | ((( | ||
249 | Normal uplink payload: | ||
250 | ))) | ||
251 | |||
252 | (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:510px" %) | ||
253 | |=(% style="width: 62.5px;background-color:#4F81BD;color:white" %)((( | ||
254 | **Size(bytes)** | ||
255 | )))|=(% style="width: 62.5px;background-color:#4F81BD;color:white" %)2|=(% style="width: 62.5px;background-color:#4F81BD;color:white" %)**2**|=(% style="background-color:#4F81BD;color:white" %)**2**|=(% style="background-color:#4F81BD;color:white" %)**2**|=(% style="background-color:#4F81BD;color:white" %)**1**|=(% style="background-color:#4F81BD;color:white" %)**1**|=(% style="background-color:#4F81BD;color:white" %)**1** | ||
256 | |(% style="width:62.5px" %)Value|(% style="width:62.5px" %)[[BAT>>||anchor="H2.3.1BatteryInfo"]]|(% style="width:62.5px" %)((( | ||
257 | [[Temperature (Optional)>>||anchor="H2.3.2DS18B20Temperaturesensor"]] | ||
258 | )))|[[ Leaf Moisture>>||anchor="H2.3.3LeafMoisture"]] |[[Leaf Temperature>>||anchor="H2.3.4LeafTemperature"]]|((( | ||
259 | [[Digital Interrupt (Optional)>>||anchor="H2.3.5InterruptPin"]] | ||
260 | )))|Reserve|((( | ||
261 | [[Message Type>>||anchor="H2.3.6MessageType"]] | ||
262 | ))) | ||
263 | |||
264 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LLMS01-LoRaWAN%20Leaf%20Moisture%20Sensor%20User%20Manual/WebHome/1654649531303-864.png?rev=1.1||alt="1654649531303-864.png"]] | ||
265 | |||
266 | |||
267 | === 2.3.1 Battery Info === | ||
268 | |||
269 | |||
270 | Check the battery voltage for LMS01-LB/LS. | ||
271 | |||
272 | Ex1: 0x0B45 = 2885mV | ||
273 | |||
274 | Ex2: 0x0B49 = 2889mV | ||
275 | |||
276 | |||
277 | === 2.3.2 DS18B20 Temperature sensor === | ||
278 | |||
279 | |||
280 | This is optional, user can connect external DS18B20 sensor to the +3.3v, one-wire and GND pin . and this field will report temperature. | ||
281 | |||
282 | |||
283 | **Example**: | ||
284 | |||
285 | If payload is: 0105H: (0105 & FC00 == 0), temp = 0105H /10 = 26.1 degree | ||
286 | |||
287 | If payload is: FF3FH : (FF3F & FC00 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees. | ||
288 | |||
289 | |||
290 | === 2.3.3 Leaf Moisture === | ||
291 | |||
292 | |||
293 | Range: 0 ~~ 100% | ||
294 | |||
295 | **Example:** | ||
296 | |||
297 | (% style="color:#037691" %)**0x0015(H) = 21(D) /10= 2.1%** | ||
298 | |||
299 | |||
300 | === 2.3.4 Leaf Temperature === | ||
301 | |||
302 | |||
303 | Get Leaf Temperature | ||
304 | |||
305 | |||
306 | **Example**: | ||
307 | |||
308 | If payload is: **0105H**: (0105 & FC00 == 0), temp = 0105H /10 = 26.1 degree | ||
309 | |||
310 | If payload is: **FF3FH** : (FF3F & FC00 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees. | ||
311 | |||
312 | |||
313 | === 2.3.5 Interrupt Pin === | ||
314 | |||
315 | |||
316 | 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. | ||
317 | |||
318 | |||
319 | **Example:** | ||
320 | |||
321 | 0x00: Normal uplink packet. | ||
322 | |||
323 | 0x01: Interrupt Uplink Packet. | ||
324 | |||
325 | |||
326 | === 2.3.6 Message Type === | ||
327 | |||
328 | |||
329 | ((( | ||
330 | For a normal uplink payload, the message type is always 0x01. | ||
331 | ))) | ||
332 | |||
333 | ((( | ||
334 | Valid Message Type: | ||
335 | ))) | ||
336 | |||
337 | |||
338 | (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:496px" %) | ||
339 | |=(% style="width: 162px;background-color:#4F81BD;color:white" %)**Message Type Code**|=(% style="width: 162px;background-color:#4F81BD;color:white" %)**Description**|=(% style="width: 172px;background-color:#4F81BD;color:white" %)**Payload** | ||
340 | |(% style="width:160px" %)0x01|(% style="width:161px" %)Normal Uplink|(% style="width:170px" %)[[Normal Uplink Payload>>||anchor="H2.3200BUplinkPayload"]] | ||
341 | |(% style="width:160px" %)0x02|(% style="width:161px" %)Reply configures info|(% style="width:170px" %)[[Configure Info Payload>>||anchor="H3.3.3GetFirmwareVersionInfo"]] | ||
342 | |||
343 | === 2.3.7 Decode payload in The Things Network === | ||
344 | |||
345 | |||
346 | While using TTN network, you can add the payload format to decode the payload. | ||
347 | |||
348 | |||
349 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LLMS01-LoRaWAN%20Leaf%20Moisture%20Sensor%20User%20Manual/WebHome/1654592762713-715.png?rev=1.1||alt="1654592762713-715.png"]] | ||
350 | |||
351 | ((( | ||
352 | ((( | ||
353 | The payload decoder function for TTN is here: | ||
354 | ))) | ||
355 | |||
356 | ((( | ||
357 | LMS01-LB/LS TTN Payload Decoder: [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>https://github.com/dragino/dragino-end-node-decoder]] | ||
358 | ))) | ||
359 | ))) | ||
360 | |||
361 | |||
362 | == 2.4 Uplink Interval == | ||
363 | |||
364 | |||
365 | The LMS01-LB/LS by default uplink the sensor data every 20 minutes. User can change this interval by AT Command or LoRaWAN Downlink Command. See this link: [[Change Uplink Interval>>doc:Main.End Device AT Commands and Downlink Command.WebHome||anchor="H4.1ChangeUplinkInterval"]] | ||
366 | |||
367 | |||
368 | == 2.5 Show Data in DataCake IoT Server == | ||
369 | |||
370 | |||
371 | ((( | ||
372 | [[DATACAKE>>url:https://datacake.co/]] provides a human friendly interface to show the sensor data, once we have data in TTN, we can use [[DATACAKE>>url:https://datacake.co/]] to connect to TTN and see the data in DATACAKE. Below are the steps: | ||
373 | ))) | ||
374 | |||
375 | ((( | ||
376 | |||
377 | ))) | ||
378 | |||
379 | ((( | ||
380 | (% style="color:blue" %)**Step 1**(%%)**: Be sure that your device is programmed and properly connected to the network at this time.** | ||
381 | ))) | ||
382 | |||
383 | ((( | ||
384 | (% style="color:blue" %)**Step 2**(%%)**: To configure the Application to forward data to DATACAKE you will need to add integration. To add the DATACAKE integration, perform the following steps:** | ||
385 | ))) | ||
386 | |||
387 | |||
388 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LLMS01-LoRaWAN%20Leaf%20Moisture%20Sensor%20User%20Manual/WebHome/1654592790040-760.png?rev=1.1||alt="1654592790040-760.png"]] | ||
389 | |||
390 | |||
391 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LLMS01-LoRaWAN%20Leaf%20Moisture%20Sensor%20User%20Manual/WebHome/1654592800389-571.png?rev=1.1||alt="1654592800389-571.png"]] | ||
392 | |||
393 | |||
394 | (% style="color:blue" %)**Step 3**(%%)**: Create an account or log in Datacake.** | ||
395 | |||
396 | (% style="color:blue" %)**Step 4**(%%)**: Create LMS01-LB/LS product.** | ||
397 | |||
398 | |||
399 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LLMS01-LoRaWAN%20Leaf%20Moisture%20Sensor%20User%20Manual/WebHome/1654592819047-535.png?rev=1.1||alt="1654592819047-535.png"]] | ||
400 | |||
401 | |||
402 | |||
403 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LLMS01-LoRaWAN%20Leaf%20Moisture%20Sensor%20User%20Manual/WebHome/1654592833877-762.png?rev=1.1||alt="1654592833877-762.png"]] | ||
404 | |||
405 | |||
406 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LLMS01-LoRaWAN%20Leaf%20Moisture%20Sensor%20User%20Manual/WebHome/1654592856403-259.png?rev=1.1||alt="1654592856403-259.png"]] | ||
407 | |||
408 | |||
409 | ((( | ||
410 | (% style="color:blue" %)**Step 5**(%%)**: add payload decode** | ||
411 | ))) | ||
412 | |||
413 | ((( | ||
414 | Download Datacake decoder from: [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>url:https://github.com/dragino/dragino-end-node-decoder]] | ||
415 | |||
416 | |||
417 | ))) | ||
418 | |||
419 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LLMS01-LoRaWAN%20Leaf%20Moisture%20Sensor%20User%20Manual/WebHome/image-20220608091736-1.png?rev=1.1||alt="image-20220608091736-1.png"]] | ||
420 | |||
421 | |||
422 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LLMS01-LoRaWAN%20Leaf%20Moisture%20Sensor%20User%20Manual/WebHome/image-20220608091810-2.png?width=1266&height=591&rev=1.1||alt="image-20220608091810-2.png"]] | ||
423 | |||
424 | |||
425 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LLMS01-LoRaWAN%20Leaf%20Moisture%20Sensor%20User%20Manual/WebHome/1654651109108-101.png?rev=1.1||alt="1654651109108-101.png"]] | ||
426 | |||
427 | |||
428 | After added, the sensor data arrive TTN, it will also arrive and show in Mydevices. | ||
429 | |||
430 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LLMS01-LoRaWAN%20Leaf%20Moisture%20Sensor%20User%20Manual/WebHome/1654651120712-832.png?rev=1.1||alt="1654651120712-832.png"]] | ||
431 | |||
432 | |||
433 | == 2.6 Datalog Feature == | ||
434 | |||
435 | |||
436 | Datalog Feature is to ensure IoT Server can get all sampling data from Sensor even if the LoRaWAN network is down. For each sampling, LMS01-LB/LS will store the reading for future retrieving purposes. | ||
437 | |||
438 | |||
439 | === 2.6.1 Ways to get datalog via LoRaWAN === | ||
440 | |||
441 | |||
442 | Set **PNACKMD=1**, LMS01-LB/LS will wait for ACK for every uplink, when there is no LoRaWAN network, LMS01-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. | ||
443 | |||
444 | * ((( | ||
445 | a) LMS01-LB/LS will do an ACK check for data records sending to make sure every data arrive server. | ||
446 | ))) | ||
447 | * ((( | ||
448 | b) LMS01-LB/LS will send data in **CONFIRMED Mode** when PNACKMD=1, but LMS01-LB/LS 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 LMS01-LB/LS gets a ACK, LMS01-LB/LS will consider there is a network connection and resend all NONE-ACK messages. | ||
449 | ))) | ||
450 | |||
451 | |||
452 | === 2.6.2 Unix TimeStamp === | ||
453 | |||
454 | |||
455 | LMS01-LB/LS uses Unix TimeStamp format based on | ||
456 | |||
457 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LHT65N%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20Manual/WebHome/image-20220523001219-11.png?width=627&height=97&rev=1.1||alt="图片-20220523001219-11.png" height="97" width="627"]] | ||
458 | |||
459 | User can get this time from link: [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] : | ||
460 | |||
461 | Below is the converter example | ||
462 | |||
463 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LHT65N%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20Manual/WebHome/image-20220523001219-12.png?width=720&height=298&rev=1.1||alt="图片-20220523001219-12.png" height="298" width="720"]] | ||
464 | |||
465 | |||
466 | So, we can use AT+TIMESTAMP=1611889405 or downlink 3060137afd00 to set the current time 2021 – Jan ~-~- 29 Friday 03:03:25 | ||
467 | |||
468 | |||
469 | === 2.6.3 Set Device Time === | ||
470 | |||
471 | |||
472 | User need to set (% style="color:blue" %)**SYNCMOD=1**(%%) to enable sync time via MAC command. | ||
473 | |||
474 | Once LMS01-LB/LS Joined LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to LMS01-LB/LS. If LMS01-LB/LS fails to get the time from the server, LMS01-LB/LS will use the internal time and wait for next time request (AT+SYNCTDC to set the time request period, default is 10 days). | ||
475 | |||
476 | (% 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.** | ||
477 | |||
478 | |||
479 | === 2.6.4 Poll sensor value === | ||
480 | |||
481 | |||
482 | Users can poll sensor values based on timestamps. Below is the downlink command. | ||
483 | |||
484 | (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:425.818px" %) | ||
485 | |(% colspan="4" style="background-color:#4f81bd; color:white; width:423px" %)**Downlink Command to poll Open/Close status (0x31)** | ||
486 | |(% style="width:58px" %)**1byte**|(% style="width:127px" %)**4bytes**|(% style="width:124px" %)**4bytes**|(% style="width:114px" %)**1byte** | ||
487 | |(% style="width:58px" %)31|(% style="width:127px" %)Timestamp start|(% style="width:124px" %)Timestamp end|(% style="width:114px" %)Uplink Interval | ||
488 | |||
489 | ((( | ||
490 | Timestamp start and Timestamp end-use Unix TimeStamp format as mentioned above. Devices will reply with all data logs during this period, using the uplink interval. | ||
491 | ))) | ||
492 | |||
493 | ((( | ||
494 | For example, downlink command [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CPL01%20LoRaWAN%20Outdoor%20PulseContact%20%20Sensor%20Manual/WebHome/image-20220518162852-1.png?rev=1.1||alt="image-20220518162852-1.png"]] | ||
495 | ))) | ||
496 | |||
497 | ((( | ||
498 | Is to check 2021/11/12 12:00:00 to 2021/11/12 15:00:00's data | ||
499 | ))) | ||
500 | |||
501 | ((( | ||
502 | Uplink Internal =5s,means LMS01-LB/LS will send one packet every 5s. range 5~~255s. | ||
503 | ))) | ||
504 | |||
505 | |||
506 | == 2.7 Frequency Plans == | ||
507 | |||
508 | |||
509 | The LMS01-LB/LS uses OTAA mode and below frequency plans by default. Each frequency band use different firmware, user update the firmware to the corresponding band for their country. | ||
510 | |||
511 | [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/]] | ||
512 | |||
513 | |||
514 | == 2.8 Installation == | ||
515 | |||
516 | |||
517 | LMS01-LB/LS probe has two sides. The side without words are the sense side. Please be ware when install the sensor. | ||
518 | |||
519 | [[image:image-20230715094850-4.png||height="466" width="839"]] | ||
520 | |||
521 | |||
522 | |||
523 | = 3. Configure LMS01-LB/LS = | ||
524 | |||
525 | == 3.1 Configure Methods == | ||
526 | |||
527 | |||
528 | LMS01-LB/LS supports below configure method: | ||
529 | |||
530 | * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]]. | ||
531 | |||
532 | * AT Command via UART Connection : See [[UART Connection>>http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H2.3UARTConnectionforSN50v3basemotherboard]]. | ||
533 | |||
534 | * LoRaWAN Downlink. Instruction for different platforms: See [[IoT LoRaWAN Server>>http://wiki.dragino.com/xwiki/bin/view/Main/]] section. | ||
535 | |||
536 | == 3.2 General Commands == | ||
537 | |||
538 | |||
539 | These commands are to configure: | ||
540 | |||
541 | * General system settings like: uplink interval. | ||
542 | |||
543 | * LoRaWAN protocol & radio related command. | ||
544 | |||
545 | They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki: | ||
546 | |||
547 | [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/]] | ||
548 | |||
549 | |||
550 | == 3.3 Commands special design for LMS01-LB/LS == | ||
551 | |||
552 | |||
553 | These commands only valid for LMS01-LB/LS, as below: | ||
554 | |||
555 | |||
556 | === 3.3.1 Set Transmit Interval Time === | ||
557 | |||
558 | |||
559 | ((( | ||
560 | Feature: Change LoRaWAN End Node Transmit Interval. | ||
561 | ))) | ||
562 | |||
563 | ((( | ||
564 | (% style="color:blue" %)**AT Command: AT+TDC** | ||
565 | ))) | ||
566 | |||
567 | (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %) | ||
568 | |=(% style="width: 156px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 137px;background-color:#4F81BD;color:white" %)**Function**|=(% style="background-color:#4F81BD;color:white" %)**Response** | ||
569 | |(% style="width:156px" %)AT+TDC=?|(% style="width:137px" %)Show current transmit Interval|((( | ||
570 | 30000 | ||
571 | OK | ||
572 | the interval is 30000ms = 30s | ||
573 | ))) | ||
574 | |(% style="width:156px" %)AT+TDC=60000|(% style="width:137px" %)Set Transmit Interval|((( | ||
575 | OK | ||
576 | Set transmit interval to 60000ms = 60 seconds | ||
577 | ))) | ||
578 | |||
579 | ((( | ||
580 | (% style="color:blue" %)**Downlink Command: 0x01** | ||
581 | ))) | ||
582 | |||
583 | ((( | ||
584 | Format: Command Code (0x01) followed by 3 bytes time value. | ||
585 | ))) | ||
586 | |||
587 | ((( | ||
588 | If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01. | ||
589 | ))) | ||
590 | |||
591 | * ((( | ||
592 | Example 1: Downlink Payload: 0100001E ~/~/ Set Transmit Interval (TDC) = 30 seconds | ||
593 | ))) | ||
594 | |||
595 | * ((( | ||
596 | Example 2: Downlink Payload: 0100003C ~/~/ Set Transmit Interval (TDC) = 60 seconds | ||
597 | |||
598 | |||
599 | |||
600 | ))) | ||
601 | |||
602 | === 3.3.2 Set Interrupt Mode === | ||
603 | |||
604 | |||
605 | Feature, Set Interrupt mode for GPIO_EXTI of pin. | ||
606 | |||
607 | When AT+INTMOD=0 is set, GPIO_EXTI is used as a digital input port. | ||
608 | |||
609 | (% style="color:blue" %)**AT Command: AT+INTMOD** | ||
610 | |||
611 | (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %) | ||
612 | |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 197px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 158px;background-color:#4F81BD;color:white" %)**Response** | ||
613 | |(% style="width:154px" %)AT+INTMOD=?|(% style="width:196px" %)Show current interrupt mode|(% style="width:157px" %)((( | ||
614 | 0 | ||
615 | OK | ||
616 | the mode is 0 =Disable Interrupt | ||
617 | ))) | ||
618 | |(% style="width:154px" %)AT+INTMOD=2|(% style="width:196px" %)((( | ||
619 | Set Transmit Interval | ||
620 | 0. (Disable Interrupt), | ||
621 | ~1. (Trigger by rising and falling edge) | ||
622 | 2. (Trigger by falling edge) | ||
623 | 3. (Trigger by rising edge) | ||
624 | )))|(% style="width:157px" %)OK | ||
625 | |||
626 | (% style="color:blue" %)**Downlink Command: 0x06** | ||
627 | |||
628 | Format: Command Code (0x06) followed by 3 bytes. | ||
629 | |||
630 | This means that the interrupt mode of the end node is set to 0x000003=3 (rising edge trigger), and the type code is 06. | ||
631 | |||
632 | * Example 1: Downlink Payload: 06000000 ~/~/ Turn off interrupt mode | ||
633 | |||
634 | * Example 2: Downlink Payload: 06000003 ~/~/ Set the interrupt mode to rising edge trigger | ||
635 | |||
636 | === 3.3.3 Get Firmware Version Info === | ||
637 | |||
638 | |||
639 | Feature: use downlink to get firmware version. | ||
640 | |||
641 | (% style="color:#037691" %)**Downlink Command: 0x26** | ||
642 | |||
643 | (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:500px" %) | ||
644 | |(% style="background-color:#4f81bd; color:white; width:193px" %)**Downlink Control Type**|(% style="background-color:#4f81bd; color:white; width:57px" %)**FPort**|(% style="background-color:#4f81bd; color:white; width:91px" %)**Type Code**|(% style="background-color:#4f81bd; color:white; width:159px" %)**Downlink payload size(bytes)** | ||
645 | |(% style="width:193px" %)Get Firmware Version Info|(% style="width:57px" %)Any|(% style="width:91px" %)26|(% style="width:149px" %)2 | ||
646 | |||
647 | * Reply to the confirmation package: 26 01 | ||
648 | * Reply to non-confirmed packet: 26 00 | ||
649 | |||
650 | Device will send an uplink after got this downlink command. With below payload: | ||
651 | |||
652 | Configures info payload: | ||
653 | |||
654 | (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:470px" %) | ||
655 | |(% style="background-color:#4f81bd; color:white; width:70px" %)**Size(bytes)**|(% style="background-color:#4f81bd; color:white; width:70px" %)**1**|(% style="background-color:#4f81bd; color:white; width:100px" %)**2**|(% style="background-color:#4f81bd; color:white; width:100px" %)**1**|(% style="background-color:#4f81bd; color:white; width:70px" %)**1**|(% style="background-color:#4f81bd; color:white; width:60px" %)**2** | ||
656 | |Value|Sensor Model|Firmware Version|Frequency Band|Sub-band|BAT | ||
657 | |||
658 | (% style="color:#037691" %)**Software Type**(%%): Always 0x2D for LMS01-LB/LS | ||
659 | |||
660 | (% style="color:#037691" %)**Firmware Version**(%%): 0x0100, Means: v1.0.0 version | ||
661 | |||
662 | (% style="color:#037691" %)**Frequency Band**: | ||
663 | |||
664 | 0x01: EU868 | ||
665 | |||
666 | 0x02: US915 | ||
667 | |||
668 | 0x03: IN865 | ||
669 | |||
670 | 0x04: AU915 | ||
671 | |||
672 | 0x05: KZ865 | ||
673 | |||
674 | 0x06: RU864 | ||
675 | |||
676 | 0x07: AS923 | ||
677 | |||
678 | 0x08: AS923-1 | ||
679 | |||
680 | 0x09: AS923-2 | ||
681 | |||
682 | 0x0a: AS923-3 | ||
683 | |||
684 | 0x0b: CN470 | ||
685 | |||
686 | 0x0c: EU433 | ||
687 | |||
688 | 0x0d: KR920 | ||
689 | |||
690 | 0x0e: MA869 | ||
691 | |||
692 | (% style="color:#037691" %)**Sub-Band**(%%): | ||
693 | |||
694 | * AU915 and US915: value 0x00 ~~ 0x08 | ||
695 | * CN470: value 0x0B ~~ 0x0C | ||
696 | * Other Bands: Always 0x00 | ||
697 | |||
698 | (% style="color:#037691" %)**Battery Info**: | ||
699 | |||
700 | Check the battery voltage. | ||
701 | |||
702 | Ex1: 0x0B45 = 2885mV | ||
703 | |||
704 | Ex2: 0x0B49 = 2889mV | ||
705 | |||
706 | |||
707 | = 4. Battery & Power Consumption = | ||
708 | |||
709 | |||
710 | LMS01-LB use ER26500 + SPC1520 battery pack and LMS01-LS use 3000mAh Recharable Battery with Solar Panel. See below link for detail information about the battery info and how to replace. | ||
711 | |||
712 | [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] . | ||
713 | |||
714 | |||
715 | = 5. OTA Firmware update = | ||
716 | |||
717 | |||
718 | (% class="wikigeneratedid" %) | ||
719 | User can change firmware LMS01-LB/LS to: | ||
720 | |||
721 | * Change Frequency band/ region. | ||
722 | |||
723 | * Update with new features. | ||
724 | |||
725 | * Fix bugs. | ||
726 | |||
727 | Firmware and changelog can be downloaded from : [[**Firmware download link**>>https://www.dropbox.com/sh/9ntqv4c79o98mmh/AADymEaHkXRojrJsz5Dl5sr8a?dl=0]] | ||
728 | |||
729 | Methods to Update Firmware: | ||
730 | |||
731 | * (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/]]** | ||
732 | |||
733 | * 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]]**. | ||
734 | |||
735 | = 6. FAQ = | ||
736 | |||
737 | == 6.1 AT Commands input doesn't work == | ||
738 | |||
739 | |||
740 | In the case if user can see the console output but can't type input to the device. Please check if you already include the (% style="color:green" %)**ENTER**(%%) while sending out the command. Some serial tool doesn't send (% style="color:green" %)**ENTER**(%%) while press the send key, user need to add ENTER in their string. | ||
741 | |||
742 | |||
743 | = 7. Order Info = | ||
744 | |||
745 | |||
746 | **Part Number: (% style="color:blue" %)LMS01-LB-XX(%%) or (% style="color:blue" %)LMS01-LS-XX(%%)** | ||
747 | |||
748 | (% style="color:red" %)**XX**(%%): The default frequency band | ||
749 | |||
750 | * (% style="color:red" %)**AS923**(%%): LoRaWAN AS923 band | ||
751 | |||
752 | * (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band | ||
753 | |||
754 | * (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band | ||
755 | |||
756 | * (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band | ||
757 | |||
758 | * (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band | ||
759 | |||
760 | * (% style="color:red" %)**US915**(%%): LoRaWAN US915 band | ||
761 | |||
762 | * (% style="color:red" %)**IN865**(%%): LoRaWAN IN865 band | ||
763 | |||
764 | * (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band | ||
765 | |||
766 | = 8. Packing Info = | ||
767 | |||
768 | |||
769 | (% style="color:#037691" %)**Package Includes**: | ||
770 | |||
771 | * LMS01-LB or LMS01-LS LoRaWAN Leaf Moisture Sensor | ||
772 | |||
773 | (% style="color:#037691" %)**Dimension and weight**: | ||
774 | |||
775 | * Device Size: cm | ||
776 | |||
777 | * Device Weight: g | ||
778 | |||
779 | * Package Size / pcs : cm | ||
780 | |||
781 | * Weight / pcs : g | ||
782 | |||
783 | = 9. Support = | ||
784 | |||
785 | |||
786 | * Support is provided Monday to Friday, from 09:00 to 18:00 GMT+8. Due to different timezones we cannot offer live support. However, your questions will be answered as soon as possible in the before-mentioned schedule. | ||
787 | |||
788 | * Provide as much information as possible regarding your enquiry (product models, accurately describe your problem and steps to replicate it etc) and send a mail to [[Support@dragino.cc>>mailto:Support@dragino.cc]]. |