Show last authors
1
2
3 (% style="text-align:center" %)
4 [[image:image-20240106151314-2.png]]
5
6
7
8
9
10
11
12
13 **Table of Contents :**
14
15 {{toc/}}
16
17
18
19
20
21
22 = 1. Introduction =
23
24 == 1.1 What is LoRaWAN Microwave Radar Distance Sensor ==
25
26
27 The Dragino MDS200-LB/LS is a (% style="color:blue" %)**LoRaWAN Microwave Radar distance sensor**(%%). It uses (% style="color:blue" %)**24Ghz Microwave**(%%) to detect the (% style="color:blue" %)**distance between sensor and different objects**(%%). Compare vs ultrasonic or Lidar measurement method, Microwave Radar is (% style="color:blue" %)**more reliable for condensation / dusty environment**(%%). It can sense correct distance even there is water or thick dust on top of the sensor.
28
29 The MDS200-LB/LS can be applied to scenarios such as horizontal distance measurement, parking management system, object proximity and presence detection, intelligent trash can management system, robot obstacle avoidance, automatic control, sewer, etc.
30
31 MDS200-LB/LS can measure two distances: the closest object and next object behind the closest one.
32
33 MDS200-LB/LS supports (% style="color:blue" %)**Alarm Feature**(%%), user can set the MDS200-LB/LS to uplink data in a short interval when the distance is out of configured range.
34
35 The LoRa wireless technology used in MDS200-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.
36
37 MDS200-LB/LS (% style="color:blue" %)**supports BLE configure**(%%) and (% style="color:blue" %)**wireless OTA update**(%%) which make user easy to use.
38
39 MDS200-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.
40
41 Each MDS200-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.
42
43 *Battery life depends on how often to send data, please see [[battery analyzer>>||anchor="H4.Battery26PowerConsumption"]].
44
45 [[image:image-20230614085723-2.png||height="457" width="800"]]
46
47
48 == 1.2 ​Features ==
49
50
51 * LoRaWAN 1.0.3 Class A
52 * Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865
53 * Ultra-low power consumption
54 * Microwave Radar for distance detection
55 * Short uplink interval for Distance Alarm
56 * Monitor Battery Level
57 * Support Bluetooth v5.1 and LoRaWAN remote configure
58 * Support wireless OTA update firmware
59 * AT Commands to change parameters
60 * Downlink to change configure
61 * 8500mAh Li/SOCl2 Battery (MDS200-LB)
62 * Solar panel + 3000mAh Li-on battery (MDS200-LS)
63
64 == 1.3 Specification ==
65
66
67 (% style="color:#037691" %)**Common DC Characteristics:**
68
69 * Supply Voltage: Built-in Battery , 2.5v ~~ 3.6v
70 * Operating Temperature: -40 ~~ 85°C
71
72 (% style="color:#037691" %)**Radar probe specification:**
73
74 * Measuring Method: FMCW
75 * Frequency: 24.000~~24.500 GHz
76 * Measurement output power: 6dBm
77 * Measure Range : 0.5 ~~ 20m
78 * Accuracy: ±0.1m
79 * Resolution: 0.01m
80 * Measurement Angle : 78 degrees horizontal and 23 degrees vertical
81
82 (% style="color:#037691" %)**LoRa Spec:**
83
84 * Frequency Range,  Band 1 (HF): 862 ~~ 1020 Mhz
85 * Max +22 dBm constant RF output vs.
86 * RX sensitivity: down to -139 dBm.
87 * Excellent blocking immunity
88
89 (% style="color:#037691" %)**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:#037691" %)**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 * Horizontal distance measurement
106 * Liquid level measurement
107 * Parking management system
108 * Object proximity and presence detection
109 * Intelligent trash can management system
110 * Robot obstacle avoidance
111 * Automatic control
112 * Sewer
113 * Bottom water level monitoring
114
115 == 1.5 Installation ==
116
117
118 Sensor measure direction and angle is as below. When install the sensor, please make sure the sensor direct to object.
119
120 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LMDS200%20-%20LoRaWAN%20Microwave%20Radar%20Distance%20%20Sensor%20User%20Manual/WebHome/image-20220615152454-3.png?rev=1.1||alt="image-20220615152454-3.png"]]
121
122 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LMDS200%20-%20LoRaWAN%20Microwave%20Radar%20Distance%20%20Sensor%20User%20Manual/WebHome/image-20220615152454-4.png?width=731&height=398&rev=1.1||alt="image-20220615152454-4.png" height="345" width="634"]]
123
124
125 == 1.6 Sleep mode and working mode ==
126
127
128 (% 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.
129
130 (% 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.
131
132
133 == 1.7 Button & LEDs ==
134
135
136 [[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"]]
137
138 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
139 |=(% 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**
140 |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
141 If sensor is already Joined to LoRaWAN network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
142 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
143 )))
144 |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
145 (% 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.
146 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
147 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.
148 )))
149 |(% 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.
150
151 == 1.8 BLE connection ==
152
153
154 MDS200-LB/LS support BLE remote configure.
155
156
157 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:
158
159 * Press button to send an uplink
160 * Press button to active device.
161 * Device Power on or reset.
162
163 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
164
165
166 == 1.9 Pin Definitions ==
167
168 [[image:image-20230523174230-1.png]]
169
170
171 == 1.10 Mechanical ==
172
173 === 1.10.1 for LB version ===
174
175
176 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/DDS75-LB_LoRaWAN_Distance_Detection_Sensor_User_Manual/WebHome/image-20240105152536-3.png?rev=1.1||alt="image-20240105152536-3.png"]]
177
178
179 === 1.10.2 for LS version ===
180
181
182 [[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"]]
183
184
185 = 2. Configure MDS200-LB/LS to connect to LoRaWAN network =
186
187 == 2.1 How it works ==
188
189
190 The MDS200-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 MDS200-LB/LS. It will automatically join the network via OTAA and start to send the sensor value. The default uplink interval is 20 minutes.
191
192 (% style="display:none" %) (%%)
193
194 == 2.2 ​Quick guide to connect to LoRaWAN server (OTAA) ==
195
196
197 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.
198
199 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.
200
201 [[image:image-20230614085746-3.png||height="457" width="800"]](% style="display:none" %)
202
203
204 (% style="color:blue" %)**Step 1:**(%%) Create a device in TTN with the OTAA keys from MDS200-LB/LS.
205
206 Each MDS200-LB/LS is shipped with a sticker with the default device EUI as below:
207
208 [[image:image-20230426084152-1.png||alt="图片-20230426084152-1.png" height="233" width="502"]]
209
210
211 You can enter this key in the LoRaWAN Server portal. Below is TTN screen shot:
212
213
214 (% style="color:blue" %)**Register the device**
215
216 [[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"]]
217
218
219 (% style="color:blue" %)**Add APP EUI and DEV EUI**
220
221 [[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"]]
222
223
224 (% style="color:blue" %)**Add APP EUI in the application**
225
226
227 [[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"]]
228
229
230 (% style="color:blue" %)**Add APP KEY**
231
232 [[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"]]
233
234
235 (% style="color:blue" %)**Step 2:**(%%) Activate on MDS200-LB/LS
236
237 Press the button for 5 seconds to activate the MDS200-LB/LS.
238
239 (% 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.
240
241 After join success, it will start to upload messages to TTN and you can see the messages in the panel.
242
243
244 == 2.3 ​Uplink Payload ==
245
246
247 Uplink payloads have two types:
248
249 * Distance Value: Use FPORT=2
250
251 * Other control commands: Use other FPORT fields.
252
253 The application server should parse the correct value based on FPORT settings.
254
255
256 === 2.3.1 Device Status, FPORT~=5 ===
257
258
259 (((
260 Include device configure status. Once MDS200-LB/LS Joined the network, it will uplink this message to the server.
261 )))
262
263 (((
264 Users can also use the downlink command (0x26 01) to ask MDS200-LB/LS to resend Device Status.
265 )))
266
267 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:490px" %)
268 |=(% colspan="7" style="background-color:#4F81BD;color:white" %)Device Status (FPORT=5)
269 |(% style="width:60px" %)**Size(bytes)**|(% style="width:80px" %)**1**|(% style="width:140px" %)**2**|(% style="width:140px" %)**1**|(% style="width:70px" %)**1**|(% style="width:70px" %)**2**
270 |(% style="width:94px" %)Value|(% style="width:68px" %)Sensor Model|(% style="width:80px" %)Firmware Version|(% style="width:86px" %)Frequency Band|(% style="width:61px" %)Sub-band|(% style="width:61px" %)BAT
271
272 [[image:MDS200-port5.png||height="205" width="1347"]]** **
273
274
275 * (% style="color:#037691" %)**Sensor Model**(%%)**:** For MDS200-LB/LS, this value is 0x2B
276
277 * (% style="color:#037691" %)**Firmware Version**(%%)**:** 0x0100, Means: v1.0.0 version
278
279 * (% style="color:#037691" %)**Frequency Band**(%%)**:**
280
281 0x01: EU868
282
283 0x02: US915
284
285 0x03: IN865
286
287 0x04: AU915
288
289 0x05: KZ865
290
291 0x06: RU864
292
293 0x07: AS923
294
295 0x08: AS923-1
296
297 0x09: AS923-2
298
299 0x0a: AS923-3
300
301 0x0b: CN470
302
303 0x0c: EU433
304
305 0x0d: KR920
306
307 0x0e: MA869
308
309
310 * (% style="color:#037691" %)**Sub-Band**(%%)**:**
311 ** AU915 and US915: value 0x00 ~~ 0x08
312 ** CN470: value 0x0B ~~ 0x0C
313 ** Other Bands: Always 0x00
314
315 * (% style="color:#037691" %)**Battery Info:**
316
317 Check the battery voltage.
318
319 Ex1: 0x0B45 = 2885mV
320
321 Ex2: 0x0B49 = 2889mV
322
323
324 === 2.3.2 Sensor Configuration, FPORT~=4 ===
325
326
327 (((
328 MDS200-LB/LS will only send this command after getting the downlink command (0x26 02) from the server.
329
330 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:413px" %)
331 |=(% colspan="5" style="width: 413px;background-color:#4F81BD;color:white" %)**Sensor Configuration FPORT=4**
332 |**Size(bytes)**|(% style="width:84px" %)**3**|(% style="width:73px" %)**1**|(% style="width:74px" %)**4**|(% style="width:76px" %)**1**
333 |Value|(% style="width:84px" %)(((
334 [[TDC (unit:sec)>>||anchor="H3.3.1SetTransmitIntervalTime280x0129"]]
335 )))|(% style="width:73px" %)(((
336 [[ATDC (unit:min)>>||anchor="H3.3.2SetAlarmTransmitIntervalTime280x0D29"]]
337 )))|(% style="width:74px" %)[[Alarm Settings>>||anchor="H3.3.3SetAlarmDistance280xA229"]]|(% style="width:76px" %)[[Interrupt Settings>>||anchor="H3.3.5SetInterruptMode280x0629"]]
338 )))
339
340 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LMDS200%20-%20LoRaWAN%20Microwave%20Radar%20Distance%20%20Sensor%20User%20Manual/WebHome/1655279779620-413.png?rev=1.1||alt="1655279779620-413.png"]]
341
342
343 === 2.3.3 Distance, Uplink FPORT~=2 ===
344
345
346 MDS200-LB/LS will send this uplink **after** Device Status once join the LoRaWAN network successfully. And MDS200-LB/LS will:
347
348 1. periodically send this uplink every 1 hour (TDC time), this interval [[can be changed>>||anchor="H3.3.1SetTransmitIntervalTime280x0129"]].
349 1. periodically send this uplink every 1 minute in Alarm Mode.
350 1. send this uplink while there is [[interrupt event>>||anchor="H3.3.5SetInterruptMode280x0629"]].
351
352 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:370px" %)
353 |=(% colspan="5" style="width: 370px;background-color:#4F81BD;color:white" %)**Distance Value, FPORT=2**
354 |(% style="width:72px" %)**Size(bytes)**|(% style="width:43px" %)**2**|(% style="width:76px" %)**2**|(% style="width:76px" %)**2**|(% style="width:75px" %)**1**
355 |(% style="width:72px" %)Value|(% style="width:43px" %)[[BAT>>||anchor="H2.3.1DeviceStatus2CFPORT3D5"]]|(% style="width:76px" %)Object1 Distance|(% style="width:76px" %)Object2 Distance|(% style="width:75px" %)Status & [[Alarm>>||anchor="H3.3.3SetAlarmDistance280xA229"]]
356
357 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:467px" %)
358 |=(% colspan="4" style="width: 467px; background-color:#4F81BD;color:white;" %)**Status & Alarm field**
359 |(% style="width:60px" %)**Size(bit)**|(% style="width:76px" %)**6**|(% style="width:138px" %)**1**|(% style="width:173px" %)**1**
360 |(% style="width:73px" %)Value|(% style="width:76px" %)DALARM Counter|(% style="width:138px" %)(((
361 Distance Alarm
362 0: Normal Value 1: Distance Alarm
363 )))|(% style="width:173px" %)(((
364 Interrupt Alarm
365 0: No Alarm 1: external Interrupt Alarm
366 )))
367
368 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LMDS200%20-%20LoRaWAN%20Microwave%20Radar%20Distance%20%20Sensor%20User%20Manual/WebHome/image-20220615160828-3.png?rev=1.1||alt="image-20220615160828-3.png"]]
369
370
371 (((
372 (% style="color:blue" %)** Object1 Distance:**
373 )))
374
375 (((
376 Distance between sensor probe to the first object. (unit: cm)
377 )))
378
379 (((
380 For example, if the data you get from the register is **__0x00 0x73__**, the distance between the sensor and the measured object is(% style="color:blue" %)** 0073(H) = 115 (D) = 115 cm.**
381 )))
382
383 (((
384 (% style="color:red" %)**Notice: There are two special values for object 1 distance:**
385 )))
386
387 * (((
388 **0x0001**: Probe not detected
389 )))
390 * (((
391 **0x0002**: Reading Invalid (exceed the valid range of the probe)
392 )))
393
394 (((
395 (% style="color:blue" %)**Object2 Distance:**
396 )))
397
398 (((
399 Distance between sensor probe to the second object. (unit: cm)
400 )))
401
402 (((
403 DALARM Counter : Alarm Counter.
404 )))
405
406
407 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LMDS200%20-%20LoRaWAN%20Microwave%20Radar%20Distance%20%20Sensor%20User%20Manual/WebHome/image-20220615160828-4.png?rev=1.1||alt="image-20220615160828-4.png"]]
408
409
410 === 2.3.4 Decoder in TTN V3 ===
411
412
413 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LMDS200%20-%20LoRaWAN%20Microwave%20Radar%20Distance%20%20Sensor%20User%20Manual/WebHome/1655261164557-670.png?rev=1.1||alt="1655261164557-670.png"]]
414
415 (((
416 Please check the decoder from this link: [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>https://github.com/dragino/dragino-end-node-decoder]]
417 )))
418
419
420
421 == 2.4 Uplink Interval ==
422
423
424 The MDS200-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>>||anchor="H3.3.1SetTransmitIntervalTime280x0129"]]
425
426
427 == 2.5 ​Show Data in DataCake IoT Server ==
428
429
430 (((
431 [[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:
432 )))
433
434
435 (((
436 (% style="color:blue" %)**Step 1**(%%)**: Be sure that your device is programmed and properly connected to the network at this time.**
437 )))
438
439 (((
440 (% 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:**
441 )))
442
443
444 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDDS75%20-%20LoRaWAN%20Distance%20Detection%20Sensor%20User%20Manual/WebHome/1654592790040-760.png?rev=1.1||alt="1654592790040-760.png"]]
445
446
447 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDDS75%20-%20LoRaWAN%20Distance%20Detection%20Sensor%20User%20Manual/WebHome/1654592800389-571.png?rev=1.1||alt="1654592800389-571.png"]]
448
449
450 (% style="color:blue" %)**Step 3**(%%)**: Create an account or log in Datacake.**
451
452 (% style="color:blue" %)**Step 4**(%%)**: Search the MDS200-LB/LS and add DevEUI.**
453
454 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDDS75%20-%20LoRaWAN%20Distance%20Detection%20Sensor%20User%20Manual/WebHome/1654851029373-510.png?rev=1.1||alt="1654851029373-510.png"]]
455
456
457 After added, the sensor data arrive TTN V3, it will also arrive and show in Datacake.
458
459 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDDS75%20-%20LoRaWAN%20Distance%20Detection%20Sensor%20User%20Manual/WebHome/image-20220610165129-11.png?width=1088&height=595&rev=1.1||alt="image-20220610165129-11.png"]]
460
461
462 == 2.6 Datalog Feature ==
463
464
465 Datalog Feature is to ensure IoT Server can get all sampling data from Sensor even if the LoRaWAN network is down. For each sampling, MDS200-LB/LS will store the reading for future retrieving purposes.
466
467
468 === 2.6.1 Ways to get datalog via LoRaWAN ===
469
470
471 Set **PNACKMD=1**, MDS200-LB/LS will wait for ACK for every uplink, when there is no LoRaWAN network, MDS200-LB/LS 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.
472
473 * (((
474 a) MDS200-LB/LS will do an ACK check for data records sending to make sure every data arrive server.
475 )))
476 * (((
477 b) MDS200-LB/LS will send data in **CONFIRMED Mode** when PNACKMD=1, but MDS200-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 MDS200-LB/LS gets a ACK, MDS200-LB/LS will consider there is a network connection and resend all NONE-ACK messages.
478 )))
479
480 === 2.6.2 Unix TimeStamp ===
481
482
483 MDS200-LB/LS uses Unix TimeStamp format based on
484
485 [[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"]]
486
487 User can get this time from link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] :
488
489 Below is the converter example
490
491 [[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"]]
492
493
494 So, we can use AT+TIMESTAMP=1611889405 or downlink 3060137afd00 to set the current time 2021 – Jan ~-~- 29 Friday 03:03:25
495
496
497 === 2.6.3 Set Device Time ===
498
499
500 User need to set (% style="color:blue" %)**SYNCMOD=1**(%%) to enable sync time via MAC command.
501
502 Once MDS200-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 MDS200-LB/LS. If MDS200-LB/LS fails to get the time from the server, MDS200-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).
503
504 (% 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.**
505
506
507 === 2.6.4 Poll sensor value ===
508
509
510 Users can poll sensor values based on timestamps. Below is the downlink command.
511
512 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:425.818px" %)
513 |(% colspan="4" style="background-color:#4f81bd; color:white; width:423px" %)**Downlink Command to poll Open/Close status (0x31)**
514 |(% style="width:58px" %)**1byte**|(% style="width:127px" %)**4bytes**|(% style="width:124px" %)**4bytes**|(% style="width:114px" %)**1byte**
515 |(% style="width:58px" %)31|(% style="width:127px" %)Timestamp start|(% style="width:124px" %)Timestamp end|(% style="width:114px" %)Uplink Interval
516
517 (((
518 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.
519 )))
520
521 (((
522 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"]]
523 )))
524
525 (((
526 Is to check 2021/11/12 12:00:00 to 2021/11/12 15:00:00's data
527 )))
528
529 (((
530 Uplink Internal =5s,means MDS200-LB/LS will send one packet every 5s. range 5~~255s.
531
532
533 === 2.6.5 Datalog Uplink payload (FPORT~=3) ===
534
535
536 )))
537
538 The Datalog uplinks will use below payload format.
539
540 **Retrieval data payload:**
541
542 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:500px" %)
543 |=(% style="background-color:#4F81BD;color:white" %)**Size(bytes)**|=(% style="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" %)**4**
544 |Value|BAT|(((
545 distance1 
546 )))|distance2  |Poll message flag & Alarm Flag& Interrupt Flag|Unix Time Stamp
547
548 **No ACK Message**:  1: This message means this payload is fromn Uplink Message which doesn't get ACK from the server before ( for **PNACKMD=1** feature)
549
550 **Poll Message Flag**: 1: This message is a poll message reply.
551
552 * Poll Message Flag is set to 1.
553
554 * Each data entry is 11 bytes, to save airtime and battery, devices will send max bytes according to the current DR and Frequency bands.
555
556 For example, in US915 band, the max payload for different DR is:
557
558 **a) DR0:** max is 11 bytes so one entry of data
559
560 **b) DR1:** max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
561
562 **c) DR2:** total payload includes 11 entries of data
563
564 **d) DR3: **total payload includes 22 entries of data.
565
566 If devise doesn't have any data in the polling time. Device will uplink 11 bytes of 0   
567
568 **Example:**
569
570 If MDS200-LB/LS has below data inside Flash:
571
572 [[image:image-20230803094136-1.png]]
573
574 If user sends below downlink command: 3164C7C55464C7C91405
575
576 Where : Start time: 64C7C554 = time 2023/7/31 22:29:40
577
578 Stop time: 64C7 C914 = time 2023/7/31 22:45:40
579
580
581 **MDS200-LB/LS will uplink this payload.**
582
583 [[image:image-20230803101154-2.png||height="141" width="1406"]]
584
585
586 0C D3 01 04 01 7F 40 64 C7 C5 54 0C D3 01 04 01 7F 40 64 C7 C5 90 0C D3 01 04 01 7F 40 64 C7 C5 CC 0C D3 01 04 01 7F 40 64 C7 C6 08 0C D3 01 04 01 7F 40 64 C7 C6 44
587
588 Where the first 11 bytes is for the first entry:
589
590 0C D3 01 04 01 7F 40 64 C7 C5 54
591
592 **BAT**=0x0C D3/1000=3.283
593
594 **distance1**=01 04=260
595
596 **distance2**=01 7F=383
597
598 **Poll message flag & Alarm Flag& Interrupt Flag**=0x40,means reply data,sampling uplink message,no Alarm,no interrupt
599
600 **Unix time** is 0x64 C7 C5 54 0C=1690813780s=2023-07-31 22:29:40
601
602
603 == 2.7 Frequency Plans ==
604
605
606 The MDS200-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.
607
608 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/]]
609
610
611 = 3. Configure MDS200-LB/LS =
612
613 == 3.1 Configure Methods ==
614
615
616 MDS200-LB/LS supports below configure method:
617
618 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
619
620 * 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]].
621
622 * LoRaWAN Downlink.  Instruction for different platforms: See [[IoT LoRaWAN Server>>http://wiki.dragino.com/xwiki/bin/view/Main/]] section.
623
624 == 3.2 General Commands ==
625
626
627 These commands are to configure:
628
629 * General system settings like: uplink interval.
630
631 * LoRaWAN protocol & radio related command.
632
633 They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki:
634
635 [[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/]]
636
637
638 == 3.3 Commands special design for MDS200-LB/LS ==
639
640
641 These commands only valid for MDS200-LB/LS, as below:
642
643
644 === 3.3.1 Set Transmit Interval Time(0x01) ===
645
646
647 Feature: Change LoRaWAN End Node Transmit Interval.
648
649 (% style="color:#037691" %)**AT Command: AT+TDC**
650
651 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
652 |=(% 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**
653 |(% style="width:156px" %)AT+TDC=?|(% style="width:137px" %)Show current transmit Interval|(((
654 30000
655 OK
656 the interval is 30000ms = 30s
657 )))
658 |(% style="width:156px" %)AT+TDC=60000|(% style="width:137px" %)Set Transmit Interval|(((
659 OK
660 Set transmit interval to 60000ms = 60 seconds
661 )))
662
663 ​(% style="color:#037691" %)**Downlink Command: 0x01**
664
665 (((
666 Format: Command Code (0x01) followed by 3 bytes time value.
667
668 (((
669 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
670 )))
671
672 * Example 1: Downlink Payload: 0100001E  ~/~/  Set Transmit Interval (TDC) = 30 seconds
673 * Example 2: Downlink Payload: 0100003C  ~/~/  Set Transmit Interval (TDC) = 60 seconds
674 )))
675
676
677
678 === 3.3.2 Set Alarm Transmit Interval Time(0x0D) ===
679
680
681 Feature: Change LoRaWAN End Node Alarm Transmit Interval. Default Value: 1 minute
682
683 (% style="color:#037691" %)**AT Command: AT+ATDC**
684
685 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
686 |=(% 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**
687 |(% style="width:156px" %)AT+ATDC=?|(% style="width:139px" %)Show current alarm transmit Interval|(% style="width:213px" %)(((
688 1
689 OK
690 the interval is 1 minute
691 )))
692 |(% style="width:156px" %)AT+ATDC=1|(% style="width:139px" %)Set Alarm Transmit Interval|(% style="width:213px" %)(((
693 OK
694 Set alarm transmit interval to 1 minute
695 )))
696
697 (% style="color:#037691" %)**Downlink Command: 0x0D**
698
699 Format: Command Code (0x0D) followed by 1 byte for time value.
700
701 If the downlink payload=0D02, it means set the END Node's Alarm Transmit Interval to 2 minutes, while type code is 0D.
702
703
704 === 3.3.3 Set Alarm Distance (0xA2) ===
705
706
707 MDS200-LB/LS supports Alarm Feature, when MDS200-LB/LS detect the distance exceed the alarm settings, MDS200-LB/LS will Enter Alarm Mode and use the [[ATDC interval>>||anchor="H3.3.2SetAlarmTransmitIntervalTime280x0D29"]] (default is 1 minute) to uplink Distance value. Alarm mode will last for 60 uplinks (default 1 hour) and can be close by downlink command 0xA300.
708
709 (% style="color:red" %)**Note: Alarm mode only valid for the Distance 1(the Closest Object)**
710
711
712 User can set Alarm Distance to enable/disable Alarm Mode.
713
714 (% style="color:#037691" %)**AT+ALARMC=AA,BB**
715
716 * AA: Dec value for Alarm low threshold, BB: Dec value for Alarm high threshold
717 * When 0xAA=0, and 0xBB≠0, Alarm trigger when higher than max
718 * When 0xAA≠0, and 0xBB =0xFFFF, Alarm trigger when lower than min
719 * When 0xAA≠0 and 0xBB≠0, Alarm trigger when higher than max or lower than min
720
721 **Example:**
722
723 AT+ALARMC=100,200  ~/~/ Alarm when < 100 or higher than 200.(Min:50cm, Max:2000cm)
724
725
726 (% style="color:#037691" %)**Downlink Payload:**
727
728 0x(A2 00 64 00 C8)  ~/~/ Same as AT+ALARMC=100,200
729
730
731 === 3.3.4 Enter/Exit Alarm Mode (0xA3) ===
732
733
734 Feature: Enter/Exit Alarm mode:
735
736 (% style="color:#037691" %)**AT Command: AT+ALARM=0(Exit Alarm Mode or AT+ALARM=1 (Enter Alarm Mode)**
737
738
739 (% style="color:#037691" %)**Downlink Command:**
740
741 0xA3 00  ~/~/ Exit Alarm Mode. 
742
743 0xA3 01  ~/~/ Enter Alarm Mode. Enter Alarm mode will use ATDC interval in the next 59 uplinks.
744
745
746 === 3.3.5 Set Interrupt Mode(0x06) ===
747
748
749 (((
750 Feature, Set Interrupt mode for GPIO_EXIT.
751 )))
752
753 (((
754 (% style="color:#037691" %)**AT Command: AT+INTMOD**
755 )))
756
757 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
758 |=(% style="width: 154px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 196px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 157px;background-color:#4F81BD;color:white" %)**Response**
759 |(% style="width:154px" %)AT+INTMOD=?|(% style="width:196px" %)Show current interrupt mode|(% style="width:157px" %)(((
760 0
761 OK
762 the mode is 0 = No interruption
763 )))
764 |(% style="width:154px" %)AT+INTMOD=2|(% style="width:196px" %)(((
765 Set Transmit Interval
766 0. (Disable Interrupt),
767 ~1. (Trigger by rising and falling edge)
768 2. (Trigger by falling edge)
769 3. (Trigger by rising edge)
770 )))|(% style="width:157px" %)OK
771
772 (% style="color:#037691" %)**Downlink Command: 0x06**
773
774 (((
775 Format: Command Code (0x06) followed by 3 bytes.
776 )))
777
778 (((
779 This means that the interrupt mode of the end node is set to 0x000003=3 (rising edge trigger), and the type code is 06.
780 )))
781
782 * (((
783 Example 1: Downlink Payload: 06000000  ~/~/ Turn off interrupt mode
784 )))
785
786 * (((
787 Example 2: Downlink Payload: 06000003  ~/~/ Set the interrupt mode to rising edge trigger
788
789
790
791 )))
792
793 = 4. Battery & Power Consumption =
794
795
796 MDS200-LB use ER26500 + SPC1520 battery pack and MDS200-LS use 3000mAh Recharable Battery with Solar Panel. See below link for detail information about the battery info and how to replace.
797
798 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
799
800
801 = 5. OTA Firmware update =
802
803
804 (% class="wikigeneratedid" %)
805 User can change firmware MDS200-LB/LS to:
806
807 * Change Frequency band/ region.
808
809 * Update with new features.
810
811 * Fix bugs.
812
813 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/uk9ocuytjicpthk/AAAWWW3fm3M7M1F8TbGFff91a?dl=0]]**
814
815 Methods to Update Firmware:
816
817 * (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/]]**
818
819 * 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]]**.
820
821 = 6. FAQ =
822
823 == 6.1 What is the frequency plan for MDS200-LB/LS? ==
824
825
826 MDS200-LB/LS use the same frequency as other Dragino products. User can see the detail from this link:  [[Introduction>>doc:Main.End Device Frequency Band.WebHome||anchor="H1.Introduction"]]
827
828
829 = 7. Trouble Shooting =
830
831 == 7.1 Why I can't join TTN V3 in US915 / AU915 bands? ==
832
833
834 It is due to channel mapping. Please see below link:  [[Frequency band>>doc:Main.LoRaWAN Communication Debug.WebHome||anchor="H2.NoticeofUS9152FCN4702FAU915Frequencyband"]]
835
836
837 == 7.2 AT Command input doesn't work ==
838
839
840 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:blue" %)**ENTER**(%%) while sending out the command. Some serial tool doesn't send (% style="color:blue" %)**ENTER**(%%) while press the send key, user need to add ENTER in their string.
841
842
843 = 8. Order Info =
844
845
846 **Part Number: (% style="color:blue" %)MDS200-LB-XX (%%)or (% style="color:blue" %)MDS200-LS-XX(%%)**
847
848 (% style="color:red" %)**XX**(%%): **The default frequency band**
849
850 * (% style="color:red" %)**AS923**(%%): LoRaWAN AS923 band
851
852 * (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band
853
854 * (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band
855
856 * (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band
857
858 * (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band
859
860 * (% style="color:red" %)**US915**(%%): LoRaWAN US915 band
861
862 * (% style="color:red" %)**IN865**(%%): LoRaWAN IN865 band
863
864 * (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band
865
866 = 9. ​Packing Info =
867
868
869 (% style="color:#037691" %)**Package Includes**:
870
871 * MDS200-LB or MDS200-LS LoRaWAN Microwave Radar Distance Sensor x 1
872
873 (% style="color:#037691" %)**Dimension and weight**:
874
875 * Device Size: cm
876
877 * Device Weight: g
878
879 * Package Size / pcs : cm
880
881 * Weight / pcs : g
882
883 = 10. Support =
884
885
886 * 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.
887
888 * 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]].
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0