Version 17.9 by Xiaoling on 2022/11/12 15:19

Show last authors
1 (% style="text-align:center" %)
2 [[image:image-20221112113258-1.jpeg]]
3
4
5
6
7
8
9
10
11
12
13
14 = 1. Introduction =
15
16 == 1.1 ​What is NDS01 NB-IoT Door Sensor ==
17
18
19 (((
20 The Dragino NDS01 is a (% style="color:blue" %)**NB-IOT Door Sensor**(%%) for Internet of Things solution. It is used to (% style="color:blue" %)**detect the open/close event for door and uplink the event** (%%)to IoT server via NB-IoT network.
21 )))
22
23 (((
24 Besides open/close event, NDS01 also has an internal temperature and humidity sensor which can detect the temperature and humidity inside the sensor.
25 )))
26
27 (((
28 (% style="color:blue" %)**NarrowBand-Internet of Things (NB-IoT)**(%%) is a standards-based low power wide area (LPWA) technology developed to enable a wide range of new IoT devices and services. NB-IoT significantly improves the power consumption of user devices, system capacity and spectrum efficiency, especially in deep coverage.
29 )))
30
31 (((
32 NDS01 is powered by (% style="color:blue" %)**2 x AAA batteries**(%%) for long term use.
33 )))
34
35 (((
36 *The measured temperature is 2~~3 degree higher than the actually environment temperature out of NDS01. 
37 )))
38
39
40 [[image:1668224602353-769.png]]
41
42
43
44 == 1.2 Specifications ==
45
46
47 (% style="color:blue" %)**Common DC Characteristics:**
48
49 * Supply Voltage: 2.1v ~~ 3.6v
50 * Operating Temperature: -10 ~~ 50°C
51
52 (% style="color:blue" %)**NB-IoT Spec:**
53
54 * - B1 @H-FDD: 2100MHz
55 * - B3 @H-FDD: 1800MHz
56 * - B8 @H-FDD: 900MHz
57 * - B5 @H-FDD: 850MHz
58 * - B20 @H-FDD: 800MHz
59 * - B28 @H-FDD: 700MHz
60
61 (% style="color:blue" %)**Power Consumption**
62
63 * IDEL Mode: 10uA @ 3.3v
64 * Max transmit power: <500mA@3.3v
65
66
67
68
69 == 1.3 Features ==
70
71
72 * NB-IoT Bands: B1/B3/B5/B8/B20/B28 @H-FDD
73 * Ultra low power consumption
74 * Door Open / Close Detect
75 * Device remove alarm
76 * Uplink Protocol: TCP or UDP
77 * Uplink on periodically
78 * Micro SIM card slot for NB-IoT SIM
79 * 2 x AAA LR03 Batteries
80
81 == 1.4  ​Applications ==
82
83
84 * Smart Buildings & Home Automation
85 * Logistics and Supply Chain Management
86 * Smart Cities
87 * Smart Factory
88
89 = 2. Use NDS01 to communicate with IoT Server =
90
91 == 2.1 How it works ==
92
93
94 The NDS01 is equipped with a NB-IoT module, the pre-loaded firmware in NDS01 will get environment data from sensors and send the value to local NB-IoT network via the NB-IoT module.  The NB-IoT network will forward this value to IoT server via the protocol defined by NDS01.
95
96 The diagram below shows the working flow in default firmware of NDS01:
97
98
99 == 2.2 Configure the NDS01 ==
100
101 === 2.2.1 Test Requirement ===
102
103
104 To use NDS01 in your city, make sure meet below requirements:
105
106 * Your local operator has already distributed a NB-IoT Network there.
107 * The local NB-IoT network used the band that NDS01 supports.
108 * Your operator is able to distribute the data received in their NB-IoT network to your IoT server.
109
110 Below figure shows our testing structure.Here we have NB-IoT network coverage by China Mobile, the band they use is B8.  The NDS01 will use (% style="color:red" %)UDP(120.24.4.116:5601) (%%)or (% style="color:blue" %)TCP(120.24.4.116:5600)(%%)protocol to send data to IoT server.
111
112
113 [[image:1668224789474-811.png]]
114
115
116 === 2.2.1 Insert SIM card ===
117
118
119 Insert the NB-IoT Card get from your provider.
120
121 User need to take out the NB-IoT module and insert the SIM card like below:
122
123
124 [[image:1668224846067-276.png]]
125
126
127 === 2.2.3 Configure NDS01 ===
128
129
130 User need to configure NDS01 via serial port to set the **Server Address** / **Uplink Topic** to define where and how-to uplink packets. NDS01 support AT Commands, user can use a USB to TTL adapter to connect to NDS01 and use AT Commands to configure it, NDS01 needs to be in the wake-up state when using AT commands,as below.
131
132
133 [[image:1668224930349-417.png]]
134
135
136 (% style="color:blue" %)**Connection:**
137
138 **~ (% style="background-color:yellow" %)USB TTL GND <~-~-~-~-> GND(%%)**
139
140 **~ (% style="background-color:yellow" %)USB TTL TXD  <~-~-~-~-> UART_RXD(%%)**
141
142 **~ (% style="background-color:yellow" %)USB TTL RXD  <~-~-~-~-> UART_TXD(%%)**
143
144
145 In the PC, use below serial tool settings:
146
147 * Baud:  (% style="color:green" %)**9600**
148 * Data bits:**  (% style="color:green" %)8(%%)**
149 * Stop bits:  (% style="color:green" %)**1**
150 * Parity:  (% style="color:green" %)**None**
151 * Flow Control: (% style="color:green" %)**None**
152
153 After powering on the NDS01, the following information will be printed
154
155 [[image:1668225099789-919.png]]
156
157
158 (% style="color:blue" %)**AT command set**
159
160 (% style="color:#037691" %)**1. Set and query the communication protocol**
161
162 **Send: ** AT+PRO=<val>  Val: 0:TCP 1:UDP
163
164 **Reply: **OK
165
166 **Send: ** AT+PRO?  ~/~/ Inquire
167
168 **Reply:** +PRO:0
169
170 OK
171
172
173 (% style="color:#037691" %)**2. Set and query the server address**
174
175 **Send:** AT+SERVADDR=<server>,<port>        
176
177 **Reply:** OK
178
179 **Send:** AT+SERVADDR?  ~/~/ Inquire
180
181 **Reply: **+SERVADDR:<server>,<port>
182
183 OK
184
185
186 (% style="color:#037691" %)**3. Set and query the TDC**
187
188 **Send:** AT+TDC=<value>  ~/~/ Heartbeat time, in seconds, the default is 86400s,which is 24 hours
189
190 **Reply:** OK
191
192 **Send:** AT+TDC?       ~/~/ Inquire
193
194 **Reply:** +TDC:<value>
195
196 OK
197
198
199 (% style="color:#037691" %)**4. Query parameters**
200
201 **Send:** AT+CFG?            
202
203 **Reply:** +PRO:0
204
205 +SERVADDR:120.27.12.119,2023
206
207 +TDC:86400
208
209 +CSQ:31
210
211 +IMEI:868163049937383
212
213 +ICCID:898604611619C0854626
214
215 +IMSI:460048118204626
216
217 OK
218
219
220 (% style="color:#037691" %)**5. Set and query the APN**
221
222 **Send:** AT+APN="<apn>"  ~/~/ Set APN          
223
224 **Reply:** OK
225
226 **Send:** AT+APN?  ~/~/ Inquire
227
228 **Reply:** +APN:"cmiot"
229
230 OK
231
232
233 (% style="color:#037691" %)**6. Alarm and Silencer**
234
235 **Send: **AT+ALARM=<value>  ~/~/ 0~~1,0: mute 1: buzzer alarm (note that no data will be reported, only the buzzer and the red light are on, if it is in silent mode, only the red light is on)
236
237 **Reply:** OK
238
239
240
241 === 2.2.4 Use UDP protocol to uplink data (Default protocol) ===
242
243
244 * (% style="color:blue" %)**AT+PRO=1   **(%%) ~/~/ Set to use UDP protocol to uplink
245 * (% style="color:blue" %)**AT+SERVADDR=119.91.62.30,1999   ** (%%) ~/~/ to set UDP server address and port
246
247 [[image:1668231759500-524.png]]
248
249
250
251 === 2.2.5 Use TCP protocol to uplink data ===
252
253
254 * (% style="color:blue" %)**AT+PRO=0   ** (%%) ~/~/ Set to use TCP protocol to uplink
255 * (% style="color:blue" %)**AT+SERVADDR=119.91.62.30,2002   **(%%) ~/~/ to set TCP server address and port
256
257 [[image:1668231789502-211.png]]
258
259
260
261 === 2.2.6 Change Update Interval ===
262
263
264 User can use below command to change the (% style="color:blue" %)**uplink interval**.
265
266 (% style="color:blue" %)**AT+TDC=86400      ** (%%)~/~/ Set Update Interval to 86400s
267
268
269 (% style="color:red" %)**NOTE:**
270
271 ~1. By default, the device will send an uplink message every 24 hour (86400s).
272
273
274 [[image:1668231824288-204.png]]
275
276
277
278 == 2.3 Uplink Payload ==
279
280
281 registration package, uplink payload includes in total 61 bytes
282
283
284 (% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:510px" %)
285 |(% style="width:50px" %)(((
286 **Size(bytes)**
287 )))|(% style="width:30px" %)**2**|(% style="width:40px" %)**1**|(% style="width:50px" %)**1**|(% style="width:60px" %)**1**|(% style="width:60px" %)**1**|(% style="width:60px" %)**15**|(% style="width:40px" %)**15**|(% style="width:50px" %)**20**|(% style="width:20px" %)**1**|(% style="width:20px" %)**1**|(% style="width:25px" %)**3**
288 |(% style="width:20px" %)**Value**|(% style="width:51px" %)head|(% style="width:68px" %)Version|(% style="width:81px" %)data type|(% style="width:96px" %)Data length|(% style="width:94px" %)device type|(% style="width:80px" %)device ID|(% style="width:49px" %)IMSI|(% style="width:57px" %)ICCID|(% style="width:43px" %)BAT|(% style="width:59px" %)Signal|(% style="width:41px" %)tail
289
290 The payload is ASCII string, representative same HEX: **0x (% style="color:red" %)4B57 (% style="color:blue" %)10 (% style="color:green" %)01 (% style="color:#00b0f0" %)34 (% style="color:#7030a0" %) 01 (% style="color:#d60093" %)383639393735303334343431303832 (% style="color:#0020b0" %)3839383631313230323234303134333938373632 (% style="color:#420042" %)1E (% style="color:#663300" %)15 (% style="color:#660066" %)494F54(%%)**
291
292 **where:**
293
294 * (% style="color:#037691" %)**Head:** (%%)0x4B57(fixed)
295
296 * (% style="color:#037691" %)**Version:** (%%)0x10=”V1.0”
297
298 * (% style="color:#037691" %)**Data type:** (%%)0x01=1(1:register,2:data sending)
299
300 * (% style="color:#037691" %)**Data length:** (%%)0x34=52(Valid data is 52 bytes)
301
302 * (% style="color:#037691" %)**Device type:**(%%) 0x01 = 1(Representative NDS01)
303
304 * (% style="color:#037691" %)**Device ID:** (%%)0x383639393735303334343431303832=869975034441082(ASCII)
305
306 * (% style="color:#037691" %)**IMSI:**(%%) 0x343630313133313138373433373332 = 460113118743732(ASCII)
307
308 * (% style="color:#037691" %)**ICCID:**(%%) 0x3839383631313230323234303134333938373632=89861120224014398762(ASCII)
309
310 * (% style="color:#037691" %)**Bat: **(%%)0x1E = 30/10=3.0V
311
312 * (% style="color:#037691" %)**Signal:**(%%) 0x15=21
313
314 (% style="color:red" %)** 0**(%%)  -113dBm or less
315
316 (% style="color:red" %)** 1**  (%%)-111dBm
317
318 (% style="color:red" %)** 2...30**(%%)  -109dBm... -53dBm
319
320 (% style="color:red" %)** 31**   (%%)-51dBm or greater
321
322 (% style="color:red" %)** 99**   (%%)Not known or not detectable
323
324 * (% style="color:#037691" %)**Tail: **(%%)0x494F54(fixed)
325
326 data upload, uplink payload includes in total 32 bytes
327
328 (% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:510px" %)
329 |(% style="width:50px" %)(((
330 **Size(bytes)**
331 )))|(% style="width:30px" %)**2**|(% style="width:40px" %)**1**|(% style="width:50px" %)**1**|(% style="width:60px" %)**1**|(% style="width:60px" %)**1**|(% style="width:60px" %)**15**|(% style="width:60px" %)**1**
332 |(% style="width:60px" %)**Value**|(% style="width:51px" %)head|(% style="width:68px" %)Version|(% style="width:51px" %)data type|(% style="width:68px" %)Data length|(% style="width:61px" %)device type|(% style="width:64px" %)device ID|(% style="width:57px" %)event type
333
334 (% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:510px" %)
335 |(% style="width:80px" %)**1**|(% style="width:30px" %)**1**|(% style="width:30px" %)**1**|(% style="width:60px" %)**1**|(% style="width:60px" %)**1**|(% style="width:60px" %)**1**|(% style="width:60px" %)**1**|(% style="width:30px" %)**3**
336 |(% style="width:78px" %)Door magnetic state|(% style="width:42px" %)BAT|(% style="width:58px" %)Signal|(% style="width:67px" %)(((
337 Temp
338 integer
339 )))|(% style="width:72px" %)(((
340 Temp
341 decimal
342 )))|(% style="width:67px" %)(((
343 Hum
344 integer
345 )))|(% style="width:69px" %)(((
346 Hum
347 decimal
348 )))|(% style="width:38px" %)tail
349
350
351 The payload is ASCII string, representative same HEX: **0x (% style="color:red" %)4B57 (% style="color:blue" %)10 (% style="color:green" %)02 (% style="color:#00b0f0" %)14 (% style="color:#7030a0" %)01 (% style="color:#d60093" %)383639393735303334343431303832 (% style="color:#a14d07" %)01 (% style="color:#0020b0" %)00 (% style="color:#420042" %)20 (% style="color:#663300" %)15 (% style="color:#660066" %)1c (% style="color:#aaaa40" %)55 (% style="color:#abaa70" %)23 (% style="color:#ba5a70" %)12 (% style="color:purple" %)454F54 (%%)**
352
353 **where:**
354
355 * (% style="color:#037691" %)**Head:** (%%)0x4B57(fixed)
356
357 * (% style="color:#037691" %)**Version:** (%%)0x10=”V1.0”
358
359 * (% style="color:#037691" %)**Data type:** (%%)0x02=2(1:register,2:data sending)
360
361 * (% style="color:#037691" %)**Data length:** (%%)0x14=20(Valid data is 20 bytes)
362
363 * (% style="color:#037691" %)**Device type: **(%%)0x01 = 1(Representative NDS01)
364
365 * (% style="color:#037691" %)**Device ID:** (%%)0x383639393735303334343431303832=869975034441082(ASCII)
366
367 * (% style="color:#037691" %)**Event type:** (%%)0x01
368
369 (% style="color:red" %)** 01:**(%%) TDC
370
371 (% style="color:red" %)** 02:**(%%)** **alarm
372
373 (% style="color:red" %)** 03:**(%%) remove alarm
374
375 (% style="color:red" %)**04: **(%%)dismantling alarm
376
377 (% style="color:red" %)**05:** (%%)remove demolition alarm
378
379 (% style="color:red" %)**06:** (%%)low voltage
380
381 **~ (% style="color:red" %)07: (%%)**remove low voltage
382
383 * (% style="color:#037691" %)**Door magnetic state:** (%%)0x00
384
385 (% style="color:red" %)**00:**(%%) Door sensor is close
386
387 (% style="color:red" %)**01:** (%%)Door sensor is open
388
389 * (% style="color:#037691" %)**Bat:**(%%)** **0x20 = 32/10=3.2V
390
391 * (% style="color:#037691" %)**Signal:**(%%)** **0x15=21
392
393 (% style="color:red" %)** 0**  (%%)-113dBm or less
394
395 (% style="color:red" %)** 1**  (%%)-111dBm
396
397 (% style="color:red" %)** 2...30**(%%) -109dBm... -53dBm
398
399 (% style="color:red" %)** 31**  (%%)-51dBm or greater
400
401 (% style="color:red" %)** 99**  (%%)Not known or not detectable
402
403 * (% style="color:#037691" %)**Temp integer:**(%%) 0x1c=28
404
405 * (% style="color:#037691" %)**Temp decimal:** (%%)0x55=85
406
407 Temp =Temp integer+(Temp decimal)/100=28+85/100=28.85℃
408
409 * (% style="color:#037691" %)**Hum integer:  **(%%)0x23=35
410
411 * (% style="color:#037691" %)**Hum decimal:** (%%)0x12=18
412
413 Hum =Hum integer+(Hum decimal)/100=35+18/100=35.18**%**rh
414
415 * (% style="color:#037691" %)**Tail:** (%%)0x494F54(fixed)
416
417 == 2.4 Node-Red Example ==
418
419
420 Please refer to this link for the use of Node-RED:
421
422 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/Node-RED/>>http://wiki.dragino.com/xwiki/bin/view/Main/Node-RED/]]
423
424 Please visit this link to download the Node-RED process:
425
426 [[https:~~/~~/github.com/dragino/dragino-end-node-decoder/tree/main/Node-RED>>url:https://github.com/dragino/dragino-end-node-decoder/tree/main/Node-RED]]
427
428 [[image:1668234343252-612.png]]
429
430
431
432 == 2.5 Buttons and LED and Mode ==
433
434
435 (% style="color:blue" %)**Operating mode**
436
437 (1) In the self-check mode (the default is the self-check mode when power on for the first time), the state change of the tamper switch does not trigger an alarm;
438
439 (2) In normal working mode, the state change of the tamper switch triggers an alarm;
440
441 (3) In silent mode (the default is non-silent mode when power on for the first time), the buzzer is silent.
442
443
444 (% style="color:blue" %)**led lights**
445
446 (1) After the device is powered on, the green light flashes once;
447
448 (2) The device does not set server parameters or cannot connect to the server, and the green light flashes quickly;
449
450 (3) SIM card recognition fails, the green light is always on for 20s;
451
452 (4) The equipment signal is poor, and the green light flashes once every 3 seconds;
453
454 (5) When the device sends data, the green light flashes twice;
455
456 (6) The communication of the equipment is normal, and the green light flashes 3 times continuously;
457
458 (7) Trigger the tamper switch, the red light is always on for 30s, and goes out when the alarm is canceled;
459
460 (8) Trigger the door magnetic alarm, the red light is always on for 30s, and goes out when the alarm is canceled;
461
462
463 (% style="color:blue" %)**buzzer**
464
465 (1) When the door magnetic alarm is triggered, the buzzer will sound for 30s; after the alarm is restored, the buzzer will be silenced;
466
467 (2) Enter the normal working mode (the tamper switch is closed for more than 5s or the door sensor is locked for more than 5s), the buzzer will sound for 1500ms;
468
469 (3) After entering the normal working mode, the tamper switch does not close, the buzzer sounds for 30s, the tamper switch is closed, and the buzzer sounds 1 time;
470
471 (4) When the door sensor does not alarm, press the button to trigger the alarm, and the buzzer will sound for 30s; when the door sensor alarms, press it once to cancel the alarm, and the buzzer will be silenced.
472
473
474 (% style="color:blue" %)**button**
475
476 (1) When there is no alarm, press it once to trigger the alarm, and the buzzer will sound; when it alarms, press the buzzer to silence the sound.
477
478 (2) Press twice to silence the buzzer;
479
480 (3) Press the button three times or more, when the mute function is turned off, the mute function is turned on, and the green light flashes once; when the mute function is turned on, the mute function is turned off, and the green light flashes once.
481
482
483 (% style="color:blue" %)**data pack**
484
485 (1) The device needs to send a registration packet and a heartbeat packet every time it is powered on and registered;
486
487 (2) The heartbeat time is reported once every 24 hours by default.
488
489
490 = 3. FAQ =
491
492 == 3.1 How to Upgrade Firmware ==
493
494
495 User can upgrade the firmware for 1) bug fix, 2) new feature release.
496
497 Burning software please go to this link to download:
498
499 (% style="color:red" %)**Note:**
500
501 Disconnect one battery before starting the upgrade
502
503 Please use 1.8V USB TO TTL serial port
504
505 (% style="color:blue" %)**Connection:**
506
507 * (% style="background-color:yellow" %)**USB TTL GND <~-~-~-~-> GND**
508
509 * (% style="background-color:yellow" %)**USB TTL TXD  <~-~-~-~-> UART_RXD**
510
511 * (% style="background-color:yellow" %)**USB TTL RXD  <~-~-~-~-> UART_TXD**
512
513 (% style="color:blue" %)**1.  Double-click "FlashTool.exe" to start the program**
514
515
516 [[image:1668234935834-828.png]]
517
518
519 [[image:1668234950508-848.png]]
520
521
522 (% style="color:blue" %)**2.  Select burn serial port and firmware package to complete the upgrade**
523
524 [[image:1668234971869-640.png]]
525
526
527 [[image:1668234993821-197.png]]
528
529
530 (% style="color:blue" %)**3.  Install the battery to the node, and the upgrade will start at this time**
531
532 [[image:1668235018478-767.png]]
533
534
535 (% style="color:blue" %)**4.  The following screenshot appears, indicating that the upgrade has been successful**
536
537 [[image:1668235042540-676.png]]
538
539
540
541 = 4. Order Info =
542
543
544 Part Number: (% style="color:blue" %)**NDS01**
545
546
547 = 5. Packing Info =
548
549
550 (% style="color:#037691" %)**Package Includes**:
551
552 * NDS01 NB-IoT Door Sensor
553
554 (% style="color:#037691" %)**Dimension and weight**:
555
556 * Device Size:
557 * Device Weight:
558 * Package Size / pcs :
559 * Weight / pcs :