Last modified by Mengting Qiu on 2025/07/08 11:32

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