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