Last modified by Mengting Qiu on 2024/05/20 14:13

Show last authors
1
2
3
4 (% style="text-align:center" %)
5 [[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/D2x.jpg?rev=1.1||alt="D2x.jpg" height="327" width="1315"]]
6
7
8
9
10
11
12
13
14
15 **Table of Contents:**
16
17 {{toc/}}
18
19
20
21
22
23
24 = 1. Introduction =
25
26 == 1.1 What is D2x-NB NB-IoT Temperature Sensor ==
27
28
29 The Dragino D2x-NB is a (% style="color:blue" %)**NB-IoT Temperature Sensor**(%%) for Internet of Things solution. D2x-NB has 1 ~~ 3 temperature probes. D2x-NB will convert the Temperature reading to upload the sensor data send to IoT platform via NB-IoT network.
30
31 The temperature sensor used in D2x-NB can (% style="color:blue" %)**measure -55°C ~~ 125°C with accuracy ±0.5°C (max ±2.0 °C)**.
32
33 D2x-NB supports (% style="color:blue" %)**temperature alarm feature**(%%), user can set temperature alarm for instant notice. D2x-NB supports Datalog feature, it can save the data when there is no NB-IoT network and uplink when network recover.
34
35 D2x-NB has max 3 probes which measure maximum 3 temperature points.
36
37 D2x-NB supports different uplink methods including (% style="color:blue" %)**MQTT, MQTTs, UDP & TCP**(%%) for different application requirement, and support uplinks to various IoT Servers.
38
39 D2x-NB (% style="color:blue" %)**supports BLE configure and OTA update**(%%) which make user easy to use.
40
41 D2x-NB is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), it is designed for long-term use up to several years.
42
43 D2x-NB has optional built-in SIM card and default IoT server connection version. Which makes it works with simple configuration.
44
45 [[image:image-20230913142955-1.png||height="323" width="937"]]
46
47
48 == 1.2 ​Features ==
49
50
51 * NB-IoT Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85 @H-FDD
52 * Ultra-low power consumption
53 * 1 ~~ 3 External Temperature Probes
54 * Measure range -55°C ~~ 125°C
55 * Temperature alarm
56 * Multiply Sampling and one uplink
57 * Support Bluetooth v5.1 remote configure and update firmware
58 * Uplink on periodically
59 * Downlink to change configure
60 * 8500mAh Battery for long term use
61 * Nano SIM card slot for NB-IoT SIM
62
63 == 1.3 Specification ==
64
65
66 (% style="color:blue" %)**Common DC Characteristics:**
67
68 * Supply Voltage: 2.5v ~~ 3.6v
69 * Operating Temperature: -40 ~~ 85°C
70
71 (% style="color:blue" %)**Temperature Sensor:**
72
73 * Dallas DS18B20
74 * Range: -55 to + 125°C
75 * Accuracy ±0.5°C (max ±2.0 °C)
76
77 (% style="color:blue" %)**NB-IoT Spec:**
78
79 (% style="color:#037691" %)**NB-IoT Module: BC660K-GL**
80
81 (% style="color:#037691" %)**Support Bands:**
82
83 * B1 @H-FDD: 2100MHz
84 * B2 @H-FDD: 1900MHz
85 * B3 @H-FDD: 1800MHz
86 * B4 @H-FDD: 2100MHz
87 * B5 @H-FDD: 860MHz
88 * B8 @H-FDD: 900MHz
89 * B12 @H-FDD: 720MHz
90 * B13 @H-FDD: 740MHz
91 * B17 @H-FDD: 730MHz
92 * B18 @H-FDD: 870MHz
93 * B19 @H-FDD: 870MHz
94 * B20 @H-FDD: 790MHz
95 * B25 @H-FDD: 1900MHz
96 * B28 @H-FDD: 750MHz
97 * B66 @H-FDD: 2000MHz
98 * B70 @H-FDD: 2000MHz
99 * B85 @H-FDD: 700MHz
100
101 (% style="color:blue" %)**Battery:**
102
103 * Li/SOCI2 un-chargeable battery
104 * Capacity: 8500mAh
105 * Self Discharge: <1% / Year @ 25°C
106 * Max continuously current: 130mA
107 * Max boost current: 2A, 1 second
108
109 (% style="color:blue" %)**Power Consumption**
110
111 * STOP Mode: 10uA @ 3.3v
112 * Max transmit power: 350mA@3.3v
113
114 (% class="wikigeneratedid" %)
115 (% style="display:none" %) (%%)
116
117
118 == 1.4 Applications ==
119
120
121 * Smart Buildings & Home Automation
122 * Logistics and Supply Chain Management
123 * Smart Metering
124 * Smart Agriculture
125 * Smart Cities
126 * Smart Factory
127
128 == 1.5 Sleep mode and working mode ==
129
130
131 (% style="color:blue" %)**Deep Sleep Mode: **(%%)Sensor doesn't have any NB-IoT activate. This mode is used for storage and shipping to save battery life.
132
133 (% style="color:blue" %)**Working Mode:** (%%)In this mode, Sensor will work as NB-IoT Sensor to Join NB-IoT 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.
134
135
136 == 1.6 Button & LEDs ==
137
138
139 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675071855856-879.png]]
140
141
142 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
143 |=(% 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**
144 |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
145 If sensor has already attached to NB-IoT network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
146 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
147 )))
148 |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
149 (% 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 attach NB-IoT network.
150 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
151 Once sensor is active, BLE module will be active and user can connect via BLE to configure device, no matter if device attach NB-IoT network or not.
152 )))
153 |(% 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.
154
155 (% style="color:red" %)**Note: When the device is executing a program, the buttons may become invalid. It is best to press the buttons after the device has completed the program execution.**
156
157
158 == 1.7 BLE connection ==
159
160
161 D2x-NB support BLE remote configure and firmware update.
162
163
164 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:
165
166 * Press button to send an uplink
167 * Press button to active device.
168 * Device Power on or reset.
169
170 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
171
172
173 == 1.8 Pin Definitions , Switch & SIM Direction ==
174
175
176 D2x-NB use the mother board from D2x-NB which as below.
177
178 [[image:image-20230819104805-5.png]]
179
180
181 === 1.8.1 Jumper JP2 ===
182
183
184 Power on Device when put this jumper.
185
186
187 === 1.8.2 BOOT MODE / SW1 ===
188
189
190 **1)** (% style="color:blue" %)**ISP**(%%): upgrade mode, device won't have any signal in this mode. but ready for upgrade firmware. LED won't work. Firmware won't run.
191
192 **2)** (% style="color:blue" %)**Flash**(%%): work mode, device starts to work and send out console output for further debug
193
194
195 === 1.8.3 Reset Button ===
196
197
198 Press to reboot the device.
199
200
201 === 1.8.4 SIM Card Direction ===
202
203 See this link. [[How to insert SIM Card>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H2.AttachNetwork]].
204
205
206 == 1.9 Hardware Variant ==
207
208
209 (% border="1" cellspacing="3" style="width:510px" %)
210 |=(% style="width: 102px;background-color:#4F81BD;color:white" %)Model|=(% style="width: 190px;background-color:#4F81BD;color:white" %)Photo|=(% style="width: 218px;background-color:#4F81BD;color:white" %)Probe Info
211 |(% style="width:102px" %)D20-NB|(% style="width:190px" %)[[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-20230526153320-2.jpeg?rev=1.1||alt="image-20230526153320-2.jpeg"]](((
212
213 )))|(% style="width:297px" %)(((
214 1 x DS28B20 Probe
215
216 Cable Length : 2 meters
217
218
219 )))
220 |(% style="width:102px" %)D20S-NB|(% style="width:190px" %)[[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-20230526150859-1.jpeg?rev=1.1||alt="image-20230526150859-1.jpeg"]](((
221
222 )))|(% style="width:297px" %)(((
223 1 x DS28B20 Probe (Suitable for bury in soil)
224
225 Material: TPE, Cable Length: 2meters
226 )))
227 |(% style="width:102px" %)D22-NB|(% style="width:190px" %)[[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-20230526153345-3.jpeg?rev=1.1||alt="image-20230526153345-3.jpeg"]](((
228
229 )))|(% style="width:297px" %)(((
230 2 x DS28B20 Probes
231
232 Cable lengths total 1.5meters per probe
233
234 Cable Drawing: [[See This Link>>url:https://www.dragino.com/downloads/index.php?dir=LoRa_End_Node/LSN50v2-D20/Cable_Drawing/&file=CAB0-35IC-K21G-210811.pdf]]
235 )))
236 |(% style="width:102px" %)(((
237 (((
238 D23-NB
239 )))
240
241 (((
242
243 )))
244 )))|(% style="width:190px" %)[[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-20230526153417-4.jpeg?rev=1.1||alt="image-20230526153417-4.jpeg"]](((
245
246 )))|(% style="width:297px" %)(((
247 3 x DS28B20 Probes
248
249 Cable lengths total 1.5meters per probe
250
251 Cable Drawing: [[See This Link>>url:https://www.dragino.com/downloads/index.php?dir=LoRa_End_Node/LSN50v2-D20/Cable_Drawing/&file=CAB0-35IC-K31G-210811.pdf]]
252 )))
253
254 (% style="display:none" %)
255
256
257
258 = 2. Use D2x-NB to communicate with IoT Server =
259
260 == 2.1 Send data to IoT server via NB-IoT network ==
261
262
263 The D2x-NB is equipped with a NB-IoT module, the pre-loaded firmware in D2x-NB 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 D2x-NB.
264
265 Below shows the network structure:
266
267 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/D20-NB_D20S-NB_D22-NB_D23-NB_NB-IoT_Temperature_Sensor_User_Manual/WebHome/image-20230913142955-1.png?width=937&height=323&rev=1.1||alt="image-20230913142955-1.png"]]
268
269
270 There are two version: (% style="color:blue" %)**-GE**(%%) and (% style="color:blue" %)**-1D**(%%) version of D2x-NB.
271
272
273 (% style="color:blue" %)**GE Version**(%%): This version doesn't include SIM card or point to any IoT server. User needs to use AT Commands to configure below two steps to set D2x-NB send data to IoT server.
274
275 * Install NB-IoT SIM card and configure APN. See instruction of [[Attach Network>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H2.AttachNetwork]].
276
277 * Set up sensor to point to IoT Server. See instruction of [[Configure to Connect Different Servers>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.Configuretoconnecttodifferentservers]]. 
278
279 Below shows result of different server as a glance.
280
281 (% border="1" cellspacing="3" style="width:515px" %)
282 |(% style="background-color:#4f81bd; color:white; width:100px" %)**Servers**|(% style="background-color:#4f81bd; color:white; width:300px" %)**Dash Board**|(% style="background-color:#4f81bd; color:white; width:115px" %)**Comments**
283 |(% style="width:127px" %)[[Node-Red>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.5A0Node-RedA028viaA0MQTT29]]|(% style="width:385px" %)(((
284 (% style="text-align:center" %)
285 [[image:image-20230819113244-8.png||height="183" width="367"]]
286 )))|(% style="width:170px" %)
287 |(% style="width:127px" %)[[DataCake>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.4Datacake]]|(% style="width:385px" %)(((
288 (% style="text-align:center" %)
289 [[image:image-20230819113244-9.png||height="119" width="367"]]
290 )))|(% style="width:170px" %)
291 |(% style="width:127px" %)[[Tago.IO>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.7A0Tago.ioA028viaA0MQTT29]]|(% style="width:385px" %) |(% style="width:170px" %)
292 |(% style="width:127px" %)[[General UDP>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.1GeneralA0UDPA0Connection]]|(% style="width:385px" %)Raw Payload. Need Developer to design Dash Board|(% style="width:170px" %)
293 |(% style="width:127px" %)[[General MQTT>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.2GeneralA0MQTTA0Connection]]|(% style="width:385px" %)Raw Payload. Need Developer to design Dash Board|(% style="width:170px" %)
294 |(% style="width:127px" %)[[ThingSpeak>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.3A0ThingSpeakA028viaA0MQTT29]]|(% style="width:385px" %)(((
295 (% style="text-align:center" %)
296 [[image:image-20230819113244-10.png||height="104" width="367"]]
297 )))|(% style="width:170px" %)
298 |(% style="width:127px" %)[[ThingsBoard>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.6A0ThingsBoard.CloudA028viaA0MQTT29]]|(% style="width:385px" %)(((
299 (% style="text-align:center" %)
300 [[image:image-20230819113244-11.png||height="141" width="367"]]
301 )))|(% style="width:170px" %)
302
303 (% style="color:blue" %)**1D Version**(%%): This version has 1NCE SIM card pre-installed and configure to send value to DataCake. User Just need to select the sensor type in DataCake and Activate D2x-NB and user will be able to see data in DataCake. See here for [[DataCake Config Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.4Datacake]].
304
305
306 == 2.2 ​Payload Types ==
307
308
309 To meet different server requirement, D2x-NB supports different payload type.
310
311 **Includes:**
312
313 * [[General JSON format payload>>||anchor="H2.2.1GeneralJsonFormat28Type3D529"]]. (Type=5)
314
315 * [[HEX format Payload>>||anchor="H2.2.2HEXformatPayload28Type3D029"]]. (Type=0)
316
317 * [[ThingSpeak Format>>||anchor="H2.2.4ThingSpeakPayload28Type3D129"]]. (Type=1)
318
319 * [[ThingsBoard Format>>||anchor="H2.2.3ThingsBoardPayload28Type3D329"]]. (Type=3)
320
321 User can specify the payload type when choose the connection protocol. Example:
322
323 (% style="color:#037691" %)**AT+PRO=2,0**  (%%) ~/~/ Use UDP Connection & hex Payload
324
325 (% style="color:#037691" %)**AT+PRO=2,5**   (%%) ~/~/ Use UDP Connection & Json Payload
326
327 (% style="color:#037691" %)**AT+PRO=3,5 ** (%%) ~/~/ Use MQTT Connection & Json Payload
328
329
330 === 2.2.1 General Json Format(Type~=5) ===
331
332
333 This is the General Json Format. As below:
334
335 (% style="color:#4472c4" %)**{"IMEI":"866207058378443","Model":"D23-NB","temperature1":28.3,"temperature2":28.3,"temperature3":28.2,"battery":3.24,"signal":23,"1":{-409.5,-409.5,-409.5,2023/10/11 05:51:11},"2":{-409.5,-409.5,-409.5,2023/10/11 05:36:11},"3":{-409.5,-409.5,-409.5,2023/10/11 05:21:10},"4":{-409.5,-409.5,-409.5,2023/10/11 05:06:10},"5":{-409.5,-409.5,-409.5,2023/10/11 04:51:11},"6":{-409.5,-409.5,-409.5,2023/10/11 04:36:11},"7":{-409.5,-409.5,-409.5,2023/10/11 04:21:11},"8":{-409.5,-409.5,-409.5,2023/10/11 04:06:10}}**
336
337
338 [[image:image-20231011142613-2.png||height="701" width="946"]]
339
340
341 (% style="color:red" %)**Notice, from above payload:**
342
343 * Temperature , Battery & Signal are the value at uplink time.
344
345 * Json entry 1 ~~ 8 are the last 1 ~~ 8 sampling data as specify by (% style="color:#037691" %)**AT+NOUD=8 ** (%%)Command. Each entry includes (from left to right): Temperature, Sampling time.
346
347 === 2.2.2 HEX format Payload(Type~=0) ===
348
349
350 This is the HEX Format. As below:
351
352 (% style="color:#4472c4" %)**f86620705837844303640cc61801000000011301140113652640edf001f001f001652637cff001f001f0016526344bf001f001f001652630c6f001f001f00165262d42f001f001f001652629bff001f001f0016526263bf001f001f001652622b7f001f001f00165261f32**
353
354 [[image:image-20231011163534-6.png||height="190" width="1111"]]
355
356
357 If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
358
359
360 [[image:image-20231011143052-3.png||height="691" width="938"]]
361
362
363 (% style="color:blue" %)**Version:**
364
365 These bytes include the hardware and software version.
366
367 (% style="color:#037691" %)**Higher byte:**(%%) Specify Sensor Model: 0x03 for D2x-NB
368
369 (% style="color:#037691" %)**Lower byte:**(%%) Specify the software version: 0x64=100, means firmware version 100
370
371
372 (% style="color:blue" %)**BAT (Battery Info):**
373
374 Ex1: 0x0CC6 = 3270mV
375
376
377 (% style="color:blue" %)**Signal Strength:**
378
379 NB-IoT Network signal Strength.
380
381 **Ex1: 0x18 = 24**
382
383 **0**  -113dBm or less
384
385 **1**  -111dBm
386
387 **2...30** -109dBm... -53dBm
388
389 **31**   -51dBm or greater
390
391 **99**    Not known or not detectable
392
393
394 (% style="color:blue" %)**Temperature: **
395
396 If payload is: 0105H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree
397
398 If payload is: FF3FH :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
399
400 (FF3F & 8000: Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
401
402
403 (% style="color:blue" %)**TimeStamp:   **
404
405 Unit TimeStamp Example: 64d49439(H) = 1691653177(D)
406
407 Put the decimal value into this link([[https:~~/~~/www.epochconverter.com)>>https://www.epochconverter.com]]) to get the time.
408
409
410 === 2.2.3 ThingsBoard Payload(Type~=3) ===
411
412
413 Type3 payload special design for ThingsBoard, it will also configure other default server to ThingsBoard.
414
415 (% style="color:#4472c4" %)** {"IMEI": "866207058378443","Model": "S31x-NB","temperature1": 27.3,"temperature2": 27.4,"temperature3": 27.4,"battery": 3.35,"signal": 17}**
416
417
418 [[image:image-20231011155047-5.png||height="507" width="963"]]
419
420
421 === 2.2.4 ThingSpeak Payload(Type~=1) ===
422
423
424 This payload meets ThingSpeak platform requirement. It includes only four fields. Form 1~~5 are:
425
426 Temperature1, Temperature 2, Temperature 3,Battery & Signal. This payload type only valid for ThingsSpeak Platform
427
428 As below:
429
430 (% style="color:#4472c4" %)**field1=temp1 value&field2=temp2 value&field3=temp3 value&field4=Battery value&field5=Signal value**
431
432 [[image:image-20231011152448-4.png||height="972" width="1009"]]
433
434
435 == 2.3 Uplink Payload ==
436
437
438 (((
439 D2x-NB will uplink payload via NB-IoT with below payload format:
440 )))
441
442 (((
443 Uplink payload includes in total 27 bytes.
444 )))
445
446 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
447 |=(% style="width: 60px; background-color:#4F81BD;color:white" %)Size(bytes)|=(% style="width: 40px; background-color:#4F81BD;color:white" %)8|=(% style="width: 30px; background-color:#4F81BD;color:white" %)2|=(% style="width: 30px;background-color:#4F81BD;color:white" %)2|=(% style="width: 50px;background-color:#4F81BD;color:white" %)1|=(% style="background-color: #4F81BD; color: white; width: 30px;" %)1|=(% style="width: 30px;background-color:#4F81BD;color:white" %)2|=(% style="background-color: #4F81BD; color: white; width: 50px;" %)1|=(% style="width: 45px;background-color:#4F81BD;color:white" %)2|=(% style="width: 45px;background-color:#4F81BD;color:white" %)2|=(% style="width: 45px;background-color:#4F81BD;color:white" %)2|=(% style="width: 55px;background-color:#4F81BD;color:white" %)4
448 |(% style="width:95px" %)Value|(% style="width:61px" %)f+IMEI|(% style="width:61px" %)Ver|(% style="width:61px" %)BAT|(% style="width:61px" %)(((
449 Signal Strength
450 )))|(% style="width:49px" %)Mod|(% style="width:79px" %)ADC |(% style="width:61px" %)Interrupt|(% style="width:61px" %)(((
451 Temp1 (% style="color:red" %)**(PC13)**
452 )))|(% style="width:61px" %)(((
453 Temp2 (% style="color:red" %)**(PB9)**
454 )))|(% style="width:61px" %)(((
455 Temp3 (% style="color:red" %)**(PB8)**
456 )))|(% style="width:61px" %)Timestamp
457
458 (((
459 If the cache upload mechanism is turned on, you will receive the payload shown in the figure below.
460 )))
461
462 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:512px" %)
463 |(% style="width:115px" %)**Frame header**|(% style="width:118px" %)**Frame data(1)**|(% style="width:116px" %)**Frame data(2)**|(% style="width:39px" %)**F…**|(% style="width:117px" %)**Frame data(X)**
464
465 === (% style="color:blue" %)**Decode corresponding probe color**(%%) ===
466
467 **D20:**
468
469 Red <~-~-> C1
470
471
472 **D22:**
473
474 White <~-~-> C1 , Red <~-~-> C2
475
476
477 **D23:**
478
479 White <~-~->C1  , Red <~-~-> C2  , Black <~-~-> C3
480
481
482 === (% style="color:blue" %)**Temperature RED or Temperature White**(%%) ===
483
484 (% style="color:red" %)**This point to the Red probe in D20-NB or the probe of D22-NB/D23-NB White**
485
486 When the cache upload mechanism is turned on and the sensor is not identified, the uploaded real-time data is FFFF and the uploaded historical data is F001.
487
488
489 **Example**:
490
491 **Real-time data:**
492
493 If payload is: 0105H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree
494
495 If payload is: FF3FH :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
496
497 (FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
498
499 When no sensor is identified,payload is: FFFFH : (FFFF&8000 == 1),temp = (FFFFH-65536)/10=-409.5 degrees.
500
501 (FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
502
503 **Caching data:**
504
505 If payload is: 0109H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.5 degree
506
507 if payload is: F001H: (F001&8000 == 1),temp = (F001-65536)/10 = -409.5 degrees.
508
509 (F001 & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
510
511
512 === (% style="color:blue" %)**Temperature White**(%%) ===
513
514 (% style="color:red" %)**This point to the Red probe in D22-NB/D23-NB.**
515
516 When the cache upload mechanism is turned on and the sensor is not identified, the uploaded real-time data is FFFF and the uploaded historical data is F001.
517
518
519 **Example**:
520
521 **Real-time data:**
522
523 If payload is: 0105H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree
524
525 If payload is: FF3FH :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
526
527 (FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
528
529 When no sensor is identified,payload is: FFFFH : (FFFF&8000 == 1),temp = (FFFFH-65536)/10=-409.5 degrees.
530
531 (FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
532
533 **Caching data:**
534
535 If payload is: 0109H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.5 degree
536
537 if payload is: F001H: (F001&8000 == 1),temp = (F001-65536)/10 = -409.5 degrees.
538
539 (F001 & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
540
541
542 === (% style="color:blue" %)**Temperature Black**(%%) ===
543
544 (% style="color:red" %)**This point to the BLACK probe in D23-NB**
545
546 When the cache upload mechanism is turned on and the sensor is not identified, the uploaded real-time data is FFFF and the uploaded historical data is F001.
547
548
549 **Example**:
550
551 **Real-time data:**
552
553 If payload is: 0105H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree
554
555 If payload is: FF3FH :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
556
557 (FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
558
559 When no sensor is identified,payload is: **FFFF**H : (FFFF & 8000 == 1),temp = (**FFFF**H - 65536)/10=-409.5 degrees.
560
561 (FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
562
563 **Caching data:**
564
565 If payload is: 0109H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.5 degree
566
567 if payload is: F001H: (F001&8000 == 1),temp = (F001-65536)/10 = -409.5 degrees.
568
569 (F001 & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
570
571
572 == 2.4 Test Uplink and Change Update Interval ==
573
574
575 By default, Sensor will send uplinks (% style="color:blue" %)**every 2 hours**(%%) & AT+NOUD=8
576
577 User can use below commands to change the (% style="color:blue" %)**uplink interval**.
578
579 (% style="color:#037691" %)**AT+TDC=600 ** (%%) ~/~/ Set Update Interval to 600s
580
581 User can also push the button for more than 1 seconds to activate an uplink.
582
583
584 == 2.5 Multi-Samplings and One uplink ==
585
586
587 (% style="color:red" %)**Notice: The AT+NOUD feature is upgraded to Clock Logging, please refer [[Clock Logging Feature>>||anchor="H2.8Clocklogging28Sincefirmwareversionv1.2.129"]].**
588
589 To save battery life, D2x-NB will sample temperature & humidity data every 15 minutes and send one uplink every 2 hours. So each uplink it will include 8 stored data + 1 real-time data. They are defined by:
590
591 * (% style="color:#037691" %)**AT+TR=900**   (%%) ~/~/ The unit is seconds, and the default is to record data once every 900 seconds (15 minutes, the minimum can be set to 180 seconds)
592
593 * (% style="color:#037691" %)**AT+NOUD=8**     (%%)~/~/  The device uploads 8 sets of recorded data by default. Up to 32 sets of record data can be uploaded.
594
595 The diagram below explains the relationship between TR, NOUD, and TDC more clearly:
596
597 [[image:1692424376354-959.png]]
598
599
600 == 2.6 Temperature Alarm Feature ==
601
602
603 D2x-NB work flow with Alarm feature.
604
605 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-D20-D22-D23%20LoRaWAN%20Temperature%20Sensor%20User%20Manual/WebHome/image-20220623090437-1.png?rev=1.1||alt="图片-20220623090437-1.png" height="727" width="1039"]]
606
607
608 === (% style="color:red" %)**Set Alarm Thredhold**(%%) ===
609
610
611 (% style="color:blue" %)**Set for Separate Probes:**
612
613
614 (% style="color:#037691" %)**AT+TEMPALARM1 index=min,max**
615
616 Index:
617
618 * 1: Temperature_Red
619 * 2: Temperature_White
620 * 3: Temperature_Black
621
622 min,max:
623
624 * When min=0, and max≠0, Alarm trigger when higher than max
625 * When min≠0, and max=0, Alarm trigger when lower than min
626 * When min≠0 and max≠0, Alarm trigger when higher than max or lower than min
627
628 **Example:**
629
630 AT+TEMPALARM1=-10,30  ~/~/ Alarm when < -10 or higher than 30.
631
632
633 == 2.7 Trggier an uplink by external interrupt ==
634
635
636 D2x-NB has an external trigger interrupt function. Users can use the PB15 pin to trigger the upload of data packets.
637
638 (% style="color:blue" %)**AT command:**
639
640 * (% style="color:#037691" %)**AT+INTMOD **(%%) ~/~/ Set the trigger interrupt mode
641
642 * (% style="color:#037691" %)**AT+INTMOD=0 **(%%) ~/~/ Disable Interrupt
643
644 * (% style="color:#037691" %)**AT+INTMOD=1 **(%%) ~/~/ Trigger by rising and falling edge
645
646 * (% style="color:#037691" %)**AT+INTMOD=2 **(%%) ~/~/ Trigger by falling edge
647
648 * (% style="color:#037691" %)**AT+INTMOD=3  **(%%) ~/~/ Trigger by rising edge
649
650 == 2.8 Clock logging (Since firmware version v1.2.1) ==
651
652
653 Sometimes when we deploy lots of end nodes in field. We want all sensors sample data at the same time, and upload these data together for analyze. In such case, we can use clock loging feature.
654
655 We can use this command to set the start time of data recording and the time interval to meet the requirements of the specific collection time of data.
656
657 * (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+CLOCKLOG=a,b,c,d(%%)**
658
659 (% style="color:#037691" %)**a: **(%%)**0:** Disable Clock logging.  ** 1: **Enable Clock Logging
660
661 (% style="color:#037691" %)**b: **(%%)Specify First sampling start second: range **(0 ~~ 3599, 65535)   ** ~/~/ (% style="color:red" %)**Note:**(%%)** **If parameter b is set to 65535, the log period starts after the node accesses the network and sends packets.
662
663 (% style="color:#037691" %)**c: **(%%)Specify the sampling interval: range **(0 ~~ 255 minutes)**
664
665 (% style="color:#037691" %)**d: **(%%)How many entries should be uplink on every TDC **(max 32)**
666
667 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SPH01-NB_NB-IoT_Soil_pH_Sensor_User_Manual/WebHome/image-20240315141254-1.png?rev=1.1||alt="image-20240315141254-1.png"]]
668
669 **Example:**
670
671 **AT+CLOCKLOG=1,65535,1,5**
672
673 After the node sends the first packet, data is recorded to the memory at intervals of 1 minute. For each TDC uplink, the uplink load will include: battery information + the last 5 memory records (payload + timestamp).
674
675 (% class="wikigeneratedid" %)
676 [[image:image-20240316154421-1.png||height="558" width="1165"]]
677
678 (% class="wikigeneratedid" %)
679 (% style="color:red" %)**Note: Users need to synchronize the server time before configuring this command. If the server time is not synchronized before this command is configured, the command takes effect only after the node is reset.**
680
681
682 == 2.9 Example Query saved historical records ==
683
684
685 * (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+CDP(%%)**
686
687 This command can be used to search the saved history, recording up to 32 groups of data, each group of historical data contains a maximum of 100 bytes.
688
689 (% class="wikigeneratedid" %)
690 [[image:image-20240316154510-2.png||height="666" width="872"]]
691
692
693 == 2.10 Uplink log query ==
694
695
696 * (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+GETLOG(%%)**
697
698 This command can be used to query upstream logs of data packets.
699
700 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/PS-NB-NA_NB-IoT_Analog_Sensor_User_Manual/WebHome/image-20240407191922-2.png?width=903&height=631&rev=1.1||alt="image-20240407191922-2.png"]]
701
702
703 == 2.11 Scheduled domain name resolution ==
704
705
706 This command is used to set up scheduled domain name resolution.
707
708 (% style="color:blue" %)**AT command:**
709
710 * (% style="color:#037691" %)**AT+DNSTIMER=XX   **(%%)~/~/ Unit: hour
711
712 After setting this command, domain name resolution will be performed regularly.
713
714
715 = 3. Configure D2x-NB =
716
717 == 3.1 Configure Methods ==
718
719
720 D2x-NB supports below configure method:
721
722 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
723
724 * 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]].
725
726 == 3.2 AT Commands Set ==
727
728
729 AT+<CMD>?        : Help on <CMD>
730
731 AT+<CMD>         : Run <CMD>
732
733 AT+<CMD>=<value> : Set the value
734
735 AT+<CMD>=?       : Get the value
736
737
738 (% style="color:blue" %)**General Commands**      
739
740 AT                    : Attention       
741
742 AT?  : Short Help     
743
744 ATZ  : MCU Reset    
745
746 AT+TDC  : Get or set the application data transmission interval in s
747
748 AT+CFG  : Print all configurations
749
750 AT+CFGMOD           : Working mode selection
751
752 AT+DEUI  : Get or set the Device ID
753
754 AT+FDR  : Reset Parameters to Factory Default
755
756 AT+INTMOD            : Get or Set the trigger
757
758 AT+5VT           : Get or Set extend the time of 5V power  
759
760 AT+PRO          : Get or Set usage agreement (1:COAP,2:UDP,3:MQTT,4:TCP)
761
762 AT+APN  : Get or set the APN
763
764 AT+EXT  : Get or Set Count value
765
766 AT+TR  : Get or set SHT record time
767
768 AT+RXDL  : Get or Set the receiving time
769
770 AT+DNSCFG  : Get or Set DNS Server
771
772 AT+CSQTIME : Get or Set the time to join the network
773
774 AT+DNSTIMER : Get or Set the NDS timer
775
776 AT+LDATA  : Get the last upload data
777
778 AT+GETSENSORVALUE  : Returns the current sensor measurement
779
780 AT+NOUD : Get or Set the number of SHT data to be uploaded
781
782 AT+CDP  : Read or Clear cached data
783
784 ATAT+TEMPALARM1  :Get or Set alarm of temp1
785
786 ATAT+TEMPALARM2  :Get or Set alarm of temp2
787
788 ATAT+TEMPALARM3  :Get or Set alarm of temp3
789
790 AT+TLSMOD  : Get or Set the TLS mode
791
792 AT+SERVADDR  :  Server Address
793
794
795 (% style="color:blue" %)**MQTT Management**
796
797 AT+CLIENT               : Get or Set MQTT client
798
799 AT+UNAME              : Get or Set MQTT Username
800
801 AT+PWD                  : Get or Set MQTT password
802
803 AT+PUBTOPIC  : Get or Set MQTT publish topic
804
805 AT+SUBTOPIC  : Get or Set MQTT subscription topic
806
807
808 (% style="color:blue" %)**Information**          
809
810 AT+FDR  : Factory Data Reset
811
812 AT+PWORD  : Serial Access Password
813
814 AT+LDATA  : Get the last upload data
815
816 AT+CDP  : Read or Clear cached data
817
818
819 = 4. Battery & Power Consumption =
820
821
822 D2x-NB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
823
824 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
825
826
827 = 5. Firmware update =
828
829
830 User can change device firmware to::
831
832 * Update with new features.
833
834 * Fix bugs.
835
836 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/rl01j9r0ecspjml/AAACvqfplgTfL_E_Nv-PImMVa?dl=0]]**
837
838 Methods to Update Firmware:
839
840 * (Recommended way) OTA firmware update via BLE: [[**Instruction**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE_Firmware_Update_NB_Sensors_BC660K-GL/]].
841
842 * Update through UART TTL interface : **[[Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/UART_Access_for_NB_ST_BC660K-GL/#H4.2UpdateFirmware28Assumethedevicealreadyhaveabootloader29]]**.
843
844 = 6. FAQ =
845
846 == 6.1 How can I access t BC660K-GL AT Commands? ==
847
848
849 User can access to BC660K-GL directly and send AT Commands.
850
851 [[See BC660K-GL AT Command set>>url:https://www.dropbox.com/sh/5f6ssda5fum8rvs/AABT68l8ZzWOvZ5eg2qwOoFda?dl=0]]
852
853
854
855 == 6.2 How to configure the certificate? ==
856
857
858 User can can refer to this [[description>>url:http://wiki.dragino.com/xwiki/bin/view/How%20to%20configure%20the%20certificate%3F/]] to configure the certificate.
859
860
861 = 7. Order Info =
862
863
864 Part Number: (% style="color:blue" %)**D20-NB-XX  / D20S-NB**(%%)** (designed for used in Soil or Road)/(% style="color:blue" %)D22-NB-XX / D23-NB-XX(%%)**
865
866 (% style="color:red" %)**XX**(%%):
867
868 * (% style="color:#037691" %)**GE**(%%): General version ( Exclude SIM card)
869
870 * (% style="color:#037691" %)**1D**(%%): with 1NCE* 10 years 500MB SIM card and Pre-configure to DataCake server
871
872 (% style="color:#037691" %)**1NCE SIM Card NB-IoT network coverage**(%%): Austria, Belgium, Bulgaria, Croatia, Czech Republic, Denmark, Finland, Germany, Great Britain, Greece, Hungary, Ireland, Italy, Latvia, Malta, Netherlands, Norway, Puerto Rico, Russia, Slovak , Republic, Slovenia, Spain, Sweden, Switzerland, Taiwan, USA, US Virgin Islands
873
874
875 = 8. ​Packing Info =
876
877
878 (% style="color:#037691" %)**Package Includes**:
879
880 * D2x-NB NB-IoT Temperature Sensor x 1
881
882 * External antenna x 1
883
884 (% style="color:#037691" %)**Dimension and weight**:
885
886 * Device Size: cm
887
888 * Device Weight: g
889
890 * Package Size / pcs : cm
891
892 * Weight / pcs : g
893
894 = 9. Support =
895
896
897 * 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.
898
899 * 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]].
900
901 (% style="display:none" %) (%%)
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0