Version 7.1 by Xiaoling on 2023/05/22 09:32

Show last authors
1 (% style="text-align:center" %)
2 [[image:image-20230516085523-1.jpeg||height="491" width="491"]]
3
4
5 **Table of Contents:**
6
7 {{toc/}}
8
9
10
11
12
13
14 = 1. Introduction =
15
16 == 1.1 What is DS03A-LB LoRaWAN Door Sensor ==
17
18
19 (((
20 The Dragino DS03A-LB is a (% style="color:blue" %)**LoRaWAN Door Sensor**(%%) for Internet of Things solution. It detects door open/close status and uplinks to IoT server via LoRaWAN network. user can see the door status, open duration, open counts in the IoT Server.
21 )))
22
23 (((
24 The LoRa wireless technology used in DS03A-LB 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.
25 )))
26
27 (((
28 The DS03A-LB will send periodically data every 2 hours as well as for each door open/close action. It also counts the door open times and calculates the last door open duration. Users can also disable the uplink for each open/close event, instead, DS03A-LB can count each open event and uplink periodically.
29 )))
30
31 (((
32 DS03A-LB supports (% style="color:blue" %)**Datalog Feature,**(%%) it can save the data when there is no LoRaWAN network and uplink when network recover.
33 )))
34
35 (((
36 DS03A-LB has the (% style="color:blue" %)**Open Alarm Feature**(%%), user can set this feature so the device will send an alarm if the door has been open for a certain time.
37
38 DS03A-LB is designed for outdoor use. It has a weatherproof enclosure and industrial level battery to work in low to high temperatures
39 )))
40
41 (((
42 DS03A-LB (% style="color:blue" %)**supports BLE configure**(%%) and (% style="color:blue" %)**wireless OTA update**(%%) which make user easy to use.
43 )))
44
45 (((
46 DS03A-LB is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), it is designed for long term use up to 5 years.
47 )))
48
49 (((
50 Each DS03A-LB 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.
51 )))
52
53
54 [[image:image-20230522092934-2.png||height="346" width="774"]]
55
56
57 == 1.2 ​Features ==
58
59
60 * LoRaWAN 1.0.3 Class A
61 * Ultra-low power consumption
62 * Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865
63 * Door Open/Close detect
64 * Door open/close statistics
65 * Datalog Feature, Open Alarm Feature
66 * Support Bluetooth v5.1 and LoRaWAN remote configure
67 * Support wireless OTA update firmware
68 * Uplink on periodically
69 * Downlink to change configure
70 * 8500mAh Battery for long term use
71 * Wall Mountable
72 * Outdoor Use
73
74
75 == 1.3 Specification ==
76
77
78 (% style="color:#037691" %)**Common DC Characteristics:**
79
80 * Supply Voltage: built in 8500mAh Li-SOCI2 battery , 2.5v ~~ 3.6v
81 * Operating Temperature: -40 ~~ 85°C
82
83 (% style="color:#037691" %)**Sensor Detect Distance:**
84
85 * Wood Door: 10mm ~~ 30mm
86 * Iron Door: 30 ~~ 45mm
87
88 (% style="color:#037691" %)**LoRa Spec:**
89
90 * Frequency Range,  Band 1 (HF): 862 ~~ 1020 Mhz
91 * Max +22 dBm constant RF output vs.
92 * RX sensitivity: down to -139 dBm.
93 * Excellent blocking immunity
94
95 (% style="color:#037691" %)**Battery:**
96
97 * Li/SOCI2 un-chargeable battery
98 * Capacity: 8500mAh
99 * Self-Discharge: <1% / Year @ 25°C
100 * Max continuously current: 130mA
101 * Max boost current: 2A, 1 second
102
103 (% style="color:#037691" %)**Power Consumption**
104
105 * Sleep Mode: 5uA @ 3.3v
106 * LoRa Transmit Mode: 125mA @ 20dBm, 82mA @ 14dBm
107
108
109 == 1.4 Applications ==
110
111
112 [[image:Main.User Manual for LoRaWAN End Nodes.LDS03A - Outdoor LoRaWAN OpenClose Door Sensor Manual.WebHome@1654741400370-813.png]]
113
114
115 == 1.5 Sleep mode and working mode ==
116
117
118 (% 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.
119
120 (% 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.
121
122
123 == 1.6 Button & LEDs ==
124
125
126 [[image:Main.User Manual for LoRaWAN End Nodes.PS-LB -- LoRaWAN Pressure Sensor.WebHome@1675071855856-879.png]]
127
128
129 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
130 |=(% style="width: 167px;background-color:#D9E2F3;color:#0070C0" %)**Behavior on ACT**|=(% style="width: 117px;background-color:#D9E2F3;color:#0070C0" %)**Function**|=(% style="width: 225px;background-color:#D9E2F3;color:#0070C0" %)**Action**
131 |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
132 If sensor is already Joined to LoRaWAN network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
133 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
134 )))
135 |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
136 (% 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.
137 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
138 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.
139 )))
140 |(% 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.
141
142
143 == 1.7 BLE connection ==
144
145
146 D2x-LB support BLE remote configure.
147
148
149 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:
150
151 * Press button to send an uplink
152 * Press button to active device.
153 * Device Power on or reset.
154
155 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
156
157
158 == 1.8 Mechanical ==
159
160
161 [[image:Main.User Manual for LoRaWAN End Nodes.LDS03A - Outdoor LoRaWAN OpenClose Door Sensor Manual.WebHome@1654741444887-479.png||height="399" width="513"]]
162
163
164 [[image:Main.User Manual for LoRaWAN End Nodes.PS-LB -- LoRaWAN Pressure Sensor.WebHome@1675143884058-338.png]]
165
166
167 [[image:Main.User Manual for LoRaWAN End Nodes.PS-LB -- LoRaWAN Pressure Sensor.WebHome@1675143899218-599.png]]
168
169
170 [[image:Main.User Manual for LoRaWAN End Nodes.PS-LB -- LoRaWAN Pressure Sensor.WebHome@1675143909447-639.png]]
171
172
173 = 2. Configure DS03A-LB to connect to LoRaWAN network =
174
175 == 2.1 How it works ==
176
177
178 The DS03A-LB 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 DS03A-LB. It will automatically join the network via OTAA and start to send the sensor value. The default uplink interval is 20 minutes.
179
180
181 == 2.2 ​Quick guide to connect to LoRaWAN server (OTAA) ==
182
183
184 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. (% style="display:none" %)
185
186 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.
187
188 [[image:image-20230522092858-1.png||height="391" width="874"]]
189
190
191 (% style="color:blue" %)**Step 1:**(%%) Create a device in TTN with the OTAA keys from DS03A-LB.
192
193 Each DS03A-LB is shipped with a sticker with the default device EUI as below:
194
195 [[image:image-20230426085205-1.png||height="238" width="512"]]
196
197
198 You can enter this key in the LoRaWAN Server portal. Below is TTN screen shot:
199
200 (% style="display:none" %) (%%)
201
202 (% style="color:blue" %)**Register the device**
203
204
205 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual/WebHome/1675144099263-405.png?rev=1.1||alt="1675144099263-405.png"]](% style="display:none" %)
206
207
208 (% style="color:blue" %)**Add APP EUI and DEV EUI**
209
210 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual/WebHome/1675144117571-832.png?rev=1.1||alt="1675144117571-832.png"]]
211
212
213 (% style="color:blue" %)**Add APP EUI in the application**
214
215 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual/WebHome/1675144143021-195.png?rev=1.1||alt="1675144143021-195.png"]]
216
217
218 (% style="color:blue" %)**Add APP KEY**
219
220 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual/WebHome/1675144157838-392.png?rev=1.1||alt="1675144157838-392.png"]]
221
222
223 (% style="color:blue" %)**Step 2:**(%%) Activate on DS03A-LB
224
225
226 Press the button for 5 seconds to activate the DS03A-LB.
227
228 (% 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.
229
230 After join success, it will start to upload messages to TTN and you can see the messages in the panel.
231
232
233 == 2.3 ​Uplink Payload ==
234
235 === 2.3.1 Device Status, FPORT~=5 ===
236
237 Users can use the downlink command(**0x26 01**) to ask DS03A-LB to send device configure detail, include device configure status. DS03A-LB will uplink a payload via FPort=5 to server.
238
239 The Payload format is as below.
240
241
242 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
243 |(% colspan="6" style="background-color:#d9e2f3; color:#0070c0" %)**Device Status (FPORT=5)**
244 |(% style="width:103px" %)**Size (bytes)**|(% style="width:72px" %)**1**|**2**|(% style="width:91px" %)**1**|(% style="width:86px" %)**1**|(% style="width:44px" %)**2**
245 |(% style="width:103px" %)**Value**|(% style="width:72px" %)Sensor Model|Firmware Version|(% style="width:91px" %)Frequency Band|(% style="width:86px" %)Sub-band|(% style="width:44px" %)BAT
246
247 Example parse in TTNv3
248
249 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual/WebHome/image-20230415153147-2.png?rev=1.1||alt="图片-20230415153147-2.png" height="209" width="1063"]]
250
251
252 (% style="color:#037691" %)**Sensor Model**(%%): For DS03A-LB, this value is 0x0B
253
254 (% style="color:#037691" %)**Firmware Version**(%%): 0x0100, Means: v1.0.0 version
255
256 (% style="color:#037691" %)**Frequency Band**:
257
258 *0x01: EU868
259
260 *0x02: US915
261
262 *0x03: IN865
263
264 *0x04: AU915
265
266 *0x05: KZ865
267
268 *0x06: RU864
269
270 *0x07: AS923
271
272 *0x08: AS923-1
273
274 *0x09: AS923-2
275
276 *0x0a: AS923-3
277
278 *0x0b: CN470
279
280 *0x0c: EU433
281
282 *0x0d: KR920
283
284 *0x0e: MA869
285
286
287 (% style="color:#037691" %)**Sub-Band**:
288
289 AU915 and US915:value 0x00 ~~ 0x08
290
291 CN470: value 0x0B ~~ 0x0C
292
293 Other Bands: Always 0x00
294
295
296 (% style="color:#037691" %)**Battery Info**:
297
298 Check the battery voltage.
299
300 Ex1: 0x0B45 = 2885mV
301
302 Ex2: 0x0B49 = 2889mV
303
304
305 === 2.3.2  Real-Time Open/Close Status, Uplink FPORT~=2 ===
306
307
308 DS03A-LB will send this uplink **after** Device Status once join the LoRaWAN network successfully. And DS03A-LB will send uplinks when:
309
310 * Every 2 hours, this interval [[can be changed>>||anchor="H3.3.1SetTransmitIntervalTime"]].
311 * There is an Open/Close event.  (This info can be disabled by AT+DISALARM=1)
312
313 Uplink Payload totals 11 bytes.
314
315 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:520px" %)
316 |=(% colspan="5" style="background-color: rgb(217, 226, 243); color: rgb(0, 112, 192); width: 522px;" %)**Real-Time Open/Close Status, FPORT=2**
317 |(% style="width:95px" %)**Size(bytes)**|(% style="width:78px" %)**1**|(% style="width:98px" %)**3**|(% style="width:144px" %)**3**|(% style="width:108px" %)**4**
318 |(% style="width:95px" %)**Value**|(% style="width:78px" %)Status & [[Alarm>>||anchor="H3.3.4A0AlarmBaseonTimeout"]]|(% style="width:98px" %)Total open door events|(% style="width:144px" %)(((
319 The last door open duration (unit: min)
320 )))|(% style="width:108px" %)[[Unix TimeStamp>>||anchor="H2.5.2UnixTimeStamp"]]
321
322 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:518.818px" %)
323 |=(% colspan="4" style="background-color: rgb(217, 226, 243); color: rgb(0, 112, 192); width: 516px;" %)**Status & Alarm field**
324 |(% style="width:76px" %)**Size(bit)**|(% style="width:70px" %)**6**|(% style="width:240px" %)**1**|(% style="width:130px" %)**1**
325 |(% style="width:76px" %)**Value**|(% style="width:70px" %)Reserve|(% style="width:240px" %)[[Enable/disable Timeout Alarm>>||anchor="H3.3.3A0Enable2FDisableAlarm"]]
326 0: No Alarm; 1: Alarm|(% style="width:130px" %)Status
327 0: Close, 1: Open
328
329 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS03A%20-%20Outdoor%20LoRaWAN%20OpenClose%20Door%20Sensor%20Manual/WebHome/image-20220609110547-6.png?width=1191&height=337&rev=1.1||alt="image-20220609110547-6.png" height="337" width="1191"]]
330
331
332 === 2.3.3  Historical Door Open/Close Event, FPORT~=3 ===
333
334
335 DS03A-LB stores sensor values and users can retrieve these history values via the [[downlink command>>||anchor="H2.5DatalogFeature"]].
336
337 The historical payload includes one or multiplies entries and every entry has the same payload as Real-Time open/close status.
338
339 * (((
340 Each data entry is 11 bytes and has the same structure as [[Real-Time open/close status>>||anchor="H2.3.2A0Real-TimeOpen2FCloseStatus2CUplinkFPORT3D2"]], to save airtime and battery, DS03A-LB will send max bytes according to the current DR and Frequency bands.
341 )))
342
343 For example, in the US915 band, the max payload for different DR is:
344
345 1. (((
346 **DR0**: max is 11 bytes so one entry of data
347 )))
348 1. (((
349 **DR1**: max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
350 )))
351 1. (((
352 **DR2**: total payload includes 11 entries of data
353 )))
354 1. (((
355 **DR3**: total payload includes 22 entries of data.
356 )))
357
358 If DS03A-LB doesn't have any data in the polling time. It will uplink 11 bytes of 0
359
360 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS03A%20-%20Outdoor%20LoRaWAN%20OpenClose%20Door%20Sensor%20Manual/WebHome/image-20220609112215-7.png?width=1250&height=277&rev=1.1||alt="image-20220609112215-7.png" height="277" width="1250"]]
361
362 **Downlink:**
363
364 0x31 61 8E 57 40 61 8E 81 70 05
365
366
367 **Uplink:**
368
369 00 00 00 00 00 00 00 61 8E 5F 8F 01 00 00 01 00 00 00 61 8E 5F D2 00 00 00 01 00 00 02 61 8E 60 64 01 00 00 02 00 00 02 61 8E 60 75 00 00 00 02 00 00 01 61 8E 60 C6 00 00 00 02 00 00 01 61 8E 7B A7 01 00 00 03 00 00 01 61 8E 7F 38 00 00 00 03 00 00 02 61 8E 7F CE 01 00 00 04 00 00 02 61 8E 81 1B 00 00 00 04 00 00 00 61 8E 81 50
370
371
372 **Parsed Value:**
373
374 [ALARM, DOOR_OPEN_STATUS, DOOR_OPEN_TIMES,LAST_DOOR_OPEN_DURATION, TIME]
375
376
377 [FALSE, CLOSE, 0, 0, 2021-11-12 12:35:27],
378
379 [FALSE, OPEN,  1, 0, 2021-11-12 12:36:34],
380
381 [FALSE, CLOSE, 1, 2, 2021-11-12 12:39:00],
382
383 [FALSE, OPEN,  2, 2, 2021-11-12 12:39:17],
384
385 [FALSE, CLOSE, 2, 1, 2021-11-12 12:40:38],
386
387 [FALSE, CLOSE, 2, 1, 2021-11-12 14:35:19],
388
389 [FALSE, OPEN,  3, 1, 2021-11-12 14:50:32],
390
391 [FALSE, CLOSE, 3, 2, 2021-11-12 14:53:02],
392
393 [FALSE, OPEN,  4, 2, 2021-11-12 14:58:35],
394
395 [FALSE, CLOSE, 4, 0, 2021-11-12 14:59:28],
396
397
398 === 2.3.4  Sensor Configuration, FPORT~=4 ===
399
400
401 DS03A-LB will only send this command after getting the downlink command (0x26 02) from the server.
402
403 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
404 |(% colspan="5" style="background-color:#d9e2f3; color:#0070c0; width:504px" %)**Sensor Configuration FPORT=4**
405 |**Size(bytes)**|(% style="width:75px" %)**3**|(% style="width:77px" %)**1**|(% style="width:96px" %)**1**|(% style="width:158px" %)**2**
406 |**Value**|(% style="width:75px" %)TDC (unit:sec)|(% style="width:77px" %)Disalarm|(% style="width:96px" %)Keep status|(% style="width:158px" %)Keep time (unit: min)
407
408 * (((
409 (% style="color:blue" %)**TDC: (default: 0x001C20)**
410 )))
411
412 Uplink interval for the Open/Close Event, default value is 0x001C20 which is 7200 seconds = 2 hours.
413
414
415 * (((
416 (% style="color:blue" %)**Disalarm: (default: 0)**
417 )))
418
419 **If Disalarm = 1**, DS03A-LB will only send uplink at every TDC periodically. This is normally use for pulse meter application, in this application, there are many open/close event, and platform only care about the total number of pulse.
420
421 **If Disalarm = 0**, DS03A-LB will send uplink at every TDC periodically and send data on each open/close event. This is useful for the application user need to monitor the open/close event in real-time.
422
423
424 (% style="color:red" %)** Note: When Disalarm=0, a high frequently open/close event will cause lots of uplink and drain battery very fast. **
425
426
427 * (((
428 (% style="color:blue" %)**Keep Status & Keep Time**
429 )))
430
431 Shows the configure value of [[Alarm Base on Timeout Feature>>url:http://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS03A%20-%20Outdoor%20LoRaWAN%20OpenClose%20Door%20Sensor%20Manual/#H3.8A0AlarmBaseonTimeout]]
432
433 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS03A%20-%20Outdoor%20LoRaWAN%20OpenClose%20Door%20Sensor%20Manual/WebHome/image-20220609110018-4.png?width=1159&height=291&rev=1.1||alt="image-20220609110018-4.png" height="291" width="1159"]]
434
435
436 == 2.4 Payload Decoder file ==
437
438
439 (((
440 In TTN, use can add a custom payload so it shows friendly. 
441 )))
442
443 (((
444 In the page **Applications ~-~-> Payload Formats ~-~-> Custom ~-~-> decoder** to add the decoder from:  [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>https://github.com/dragino/dragino-end-node-decoder]]
445 )))
446
447
448 == 2.5 Datalog Feature ==
449
450
451 (% style="color:blue" %)**Datalog Feature** (%%)is to ensure IoT Server can get all sampling data from Sensor even if the LoRaWAN network is down. For each sampling, DS03A-LB will store the reading for future retrieving purposes.
452
453
454 === 2.5.1 Ways to get datalog via LoRaWAN ===
455
456
457 Set PNACKMD=1, DS03A-LB will wait for ACK for every uplink, when there is no LoRaWAN network,DS03A-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.
458
459 * a) DS03A-LB will do an ACK check for data records sending to make sure every data arrive server.
460 * b) DS03A-LB will send data in **CONFIRMED Mode** when PNACKMD=1, but DS03A-LB won't re-transmit the packet if it doesn't get ACK, it will just mark it as a NONE-ACK message. In a future uplink if DS03A-LB gets a ACK, DS03A-LB will consider there is a network connection and resend all NONE-ACK Message.
461
462 Below is the typical case for the Datalog Feature (Set PNACKMD=1)
463
464 [[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-20220703111700-2.png?width=1119&height=381&rev=1.1||alt="image-20220703111700-2.png" height="381" width="1119"]]
465
466
467 === 2.5.2 Unix TimeStamp ===
468
469
470 DS03A-LB uses Unix TimeStamp format based on
471
472 [[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="image-20220523001219-11.png" height="97" width="627"]]
473
474 User can get this time from link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] :
475
476 Below is the converter example
477
478 [[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="image-20220523001219-12.png" height="298" width="720"]]
479
480 So, we can use AT+TIMESTAMP=1611889405 or downlink 3060137afd00 to set the current time 2021 – Jan ~-~- 29 Friday 03:03:25
481
482
483 === 2.5.3 Set Device Time ===
484
485
486 User need to set (% style="color:blue" %)**SYNCMOD=1**(%%) to enable sync time via MAC command.
487
488 Once DS03A-LB Joined LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to DS03A-LB. If DS03A-LB fails to get the time from the server, DS03A-LB will use the internal time and wait for next time request (AT+SYNCTDC to set the time request period, default is 10 days).
489
490 (% 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 and loriot support but TTN 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 v2 if SYNCMOD=1.**
491
492
493 == 2.6 ​Show Data in DataCake IoT Server ==
494
495
496 Datacake IoT platform provides a human-friendly interface to show the sensor data, once we have sensor data in TTN V3, we can use Datacake to connect to TTN V3 and see the data in Datacake. Below are the steps:
497
498
499 (% style="color:blue" %)**Step 1:**(%%)** Link TTNv3 to Datacake.**[[https:~~/~~/docs.datacake.de/lorawan/lns/thethingsindustries#create-integration-on-tti>>url:https://docs.datacake.de/lorawan/lns/thethingsindustries#create-integration-on-tti]]
500
501 (% style="color:blue" %)**Step 2:**(%%)** Configure DS03A-LB in Datacake.**
502
503 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS03A%20-%20Outdoor%20LoRaWAN%20OpenClose%20Door%20Sensor%20Manual/WebHome/1654746350207-427.png?rev=1.1||alt="1654746350207-427.png"]]
504
505
506 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS03A%20-%20Outdoor%20LoRaWAN%20OpenClose%20Door%20Sensor%20Manual/WebHome/1654747162439-840.png?rev=1.1||alt="1654747162439-840.png"]]
507
508
509 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS03A%20-%20Outdoor%20LoRaWAN%20OpenClose%20Door%20Sensor%20Manual/WebHome/1654746405400-203.png?rev=1.1||alt="1654746405400-203.png"]]
510
511
512 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS03A%20-%20Outdoor%20LoRaWAN%20OpenClose%20Door%20Sensor%20Manual/WebHome/1654746763908-732.png?rev=1.1||alt="1654746763908-732.png"]]
513
514
515 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS03A%20-%20Outdoor%20LoRaWAN%20OpenClose%20Door%20Sensor%20Manual/WebHome/1654746716087-684.png?rev=1.1||alt="1654746716087-684.png"]]
516
517
518 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS03A%20-%20Outdoor%20LoRaWAN%20OpenClose%20Door%20Sensor%20Manual/WebHome/1654746693868-718.png?rev=1.1||alt="1654746693868-718.png"]]
519
520
521 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS03A%20-%20Outdoor%20LoRaWAN%20OpenClose%20Door%20Sensor%20Manual/WebHome/1654746674738-826.png?rev=1.1||alt="1654746674738-826.png"]]
522
523
524 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS03A%20-%20Outdoor%20LoRaWAN%20OpenClose%20Door%20Sensor%20Manual/WebHome/1654746646379-591.png?rev=1.1||alt="1654746646379-591.png"]]
525
526
527 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS03A%20-%20Outdoor%20LoRaWAN%20OpenClose%20Door%20Sensor%20Manual/WebHome/1654746549277-209.png?rev=1.1||alt="1654746549277-209.png"]]
528
529
530 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS03A%20-%20Outdoor%20LoRaWAN%20OpenClose%20Door%20Sensor%20Manual/WebHome/1654746593411-887.png?rev=1.1||alt="1654746593411-887.png"]]
531
532
533 == 2.7 Frequency Plans ==
534
535
536 The DS03A-LB uses OTAA mode and below frequency plans by default. If user want to use it with different frequency plan, please refer the AT command sets.
537
538 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/]]
539
540
541 == 2.8 ​Firmware Change Log ==
542
543
544 **Firmware download link:**
545
546 [[https:~~/~~/www.dropbox.com/sh/gf1glloczbzz19h/AABbuYI4WY6VdAmpXo6o1V2Ka?dl=0>>url:https://www.dropbox.com/sh/gf1glloczbzz19h/AABbuYI4WY6VdAmpXo6o1V2Ka?dl=0]]
547
548
549 = 3. Configure DS03A-LB =
550
551 == 3.1 Configure Methods: ==
552
553
554 DS03A-LB supports below configure method:
555
556 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
557 * AT Command via UART Connection : See [[Connection>>http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H2.3UARTConnectionforSN50v3basemotherboard]].
558 * LoRaWAN Downlink.  Instruction for different platforms: See [[IoT LoRaWAN Server>>http://wiki.dragino.com/xwiki/bin/view/Main/]] section.
559
560
561 == 3.2 General Commands ==
562
563 These commands are to configure:
564
565 * General system settings like: uplink interval.
566 * LoRaWAN protocol & radio related command.
567
568 They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki:
569
570 [[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/]]
571
572
573 == 3.3 Commands special design for DS03A-LB ==
574
575
576 These commands only valid for DS03A-LB, as below:
577
578
579 === 3.3.1 Set Transmit Interval Time ===
580
581
582 Feature: Change LoRaWAN End Node Transmit Interval.
583
584 (% style="color:blue" %)**AT Command: AT+TDC**
585
586 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
587 |=(% style="width: 156px;background-color:#D9E2F3" %)**Command Example**|=(% style="width: 137px;background-color:#D9E2F3" %)**Function**|=(% style="background-color:#D9E2F3" %)**Response**
588 |(% style="width:156px" %)AT+TDC=?|(% style="width:137px" %)Show current transmit Interval|(((
589 30000
590 OK
591 the interval is 30000ms = 30s
592 )))
593 |(% style="width:156px" %)AT+TDC=60000|(% style="width:137px" %)Set Transmit Interval|(((
594 OK
595 Set transmit interval to 60000ms = 60 seconds
596 )))
597
598 (% style="color:blue" %)**Downlink Command: 0x01**
599
600 Format: Command Code (0x01) followed by 3 bytes time value.
601
602 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
603
604 * Example 1: Downlink Payload: 0100001E  ~/~/  Set Transmit Interval (TDC) = 30 seconds
605 * Example 2: Downlink Payload: 0100003C  ~/~/  Set Transmit Interval (TDC) = 60 seconds
606
607
608 === 3.3.2 Get Device Status ===
609
610
611 Send a LoRaWAN downlink to ask device send Alarm settings.
612
613 * (% style="color:blue" %)**Downlink Payload:  **(%%)0x26 01
614
615 Sensor will upload Device Status via FPORT=5. See payload section for detail.
616
617
618 === 3.3.3  Enable / Disable Alarm ===
619
620
621 Feature: Enable/Disable Alarm for open/close event. Default value 0.
622
623 (% style="color:blue" %)**AT Command: **
624
625 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:520px" %)
626 |(% style="background-color:#d9e2f3; color:#0070c0; width:154px" %)**Command Example**|(% style="background-color:#d9e2f3; color:#0070c0; width:278px" %)**Function**|(% style="background-color:#d9e2f3; color:#0070c0; width:88px" %)**Response**
627 |(% style="width:154px" %)AT+DISALARM=1|(% style="width:278px" %)End node will only send packets in TDC time.|OK
628 |(% style="width:154px" %)AT+DISALARM=0|(% style="width:278px" %)End node will send packets in TDC time or status change for door sensor|OK
629
630 (% style="color:blue" %)**Downlink Command: **
631
632 0xA7 01  ~/~/ Same As AT+DISALARM=1
633
634 0xA7 00  ~/~/ Same As AT+DISALARM=0
635
636
637 === 3.3.4  Alarm Base on Timeout ===
638
639
640 DS03A-LB can monitor the timeout for a status change, this feature can be used to monitor some events such as door opening too long etc. Related Parameters are:
641
642
643 * (((
644 (% style="color:blue" %)**Keep Status: Status to be monitor**
645 )))
646
647 (% style="color:#037691" %)**Keep Status = 1**(%%): Monitor Close to Open event
648
649 (% style="color:#037691" %)**Keep Status = 0**(%%): Monitor Open to Close event
650
651
652 * (((
653 (% style="color:blue" %)**Keep Time: Timeout to send an Alarm**
654 )))
655
656 Range 0 ~~ 65535(0xFFFF) seconds.
657
658 If (% style="color:#037691" %)**keep time = 0**(%%), Disable Alarm Base on Timeout feature.
659
660 If (% style="color:#037691" %)**keep time > 0**(%%), device will monitor the keep status event and send an alarm when status doesn't change after timeout.
661
662
663 (% style="color:blue" %)**AT Command to configure:**
664
665 * (((
666 (% style="color:#037691" %)**AT+TTRIG=1,30** (%%) **~-~->** When the **Keep Status** change from close to open, and device remains in open status for more than 30 seconds. LDS03A will send an uplink packet, the [[Alarm bit>>||anchor="H2.3.2A0Real-TimeOpen2FCloseStatus2CUplinkFPORT3D2"]] (the second bit of 1^^st^^ byte of payload) on this uplink packet is set to 1.
667 )))
668
669 * (((
670 (% style="color:#037691" %)**AT+TTRIG=0,0**  (%%) **~-~-> ** Default Value, disable timeout Alarm.
671 )))
672
673 (% style="color:blue" %)**Downlink Command to configure:**
674
675 (% style="color:#037691" %)**Command: 0xA9 aa bb cc**
676
677 **A9:** Command Type Code
678
679 **aa:** status to be monitored
680
681 **bb cc:** timeout.
682
683
684 If user send 0xA9 01 00 1E: equal to AT+TTRIG=1,30
685
686 Or
687
688 0xA9 00 00 00: Equal to AT+TTRIG=0,0. Disable timeout Alarm.
689
690
691 === 3.3.5  Count Mod ===
692
693
694 (% style="color:blue" %)**AT Command:**
695
696 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:520px" %)
697 |=(% style="width: 155px;background-color:#D9E2F3;color:#0070C0" %)**Command Example**|=(% style="width: 277px;background-color:#D9E2F3;color:#0070C0" %)**Function**|=(% style="width: 88px;background-color:#D9E2F3;color:#0070C0" %)**Response**
698 |(% style="width:155px" %)(((
699 AT+COUNTMOD=0
700 )))|(% style="width:277px" %)(((
701 the count value keeps accumulating mode
702 )))|(% style="width:86px" %)(((
703 OK
704 )))
705 |(% style="width:155px" %)(((
706 AT+COUNTMOD=1
707 )))|(% style="width:277px" %)(((
708 the count value will be reset after each TDC time(Last Close Duration Reset after each uplink)
709 )))|(% style="width:86px" %)(((
710 OK
711 )))
712
713 (% style="color:blue" %)**Downlink Command:**
714
715 Example:  0B aa  => AT+COUNTMOD = second byte
716
717
718 === 3.3.6  Interrupt Pin Channel Mod ===
719
720
721 (% style="color:blue" %)**AT Command:**
722
723 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:500px" %)
724 |=(% style="width: 155px;background-color:#D9E2F3;color:#0070C0" %)**Command Example**|=(% style="width: 288px;background-color:#D9E2F3;color:#0070C0" %)**Function**|=(% style="width: 57px;background-color:#D9E2F3;color:#0070C0" %)**Response**
725 |(% style="width:155px" %)(((
726 AT+TTRCHANNEL=1
727 )))|(% style="width:288px" %)(((
728 set as single channel, only use PB14 pin as interrupt pin.
729 )))|(% style="width:44px" %)(((
730 OK
731 )))
732 |(% style="width:155px" %)(((
733 AT+TTRCHANNEL=2
734 )))|(% style="width:288px" %)(((
735 is set as dual channel, use PB14 pin and PB15 pin as interrupt pin.
736 )))|(% style="width:44px" %)(((
737 OK
738 )))
739
740 (% style="color:blue" %)**Downlink Command:**
741
742 Example:  0D aa => AT+TTRCHANNEL = second byte
743
744
745 === 3.3.7  Change the name of AT+TTRIG to AT+TTRIG1 ===
746
747
748 (% style="color:blue" %)**Downlink Command:**
749
750 Example:  A9 01 aa bb cc  => AT+TTRIG1= third byte, 4th byte and 5th byte
751
752
753 === 3.3.8  Added AT+TTRIG2 for PB15 pin ===
754
755
756 (% style="color:blue" %)**Downlink Command:**
757
758 Example: A9 02 aa bb cc  => AT+TTRIG2= third byte, 4th byte and 5th byte
759
760
761 === 3.3.9  TTRIG1/2 timeout status alarm ===
762
763
764 It needs to be used with AT+TTRIG1 or AT+TTRIG2. When TTRIG1 or TTRIG2 times out and causes an alarm, and the status does not change subsequently, an alarm packet will be sent at the alarm interval.
765
766 (% style="color:blue" %)**AT Command:**
767
768 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
769 |=(% style="width: 155px;background-color:#D9E2F3;color:#0070C0" %)**Command Example**|=(% style="width: 279px;background-color:#D9E2F3;color:#0070C0" %)**Function**|=(% style="width: 76px;background-color:#D9E2F3;color:#0070C0" %)**Response**
770 |(% style="width:155px" %)(((
771 AT+TTRALARM=0
772 )))|(% style="width:279px" %)(((
773 disable continuous alarm
774 )))|(% style="width:84px" %)(((
775 OK
776 )))
777 |(% style="width:155px" %)(((
778 AT+TTRALARM=60
779 )))|(% style="width:279px" %)(((
780 The alarm interval is 60 minutes (unit: minutes)
781 )))|(% style="width:84px" %)(((
782 OK
783 )))
784
785 (% style="color:blue" %)**Downlink Command:**
786
787 Example:  0C aa  => AT+TTRALARM= aa
788
789
790 === 3.3.10  Select counting mode ===
791
792
793 (% style="color:blue" %)**AT+TTRMODx=a,b**
794
795 When (% style="color:#037691" %)**a=0**(%%), the door is opened to count, and when (% style="color:#037691" %)**a=1**(%%),the closed door is counted.
796
797 When (% style="color:#037691" %)**b=0**(%%), it is the last door open duration, and when (% style="color:#037691" %)**b=1**(%%),the last door close duration.
798
799 (% style="color:blue" %)**AT Command:**
800
801 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
802 |=(% style="width: 155px;background-color:#D9E2F3;color:#0070C0" %)**Command Example**|=(% style="width: 278px;background-color:#D9E2F3;color:#0070C0" %)**Function**|=(% style="width: 77px;background-color:#D9E2F3;color:#0070C0" %)**Response**
803 |(% style="width:155px" %)(((
804 AT+TTRMODx=1,0
805 )))|(% style="width:278px" %)Door closed count and record the last door opened duration|(% style="width:85px" %)(((
806 OK
807 )))
808 |(% style="width:155px" %)(((
809 AT+TTRMODx=0,1
810 )))|(% style="width:278px" %)(((
811 Door opened count and record the last door Door Door open closed duration
812 )))|(% style="width:85px" %)(((
813 OK
814 )))
815
816
817 = 4. Battery & Power Consumption =
818
819
820 DS03A-LB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
821
822 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
823
824
825 = 5. OTA firmware update =
826
827
828 User can change firmware DS03A-LB to:
829
830 * Change Frequency band/ region.
831 * Update with new features.
832 * Fix bugs.
833
834 Firmware and changelog can be downloaded from : **[[Firmware download link>>http://wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/]]**
835
836
837 Methods to Update Firmware:
838
839 * (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/]]
840 * 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]]**.
841
842
843 = 6. FAQ =
844
845
846
847 = 7. Order Info =
848
849
850 Part Number: (% style="color:blue" %)**DS03A-LB-XX**
851
852 (% style="color:red" %)**XX**(%%): The default frequency band
853
854 * (% style="color:red" %)**AS923**(%%): LoRaWAN AS923 band
855
856 * (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band
857
858 * (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band
859
860 * (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band
861
862 * (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band
863
864 * (% style="color:red" %)**US915**(%%): LoRaWAN US915 band
865
866 * (% style="color:red" %)**IN865**(%%): LoRaWAN IN865 band
867
868 * (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band
869
870
871 = 8. ​Packing Info =
872
873
874 (% style="color:#037691" %)**Package Includes**:
875
876 * DS03A-LB LoRaWAN Temperature Sensor
877
878 (% style="color:#037691" %)**Dimension and weight**:
879
880 * Device Size: cm
881
882 * Device Weight: g
883
884 * Package Size / pcs : cm
885
886 * Weight / pcs : g
887
888
889 = 9. Support =
890
891
892 * 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.
893
894 * 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]].