Last modified by Xiaoling on 2025/06/10 10:43

Show last authors
1
2
3
4 [[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" data-xwiki-image-style-alignment="center" height="327" width="1315"]]
5
6
7
8
9
10
11
12
13
14 **Table of Contents:**
15
16 {{toc/}}
17
18
19
20
21
22
23 = 1. Introduction =
24
25 == 1.1 What is D2x-CB NB-IoT/LTE-M Temperature Sensor ==
26
27
28 The Dragino D2x-CB is a (% style="color:blue" %)**NB-IoT/LTE-M Temperature Sensor**(%%) for Internet of Things solution. D2x-CB has 1 ~~ 3 temperature probes. D2x-CB will convert the Temperature reading to upload the sensor data send to IoT platform via NB-IoT/CAT-M1 network.
29
30 The temperature sensor used in D2x-CB can (% style="color:blue" %)**measure -55°C ~~ 125°C with accuracy ±0.5°C (max ±2.0 °C)**.
31
32 D2x-CB supports (% style="color:blue" %)**temperature alarm feature**(%%), user can set temperature alarm for instant notice. D2x-CB supports Datalog feature, it can save the data when there is no NB-IoT network and uplink when network recover.
33
34 D2x-CB has max 3 probes which measure maximum 3 temperature points.
35
36 D2x-CB supports different uplink methods including (% style="color:blue" %)**MQTT, MQTTs, UDP , TCP or CoAP**(%%) for different application requirement, and support uplinks to various IoT Servers.
37
38 D2x-CB (% style="color:blue" %)**supports BLE configure and OTA update**(%%) which make user easy to use.
39
40 D2x-CB is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), it is designed for long-term use up to several years.
41
42 D2x-CB has optional built-in SIM card and default IoT server connection version. Which makes it works with simple configuration.
43
44
45 == 1.2 ​Features ==
46
47
48 * For -NB Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85
49 * For -CB Bands: B1/B2/B3/B4/B5/B8/B12/B13~/~/B18/B19/B20/B25/B28/B66/B71/B85
50 * CAT-M1 / LTE-M Bands: B1/B2/B3/B4/B5/B8/B12/B13/B18/B19/B20/B25/B26/B27/B28/B66/B85
51 * Ultra-low power consumption
52 * 1 ~~ 3 External Temperature Probes
53 * Measure range -55°C ~~ 125°C
54 * Temperature alarm
55 * Multiply Sampling and one uplink
56 * Uplink via MQTT, MQTTs, TCP, UDP or CoAP
57 * GNSS for Location Report
58 * Support Bluetooth v5.1 remote configure and update firmware
59 * Uplink on periodically
60 * Downlink to change configure
61 * 8500mAh Battery for long term use
62 * Nano SIM card slot for NB-IoT SIM
63
64 == 1.3 Specification ==
65
66
67 (% style="color:blue" %)**Common DC Characteristics:**
68
69 * Supply Voltage: 2.6v ~~ 3.6v
70 * Operating Temperature: -40 ~~ 85°C
71
72 (% style="color:blue" %)**Temperature Sensor:**
73
74 * Dallas DS18B20
75 * Range: -55 to + 125°C
76 * Accuracy ±0.5°C (max ±2.0 °C)
77
78 (% style="color:blue" %)**NB-IoT Spec:**
79
80 (% style="color:#037691" %)**NB-IoT Module: BG95-NGFF**
81
82 (% style="color:#037691" %)**Support Bands:**
83
84 * B1 @H-FDD: 2100MHz
85 * B2 @H-FDD: 1900MHz
86 * B3 @H-FDD: 1800MHz
87 * B4 @H-FDD: 2100MHz
88 * B5 @H-FDD: 860MHz
89 * B8 @H-FDD: 900MHz
90 * B12 @H-FDD: 720MHz
91 * B13 @H-FDD: 740MHz
92 * B17 @H-FDD: 730MHz
93 * B18 @H-FDD: 870MHz
94 * B19 @H-FDD: 870MHz
95 * B20 @H-FDD: 790MHz
96 * B25 @H-FDD: 1900MHz
97 * B28 @H-FDD: 750MHz
98 * B66 @H-FDD: 2000MHz
99 * B70 @H-FDD: 2000MHz
100 * B85 @H-FDD: 700MHz
101
102 (% style="color:blue" %)**Battery:**
103
104 * Li/SOCI2 un-chargeable battery
105 * Capacity: 8500mAh
106 * Self Discharge: <1% / Year @ 25°C
107 * Max continuously current: 130mA
108 * Max boost current: 2A, 1 second
109
110 (% style="color:blue" %)**Power Consumption**
111
112 * STOP Mode: 10uA @ 3.3v
113 * Max transmit power: 350mA@3.3v
114
115 (% class="wikigeneratedid" %)
116 (% style="display:none" %) (%%)
117
118
119 == 1.4 Applications ==
120
121
122 * Smart Buildings & Home Automation
123 * Logistics and Supply Chain Management
124 * Smart Metering
125 * Smart Agriculture
126 * Smart Cities
127 * Smart Factory
128
129 == 1.5 Sleep mode and working mode ==
130
131
132 (% style="color:blue" %)**Deep Sleep Mode: **(%%)Sensor doesn't have any NB-IoT/CAT-M1 activate. This mode is used for storage and shipping to save battery life.
133
134 (% 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.
135
136
137 == 1.6 Button & LEDs ==
138
139
140 [[image:image-20250416094301-1.jpeg]]
141
142
143 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
144 |=(% 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**
145 |[[image:1749523353126-965.png]] 1~~3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
146 If sensor has already attached to NB-IoT/CAT-M1 network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
147 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
148 )))
149 |[[image:1749523354648-598.png]] >3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
150 (% 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/CAT-M1 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/CAT-M1 network or not.
152 )))
153 |[[image:1749523294941-943.png]] x5|(% style="width:117px" %)Deactivate Device|(% style="width:225px" %)(% style="color:red" %)**Red led**(%%) will solid on for 5 seconds. Means device is in Deep Sleep Mode.
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-CB 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-CB use the mother board from D2x-CB which as below.
177
178 [[image:image-20240716143323-1.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-CB|(% style="width:190px" %)(((
212 [[image:image-20250416094702-5.png||data-xwiki-image-style-alignment="center" height="125" width="80"]]
213
214 (((
215
216 )))
217 )))|(% style="width:297px" %)(((
218 1 x DS28B20 Probe
219
220 Cable Length : 2 meters
221
222
223 )))
224 |(% style="width:102px" %)D20S-CB|(% style="width:190px" %)(((
225 [[image:image-20250416094645-4.png||data-xwiki-image-style-alignment="center" height="110" width="83"]]
226
227 (((
228
229 )))
230 )))|(% style="width:297px" %)(((
231 1 x DS28B20 Probe (Suitable for bury in soil)
232
233 Material: TPE, Cable Length: 2meters
234 )))
235 |(% style="width:102px" %)D22-CB|(% style="width:190px" %)(((
236 [[image:image-20250416094630-3.png||data-xwiki-image-style-alignment="center" height="114" width="82"]]
237
238 (((
239
240 )))
241 )))|(% style="width:297px" %)(((
242 2 x DS28B20 Probes
243
244 Cable lengths total 1.5meters per probe
245
246 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]]
247 )))
248 |(% style="width:102px" %)(((
249 (((
250 D23-CB
251 )))
252
253 (((
254
255 )))
256 )))|(% style="width:190px" %)(((
257 [[image:image-20250416094613-2.png||data-xwiki-image-style-alignment="center" height="98" width="102"]]
258
259 (((
260
261 )))
262 )))|(% style="width:297px" %)(((
263 3 x DS28B20 Probes
264
265 Cable lengths total 1.5meters per probe
266
267 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]]
268 )))
269
270 (% style="display:none" %)
271
272
273 = 2. Use D2x-CB to communicate with IoT Server =
274
275 == 2.1 Send data to IoT server via NB-IoT/CAT-M1 network ==
276
277
278 The D2x-CB is equipped with a NB-IoT module, the pre-loaded firmware in D2x-CB 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-CB.
279
280 Below shows the network structure:
281
282 [[image:image-20240722084453-1.jpeg]]
283
284
285 There are two version: (% style="color:blue" %)**-GE**(%%) and (% style="color:blue" %)**-1T**(%%) version of D2x-CB.
286
287
288 (% 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-CB send data to IoT server.
289
290 * 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]].
291
292 * 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]]. 
293
294 Below shows result of different server as a glance.
295
296 (% border="1" cellspacing="3" style="width:515px" %)
297 |(% 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**
298 |(% 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" %)(((
299 [[image:image-20230819113244-8.png||data-xwiki-image-style-alignment="center" height="183" width="367"]]
300 )))|(% style="width:170px" %)
301 |(% 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" %)(((
302 [[image:image-20230819113244-9.png||data-xwiki-image-style-alignment="center" height="119" width="367"]]
303 )))|(% style="width:170px" %)
304 |(% 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" %)
305 |(% 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" %)
306 |(% 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" %)
307 |(% 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" %)(((
308 [[image:image-20230819113244-10.png||data-xwiki-image-style-alignment="center" height="104" width="367"]]
309 )))|(% style="width:170px" %)
310 |(% 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" %)(((
311 [[image:image-20230819113244-11.png||data-xwiki-image-style-alignment="center" height="141" width="367"]]
312 )))|(% style="width:170px" %)
313
314 (% style="color:blue" %)**1T Version**(%%): This version has 1NCE SIM card pre-installed and configure to send value to ThingsEye. User Just need to select the sensor type in ThingsEyeand Activate D2x-CB and user will be able to see data in ThingsEye. See here for [[ThingsEye Config Instruction>>url:https://wiki.thingseye.io/xwiki/bin/view/Main/]].
315
316
317 == 2.2 ​Payload Types ==
318
319
320 To meet different server requirement, D2x-CB supports different payload type.
321
322 **Includes:**
323
324 * [[General JSON format payload>>||anchor="H2.2.1GeneralJsonFormat28Type3D529"]]. (Type=5)
325
326 * [[HEX format Payload>>||anchor="H2.2.2HEXformatPayload28Type3D029"]]. (Type=0)
327
328 * [[ThingSpeak Format>>||anchor="H2.2.4ThingSpeakPayload28Type3D129"]]. (Type=1)
329
330 * [[ThingsBoard Format>>||anchor="H2.2.3ThingsBoardPayload28Type3D329"]]. (Type=3)
331
332 User can specify the payload type when choose the connection protocol. Example:
333
334 (% style="color:#037691" %)**AT+PRO=1,0**  (%%) ~/~/ Use COAP Connection & hex Payload
335
336 (% style="color:#037691" %)**AT+PRO=1,5**   (%%) ~/~/ Use COAP Connection & Json Payload
337
338 (% style="color:#037691" %)**AT+PRO=2,0**  (%%) ~/~/ Use UDP Connection & hex Payload
339
340 (% style="color:#037691" %)**AT+PRO=2,5**   (%%) ~/~/ Use UDP Connection & Json Payload
341
342 (% style="color:#037691" %)**AT+PRO=3,0**  (%%) ~/~/ Use MQTT Connection & hex Payload
343
344 (% style="color:#037691" %)**AT+PRO=3,5**   (%%) ~/~/ Use MQTT Connection & Json Payload
345
346 (% style="color:#037691" %)**AT+PRO=4,0**  (%%) ~/~/ Use TCP Connection & hex Payload
347
348 (% style="color:#037691" %)**AT+PRO=4,5 ** (%%) ~/~/ Use TCP Connection & Json Payload
349
350
351 === 2.2.1 General Json Format(Type~=5) ===
352
353
354 **(D23-CB)**This is the General Json Format. As below:
355
356 (% style="color:#4472c4" %)**{"IMEI":"868508065628110","IMSI":"460240210507481","Model":"D23-CB","temperature1":28.1,"temperature2":28.7,"temperature3":28.5,"interrupt":0,"interrupt_level":0,"battery":3.15,"signal":23,"time":"2024-12-09T08:02:48Z","latitude":0.000000,"longitude":0.000000,"gps_time":"1970-01-01T00:00:00Z","1":[204.8,1.0,0.4,"2024-12-09T07:47:05Z"],"2":[204.8,1.0,0.4,"2024-12-09T07:32:05Z"],"3":[23.3,54.2,0.4,"2024-12-09T06:09:17Z"],"4":[23.1,53.9,0.4,"2024-12-09T05:54:17Z"],"5":[22.5,54.8,0.4,"2024-12-09T05:39:17Z"],"6":[21.6,55.2,1.3,"2024-12-09T05:24:17Z"],"7":[21.8,55.1,1.3,"2024-12-09T05:09:17Z"],"8":[21.7,55.4,1.3,"2024-12-09T04:54:17Z"]}**
357
358 [[image:image-20241209160643-1.png]]
359
360
361 (% style="color:red" %)**Notice, from above payload:**
362
363 * Temperature1 , Temperature2, Temperature3, Interrupt, Interrupt_level, Battery, Signal, Latitude, Longitude & GPS_time are the value at uplink time.
364
365 * Json entry 1 ~~ 8 are the last 1 ~~ 8 sampling data as specify by (% style="color:#037691" %)**AT+CLOCKLOG=1,65535,15,8 ** (%%)Command. Each entry includes (from left to right): Temperature1, Temperature2, Temperature3, Sampling time.
366
367 === 2.2.2 HEX format Payload(Type~=0) ===
368
369
370 This is the HEX Format. As below:
371
372 (% style="color:#4472c4" %)**f868508065628110f460240210507481496e0c9218010000000000011c012701206756a5650000000000000000000000000800000a00046756a0790800000a000467569cf500e9021e00046756898d00e7021b00046756860900e1022400046756828500d80228000d67567f0100da0227000d67567b7d00d9022a000d675677f9**
373
374 [[image:image-20241226095653-1.png||height="287" width="1727"]]
375
376
377 If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
378
379 [[image:image-20241209160959-2.png]]
380
381
382 (% style="color:blue" %)**Version:**
383
384 These bytes include the hardware and software version.
385
386 (% style="color:#037691" %)**Higher byte:**(%%) Specify Sensor Model: 0x49 for D2x-CB
387
388 (% style="color:#037691" %)**Lower byte:**(%%) Specify the software version: 0x6e=110, means firmware version 1.1.0
389
390
391 (% style="color:blue" %)**BAT (Battery Info):**
392
393 Ex1: 0x0cea = 3306mV
394
395
396 (% style="color:blue" %)**Signal Strength:**
397
398 NB-IoT Network signal Strength.
399
400 **Ex1: 0x1C = 28**
401
402 **0**  -113dBm or less
403
404 **1**  -111dBm
405
406 **2...30** -109dBm... -53dBm
407
408 **31**   -51dBm or greater
409
410 **99**    Not known or not detectable
411
412
413 (% style="color:blue" %)**ADC:**
414
415 Ex1: 0x0000=0  /The error value is 50mV.
416
417 Ex2: 0x0b94 =2964= 2964.00mv
418
419
420 (% style="color:blue" %)**PA4_level:**
421
422 Level of PA4 pin. (0: Low level  1: High level)
423
424
425 (% style="color:blue" %)**Interrupt:**
426
427 This data field shows if this packet is generated by interrupt or not.
428
429 **Example:**
430
431 If byte[0]&0x01=0x00 : Normal uplink packet.
432
433 If byte[0]&0x01=0x01 : Interrupt Uplink Packet.
434
435
436 (% style="color:blue" %)**Interrupt_level:**
437
438 This byte shows whether the interrupt is triggered by a high or low level.
439
440 **Ex1:** 0x00  Interrupt triggered by falling edge (low level)
441
442 **Ex2: **0x01  Interrupt triggered by rising edge (high level)
443
444
445 (% style="color:blue" %)**Temperature: **
446
447 If payload is: 0105H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree
448
449 If payload is: FF3FH :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
450
451 (FF3F & 8000: Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
452
453 If payload is: FFFF(H): (FFFF & 8000 == 1), Fixed display temp = -409.5℃, Indicates that the DS18B20 sensor is not connected, or no data.
454
455
456 (% style="color:blue" %)**TimeStamp/GPS_Timestamp:   **
457
458 Unit TimeStamp Example: 668613d7(H) = 1720062935(D)
459
460 Put the decimal value into this link([[https:~~/~~/www.epochconverter.com)>>https://www.epochconverter.com]]) to get the time.
461
462
463 (% style="color:blue" %)**Latitude:**
464
465 **Example: **0x015a758e(H)=22705550(D)=22.705550
466
467
468 (% style="color:blue" %)**Longitude:**
469
470 **Example: **0x06cf36da(H)=114243290(D)=114.243290
471
472
473 === 2.2.3 ThingsBoard Payload(Type~=3) ===
474
475
476 Type3 payload special design for ThingsBoard, it will also configure other default server to ThingsBoard.
477
478 (% style="color:#4472c4" %)**{
479 "topic": "002_CB",
480 "payload": {
481 "IMEI": "868508065628110",
482 "IMSI": "460240210507481",
483 "Model": "D23-CB",
484 "temperature1": 28.1,
485 "temperature2": 29.3,
486 "temperature3": 28.8,
487 "interrupt": 0,
488 "interrupt_level": 0,
489 "battery": 3.14,
490 "signal": 24,
491 "time": "2024-12-09T08:14:39Z",
492 "latitude": 0.0,
493 "longitude": 0.0,
494 "gps_time": "1970-01-01T00:00:00Z",
495 "1": [204.8, 1.0, 0.4, "2024-12-09T07:47:05Z"],
496 "2": [204.8, 1.0, 0.4, "2024-12-09T07:32:05Z"],
497 "3": [23.3, 54.2, 0.4, "2024-12-09T06:09:17Z"],
498 "4": [23.1, 53.9, 0.4, "2024-12-09T05:54:17Z"],
499 "5": [22.5, 54.8, 0.4, "2024-12-09T05:39:17Z"],
500 "6": [21.6, 55.2, 1.3, "2024-12-09T05:24:17Z"],
501 "7": [21.8, 55.1, 1.3, "2024-12-09T05:09:17Z"],
502 "8": [21.7, 55.4, 1.3, "2024-12-09T04:54:17Z"]
503 }
504 }**
505
506 [[image:image-20241209161612-3.png||height="462" width="1144"]]
507
508
509 === 2.2.4 ThingSpeak Payload(Type~=1) ===
510
511
512 This payload meets ThingSpeak platform requirement. It includes only four fields. Form 1~~5 are:
513
514 Temperature1, Temperature 2, Temperature 3,Battery & Signal. This payload type only valid for ThingsSpeak Platform
515
516 As below:
517
518 (% style="color:#4472c4" %)**field1=temp1 value&field2=temp2 value&field3=temp3 value&field4=Battery value&field5=Signal value**
519
520 [[image:image-20240710103122-5.png]]
521
522 [[image:image-20240710103236-6.png]]
523
524
525 == 2.3 Uplink Payload ==
526
527
528 (((
529 D2x-CB will uplink payload via NB-IoT with below payload format:
530 )))
531
532 (((
533 Uplink payload includes in total 29 bytes.
534 )))
535
536 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:517px" %)
537 |=(% style="width: 53px; background-color: rgb(79, 129, 189); color: white;" %)Size(bytes)|=(% style="width: 38px; background-color: rgb(79, 129, 189); color: white;" %)8|=(% style="width: 28px; background-color: rgb(79, 129, 189); color: white;" %)2|=(% style="width: 28px;background-color:#4F81BD;color:white" %)2|=(% style="width: 40px; background-color: rgb(79, 129, 189); color: white;" %)1|=(% style="background-color: rgb(79, 129, 189); color: white; width: 30px;" %)1|=(% style="width: 30px; background-color: rgb(79, 129, 189); color: white;" %)2|=(% style="width: 40px; background-color: rgb(79, 129, 189); color: white;" %)1|=(% style="width: 40px; background-color: rgb(79, 129, 189); color: white;" %)1|=(% style="background-color: rgb(79, 129, 189); color: white; width: 42px;" %)1|=(% style="width: 34px; background-color: rgb(79, 129, 189); color: white;" %)2|=(% style="width: 34px; background-color: rgb(79, 129, 189); color: white;" %)2|=(% style="width: 34px; background-color: rgb(79, 129, 189); color: white;" %)2|=(% style="width: 47px; background-color: rgb(79, 129, 189); color: white;" %)4
538 |(% style="width:38px" %)Value|(% style="width:45px" %)f+IMEI|(% style="width:30px" %)Ver|(% style="width:30px" %)BAT|(% style="width:40px" %)(((
539 Signal Strength
540 )))|(% style="width:30px" %)Mod|(% style="width:30px" %)ADC |(% style="width:40px" %)PA4_level|(% style="width:40px" %)Interrupt|(% style="width:42px" %)(((
541 Interrupt
542 _level
543 )))|(% style="width:35px" %)(((
544 Temp1 (% style="color:red" %)**(PC13)**
545 )))|(% style="width:35px" %)(((
546 Temp2 (% style="color:red" %)**(PB9)**
547 )))|(% style="width:35px" %)(((
548 Temp3 (% style="color:red" %)**(PB8)**
549 )))|(% style="width:52px" %)Timestamp
550
551 (((
552 If the cache upload mechanism is turned on, you will receive the payload shown in the figure below.
553 )))
554
555 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:512px" %)
556 |(% 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)**
557
558 === (% style="color:blue" %)**Decode corresponding probe color**(%%) ===
559
560 **D20:**
561
562 Red <~-~-> C1
563
564
565 **D22:**
566
567 White <~-~-> C1 , Red <~-~-> C2
568
569
570 **D23:**
571
572 White <~-~->C1  , Red <~-~-> C2  , Black <~-~-> C3
573
574
575 === (% style="color:blue" %)**Temperature RED or Temperature White**(%%) ===
576
577 (% style="color:red" %)**This point to the Red probe in D20-CB or the probe of D22-CB/D23-CB White**
578
579 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.
580
581
582 **Example**:
583
584 **Real-time data:**
585
586 If payload is: 0105H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree
587
588 If payload is: FF3FH :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
589
590 (FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
591
592 When no sensor is identified,payload is: FFFFH : (FFFF&8000 == 1),temp = (FFFFH-65536)/10=-409.5 degrees.
593
594 (FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
595
596 **Caching data:**
597
598 If payload is: 0109H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.5 degree
599
600 if payload is: F001H: (F001&8000 == 1),temp = (F001-65536)/10 = -409.5 degrees.
601
602 (F001 & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
603
604
605 === (% style="color:blue" %)**Temperature White**(%%) ===
606
607 (% style="color:red" %)**This point to the Red probe in D22-CB/D23-CB.**
608
609 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.
610
611
612 **Example**:
613
614 **Real-time data:**
615
616 If payload is: 0105H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree
617
618 If payload is: FF3FH :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
619
620 (FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
621
622 When no sensor is identified,payload is: FFFFH : (FFFF&8000 == 1),temp = (FFFFH-65536)/10=-409.5 degrees.
623
624 (FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
625
626 **Caching data:**
627
628 If payload is: 0109H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.5 degree
629
630 if payload is: F001H: (F001&8000 == 1),temp = (F001-65536)/10 = -409.5 degrees.
631
632 (F001 & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
633
634
635 === (% style="color:blue" %)**Temperature Black**(%%) ===
636
637 (% style="color:red" %)**This point to the BLACK probe in D23-CB**
638
639 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.
640
641
642 **Example**:
643
644 **Real-time data:**
645
646 If payload is: 0105H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree
647
648 If payload is: FF3FH :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
649
650 (FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
651
652 When no sensor is identified,payload is: **FFFF**H : (FFFF & 8000 == 1),temp = (**FFFF**H - 65536)/10=-409.5 degrees.
653
654 (FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
655
656 **Caching data:**
657
658 If payload is: 0109H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.5 degree
659
660 if payload is: F001H: (F001&8000 == 1),temp = (F001-65536)/10 = -409.5 degrees.
661
662 (F001 & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
663
664
665 = 3. Configure D2x-CB =
666
667 == 3.1 Configure Methods ==
668
669
670 D2x-CB supports below configure method:
671
672 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
673
674 * 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]].
675
676 ​​​
677
678 == 3.2  Serial Access Password ==
679
680
681 After the Bluetooth or UART connection is successful, use the Serial Access Password to enter the AT command window.
682
683 The label on the box of the node will print the initial password: AT+PIN=**xxxxxx**, and directly use the six-digit password to access the AT instruction window.
684
685 [[image:image-20240826182452-2.png]]
686
687
688 If you need to change the password, use **AT+PWORD=**xxxxxx (6 characters), -CB nodes only support lowercase letters.
689
690 [[image:image-20240826182457-3.png]]
691
692
693 (% style="color:red" %)**Note: After entering the command, you need to add a line break, and you can also set automatic line breaks in the Bluetooth tool or UART connection tool.**
694
695 [[image:image-20240826182505-4.png]]
696
697
698 == 3.3 AT Commands Set ==
699
700
701 AT+<CMD>? : Help on <CMD>
702
703 AT+<CMD> : Run <CMD>
704
705 AT+<CMD>=<value> : Set the value
706
707 AT+<CMD>=? : Get the value
708
709
710 (% style="color:blue" %)**General Commands**      
711
712 AT                    : Attention       
713
714 AT?  : Short Help     
715
716 ATZ : Trig a reset of the MCU
717
718 AT+MODEL : Get module information
719
720 AT+CFGMOD : Working mode selection
721
722 AT+DEUI : Get or set the Device ID
723
724 AT+CFG : Print all settings
725
726 AT+SERVADDR: Get or Set the Server address
727
728 AT+TDC : Get or set the application data transmission interval in s
729
730 AT+INTMOD : Get or Set the trigger interrupt mode (0:input,1:falling or rising,2:falling,3:rising)
731
732 AT+APN : Get or set the APN
733
734 AT+5VT : Get or Set extend the time of 5V power
735
736 AT+PRO : Get or Set usage agreement (1:COAP,2:UDP,3:MQTT,4:TCP)
737
738 AT+RXDL : Get or Set the receiving time
739
740 AT+EXT : Get or Set Count value
741
742 ATAT+TEMPALARM1:Get or Set alarm of temp1
743
744 ATAT+TEMPALARM2:Get or Set alarm of temp2
745
746 ATAT+TEMPALARM3:Get or Set alarm of temp3
747
748 AT+GETSENSORVALUE : Returns the current sensor measurement
749
750 AT+DNSCFG : Get or Set DNS Server
751
752 AT+CSQTIME : Get or Set the time to join the network
753
754 AT+GDNS : Get or Set the DNS
755
756 AT+TLSMOD : Get or Set the TLS mode
757
758 AT+SLEEP : Get or Set the sleep mode
759
760 AT+MQOS : Set the QoS level of MQTT
761
762 AT+IPTYPE : Set the IPv4 or IPv6
763
764 AT+QSW : Power on and power off BG95 module
765
766 AT+GETLOG : Print serial port logs
767
768 AT+CLOCKLOG: Get or set SHT record time
769
770 AT+QBAND: Get or set Frequency Band
771
772 AT+IOTMOD: Configure Network Category to be Searched for under LTE RAT
773
774
775 (% style="color:blue" %)**MQTT Management**
776
777 AT+CLIENT : Get or Set the MQTT clientID
778
779 AT+UNAME : Get or Set the MQTT Username
780
781 AT+PWD : Get or Set the MQTT password
782
783 AT+PUBTOPIC: Get or set MQTT publishing topic
784
785 AT+SUBTOPIC: Get or set MQTT subscription topic
786
787
788 (% style="color:blue" %)**Coap Management:**
789
790 AT+URI1: Get or set CoAP option 1
791
792 AT+URI2: Get or set CoAP option 2
793
794 AT+URI3: Get or set CoAP option 3
795
796 AT+URI4: Get or set CoAP option 4
797
798 AT+URI5: Get or set CoAP option 5
799
800 AT+URI6: Get or set CoAP option 6
801
802 AT+URI7: Get or set CoAP option 7
803
804 AT+URI8: Get or set CoAP option 8
805
806
807 (% style="color:blue" %)**GPS:**
808
809 AT+GNSST : Extend the time to turn on GNSS
810
811 AT+GPS : Turn off and on GPS
812
813 AT+GTDC : Get or set GPS positioning interval in units of h
814
815
816 (% style="color:blue" %)**Information**          
817
818 AT+FDR1 : Reset parameters to factory default values except for passwords
819
820 AT+FDR : Reset Parameters to Factory Default
821
822 AT+PWORD : Get or set the System password
823
824 AT+CDP : Read or Clear cached data
825
826 AT+LDATA : Get the last upload data
827
828
829 == 3.4 Test Uplink and Change Update Interval ==
830
831
832 By default, Sensor will send uplinks **every 2 hours.**
833
834 User can use below commands to change the uplink interval.
835
836 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+TDC** (%%)
837
838 Example: AT+TDC=600  ~/~/ Set Update Interval to 600 seconds
839
840 (% style="color:blue" %)**Downlink Commands: **(% style="color:#037691" %)**0x01**
841
842 Format: Command Code (0x01) followed by 3 bytes.
843
844 Example:  12 hours= 43200 seconds  43200(D)=0xA8C0(H)
845
846 Downlink Payload: **01 00 A8 C0**  ~/~/ AT+TDC=43200, Set Update Interval to 12 hours.
847
848 (% style="color:red" %)**Note: User can also push the button for more than 1 seconds to activate an uplink.**
849
850
851 == 3.5 Set the receiving time ==
852
853
854 Feature: Extend the receiving time
855
856 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+RXDL**
857
858 Example: AT+RXDL=1000  ~/~/ Set the receiving time delay to 1000ms
859
860 (% style="color:blue" %)**Downlink Commands: **(% style="color:#037691" %)**0x03**
861
862 Format: Command Code (0x03) followed by 3 bytes.
863
864 Example:  Downlink Payload: **03 00 03 E8     **~/~/ AT+RXDL=1000
865
866
867 == 3.6 Reset ==
868
869
870 Feature: Trig a reset of the MCU.
871
872 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**ATZ**
873
874 (% style="color:blue" %)**Downlink Commands: **(% style="color:#037691" %)**0x04FF**
875
876
877 == 3.7 +5V ==
878
879
880 Feature: Set extend the time of 5V power.
881
882 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+5VT**
883
884 Example: AT+5VT=2000  ~/~/Set extend the time of 5V power to 2000 ms
885
886 (% style="color:blue" %)**Downlink Commands: **(% style="color:#037691" %)**0x05**
887
888 Format: Command Code (0x05) followed by 3 bytes.
889
890 Example:  Downlink Payload: **05 00 07 D0    **~/~/ AT+5VT=2000
891
892
893 == 3.8 Trigger an uplink by external interrupt ==
894
895
896 D2x-CB has an external trigger interrupt function. Users can use the PB15 pin to trigger the upload of data packets.
897
898 (% style="color:red" %)**Note: Starting from firmware v1.3.3, the interrupt pin has been changed from pB15 to pA8.**
899
900 (% style="color:blue" %)**AT command:**
901
902 * (% style="color:#037691" %)**AT+INTMOD **(%%) ~/~/ Set the trigger interrupt mode
903
904 * (% style="color:#037691" %)**AT+INTMOD=0 **(%%) ~/~/ Disable Interrupt
905
906 * (% style="color:#037691" %)**AT+INTMOD=1 **(%%) ~/~/ Trigger by rising and falling edge
907
908 * (% style="color:#037691" %)**AT+INTMOD=2 **(%%) ~/~/ Trigger by falling edge
909
910 * (% style="color:#037691" %)**AT+INTMOD=3  **(%%) ~/~/ Trigger by rising edge
911
912 (% style="color:blue" %)**Downlink Commands: **(% style="color:#037691" %)**0x06**
913
914 Format: Command Code (0x06) followed by 3 bytes.
915
916 Example1:  Downlink Payload: **06 00 00 01    **~/~/AT+INTMOD=1
917
918 Example2:  Downlink Payload: **06 00 00 03    **~/~/AT+INTMOD=3
919
920
921 == 3.9 Set the QoS level ==
922
923
924 This command is used to set the QoS level of **MQTT**.
925
926 (% style="color:blue" %)**AT command:**
927
928 * (% style="color:#037691" %)**AT+MQOS=xx**(%%)**   **~/~/ 0~~2
929
930 (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x07(%%)**
931
932 Format: Command Code (0x07) followed by 1 byte.
933
934 **Ex1:** Downlink payload: **0x0700**  ~/~/ AT+MQOS=0
935
936 **Ex2:** Downlink payload: **0x0701**  ~/~/ AT+MQOS=1
937
938
939 == 3.10 Clock logging ==
940
941
942 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.
943
944 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.
945
946 (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+CLOCKLOG=a,b,c,d(%%)**
947
948 (% style="color:#037691" %)**a: **(%%)**0:** Disable Clock logging.  ** 1: **Enable Clock Logging
949
950 (% 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.
951
952 (% style="color:#037691" %)**c: **(%%)Specify the sampling interval: range **(0 ~~ 255 minutes)**
953
954 (% style="color:#037691" %)**d:**(%%)** **How many entries should be uplink on every TDC **(max 32)**
955
956 (% style="color:red" %)**Note: To disable clock recording, set the following parameters: AT+CLOCKLOG=1,65535,0,0**
957
958 [[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"]]
959
960 **Example:**
961
962 **AT+CLOCKLOG=1,65535,1,5**
963
964 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).
965
966 [[image:image-20240712103240-1.png||height="626" width="1330"]]
967
968
969 (% class="wikigeneratedid" %)
970 (% 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.**
971
972 (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x08(%%)**
973
974 Format: Command Code (0x08) followed by 5 bytes.
975
976 * **Example 1**: Downlink Payload:** 08 01 FFFF 0F 08**  ~/~/ Set SHT record time: AT+CLOCKLOG=1,65535,15,8
977 * **Example 2**: Downlink Payload:** 08 01 04B0 0F 08**  ~/~/ Set SHT record time: AT+CLOCKLOG=1,1200,15,8
978
979 (% style="color:red" %)**Note: When entering the downlink payload, there must be no Spaces between bytes.**
980
981
982 == 3.11 Set the TLS mode ==
983
984
985 Refer to this link ([[MQTT Connection to send data to Tago.io>>http://wiki.dragino.com/xwiki/bin/view/Main/General%20Manual%20for%20-CB%20%2C%20-CS%20models/#H3.7Tago.io28viaMQTT29]])to use the TLS mode.
986
987 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+TLSMOD**
988
989 **Example 1: ** AT+TLSMOD=0,0  ~/~/Disable TLS Mode.
990
991 **Example 2:**  AT+TLSMOD=1,0  ~/~/No authentication
992
993 AT+TLSMOD=1,1  ~/~/Perform server authentication
994
995 AT+TLSMOD=1,2  ~/~/Perform server and client authentication if requested by the remote server
996
997 (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x09(%%)**
998
999 Format: Command Code (0x09) followed by 2 bytes.
1000
1001 Example1:  Downlink Payload: **09 00 00    **~/~/AT+TLSMOD=0,0
1002
1003 Example2:  Downlink Payload: **09 01 02    **~/~/AT+TLSMOD=1,2
1004
1005
1006 == 3.12 Set GNSS open time ==
1007
1008
1009 Extend the time to turn on GNSS. The automatic GPS location time is extended when the node is activated.
1010
1011 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+GNSST**
1012
1013 Example: AT+GNSST=30  ~/~/Set the GPS positioning time to 30 seconds
1014
1015 (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x10(%%)**
1016
1017 Format: Command Code (0x10) followed by 2 bytes.
1018
1019 Example:  Downlink Payload: **10 00 1E    **~/~/AT+GNSST=30
1020
1021
1022 == 3.13 Turn on/off GPS ==
1023
1024
1025 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+GPS **
1026
1027 **Ex1:  **AT+GPS=0  ~/~/Turn off GPS
1028
1029 **Ex2:  **AT+GPS=1  ~/~/Turn on GPS
1030
1031 (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x11(%%)**
1032
1033 Format: Command Code (0x11) followed by 1 byte.
1034
1035 Example:  Downlink Payload: **11 01   **~/~/AT+GPS=1
1036
1037
1038 == 3.14 Set GPS positioning interval ==
1039
1040
1041 Feature: Set GPS positioning interval (unit: hour).
1042
1043 When GPS is enabled, the node automatically locates and uplinks each time it passes **GTDC time** after activation.
1044
1045 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+GTDC**
1046
1047 Example: AT+GTDC=24  ~/~/Set the GPS positioning interval to 24h.
1048
1049 (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x12(%%)**
1050
1051 Format: Command Code (0x12) followed by 3 bytes.
1052
1053 Example: 24 hours:  24(D)=0x18(H)
1054
1055 Downlink Payload: **12 00 00 18  **~/~/AT+GTDC=24
1056
1057
1058 == 3.15 Set the search network time ==
1059
1060
1061 Feature: Get or Set the time to join the network(unit: minutes).
1062
1063 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+CSQTIME**
1064
1065 Example: AT+CSQTIME=10 ~/~/Set the search time to 10 minutes.
1066
1067 (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x13(%%)**
1068
1069 Format: Command Code (0x13) followed by 1 byte.
1070
1071 Example:  Downlink Payload: **13 0A  **~/~/AT+CSQTIME=10
1072
1073
1074 == 3.16 Temperature Alarm Feature ==
1075
1076
1077 D2x-CB work flow with Alarm feature.
1078
1079 [[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"]]
1080
1081
1082 === (% style="color:red" %)**Set Alarm Thredhold**(%%) ===
1083
1084
1085 (% style="color:blue" %)**Set for Separate Probes:**
1086
1087
1088 (% style="color:#037691" %)**AT+TEMPALARM1 index=min,max**
1089
1090 Index:
1091
1092 * 1: Temperature_Red
1093 * 2: Temperature_White
1094 * 3: Temperature_Black
1095
1096 min,max:
1097
1098 * When min=max, Alarm is not enabled
1099 * When min=0, and max≠0, Alarm trigger when higher than max
1100 * When min≠0, and max=0, Alarm trigger when lower than min
1101 * When min≠0 and max≠0, Alarm trigger when higher than max or lower than min
1102
1103 (% style="color:#037691" %)**Downlink command: 0x0A**
1104
1105 Format: Command Code (0x0A) followed by 6 bytes.
1106
1107 The first and second bytes after 0x0A are min and max for temperature 1, the third and fourth bytes are min and max for temperature 2, and the fifth and sixth bytes are min and max for temperature 3.
1108
1109
1110 **Example:**
1111
1112 AT+TEMPALARM1=-10,30  ~/~/ Temperature 1 alarm when < -10 or higher than 30.
1113
1114 AT+TEMPALARM2=20,20  ~/~/ The alarm for temperature 2 is disabled.  ~-~->  Downlink payload: 0A  F6  1E 14 14 00 23                                    
1115
1116 AT+TEMPALARM3=0,35  ~/~/ Temperature 3 alarm when higher than 30.
1117
1118
1119 For the negative temperature x represented in the downlink payload, it can be calculated as follows:  256+x
1120
1121 Ex1: -10℃  256+(-10)= 246(D) =0xF6(H)
1122
1123 Ex2: -25℃  256+(-25)= 231(D) =0xE7(H)
1124
1125
1126 == 3.17 Set the IPv4 or IPv6 ==
1127
1128
1129 This command is used to set IP version.
1130
1131 (% style="color:blue" %)**AT command:**
1132
1133 * (% style="color:#037691; font-weight:bold" %)**AT+IPTYPE**(% style="color:#037691" %)**=1**(%%)**      **~/~/ IPv4
1134 * (% style="color:#037691; font-weight:bold" %)**AT+IPTYPE**(% style="color:#037691" %)**=2**(%%)**      **~/~/ IPv6
1135
1136 == 3.18 Configure Network Category to be Searched for under LTE RAT. ==
1137
1138
1139 (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+IOTMOD=xx(%%)**
1140
1141 (% style="color:#037691" %)**xx:**(%%)  **0:** eMTC
1142
1143 **1:** NB-IoT
1144
1145 **2:** eMTC and NB-IoT
1146
1147
1148 == 3.19 Factory data reset ==
1149
1150
1151 Two different restore factory Settings configurations.
1152
1153 (% style="color:blue" %)**AT command:**
1154
1155 * (% style="color:#037691; font-weight:bold" %)**AT+FDR**(%%)**       **~/~/ Reset Parameters to Factory Default.
1156 * (% style="color:#037691; font-weight:bold" %)**AT+FDR1**(%%)**     **~/~/ Reset parameters to factory default values **except for passwords**.
1157
1158 == 3.20 Set CoAP option ==
1159
1160
1161 Feature: Set CoAP option, follow this link to set up the CoaP protocol.
1162
1163 (% style="color:blue" %)**AT command: **(% style="color:#037691; font-weight:bold" %)**AT+URI1~~AT+URI8**
1164
1165 (% style="color:#037691; font-weight:bold" %)**AT+URI1=11,"i"         **(%%)~/~/ "i/" indicates that the endpoint supports observation mode. In -CB products, fixed  setting AT+URI1=11,"i"
1166
1167 (% style="color:#037691; font-weight:bold" %)**AT+URI2=11,"CoAP endpoint URl"   **(%%)~/~/ 11 is a fixed parameter.
1168
1169 **Example: ** i/13a35fbe-9515-6e55-36e8-081fb6aacf86
1170
1171 AT+URI1=11,"i"
1172
1173 AT+URI2=11,"13a35fbe-9515-6e55-36e8-081fb6aacf86"
1174
1175 ~-~->If multiple groups of CoAP endpoint urls:
1176
1177 AT+URI3=11,"i"
1178
1179 AT+URI4=11,"CoAP endpoint URl"
1180
1181
1182 == 3.21 Power on / power off BG95 module ==
1183
1184
1185 This command is used to power on and power off BG95 module.
1186
1187 * (% style="color:blue" %)**AT command: **(% style="color:#037691" %)**AT+QSW**
1188
1189 The module is powered on after the command is sent for the first time, and powered off after the command is sent again.
1190
1191
1192 [[image:image-20240712104123-5.png||height="626" width="776"]]
1193
1194
1195 == 3.22 Example Query saved historical records ==
1196
1197
1198 * (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+CDP(%%)**
1199
1200 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.
1201
1202 (% class="wikigeneratedid" %)
1203 [[image:image-20240712103848-2.png||height="624" width="771"]]
1204
1205
1206 == 3.23 Uplink log query ==
1207
1208
1209 * (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+GETLOG(%%)**
1210
1211 This command can be used to query upstream logs of data packets.
1212
1213 [[image:image-20240712103938-3.png||height="634" width="779"]]
1214
1215
1216 == 3.24 Set the downlink debugging mode(Since firmware v1.1.0) ==
1217
1218
1219 Feature: Set the conversion between the standard version and 1T version downlinks.
1220
1221 (% style="color:blue" %)**AT command: AT+DOWNTE**
1222
1223 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
1224 |=(% style="width: 138px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 143px; background-color: rgb(79, 129, 189); color: white;" %)**Function/Parameters**|=(% style="width: 229px; background-color: rgb(79, 129, 189); color: white;" %)**Response/Explanation**
1225 |(% style="width:134px" %)AT+DOWNTE=?|(% style="width:143px" %)Get current Settings|(% style="width:229px" %)(((
1226 0,0  (default)
1227 OK
1228 )))
1229 |(% colspan="1" rowspan="2" style="width:134px" %)(((
1230
1231
1232
1233
1234 AT+DOWNTE=a,b
1235 )))|(% style="width:143px" %)**a**: Set the conversion between the downlink of the standard version and 1T version|(% style="width:229px" %)(((
1236 **0**: Set the downlink of the standard version.
1237 **1**: Set the downlink of the 1T version(ThingsEye platform)
1238 )))
1239 |(% style="width:143px" %)**b**: Enable/Disable downlink debugging|(% style="width:229px" %)(((
1240 **0**: Disable downlink debugging mode.
1241 **1**: Enable downlink debugging mode, users can see the original downlink reception.
1242 )))
1243
1244 **Example:**
1245
1246 * AT+DOWNTE=0,1  ~/~/ Set to standard version downlink, and enable downlink debugging.
1247 * AT+DOWNTE=1,1  ~/~/ Set to 1T version downlink, and enable downlink debugging.
1248
1249 (% style="color:blue" %)**Downlink Command:  **
1250
1251 No downlink commands for feature
1252
1253
1254 == 3.25 Domain name resolution settings(Since firmware v1.1.1) ==
1255
1256
1257 Feature: Set static DNS resolution IP address.
1258
1259 (% style="color:blue" %)**AT command: AT+BKDNS**
1260
1261 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
1262 |=(% style="width: 138px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 143px; background-color: rgb(79, 129, 189); color: white;" %)**Function/Parameters**|=(% style="width: 229px; background-color: rgb(79, 129, 189); color: white;" %)**Response/Explanation**
1263 |(% style="width:134px" %)(((
1264 AT+BKDNS=?
1265 )))|(% style="width:143px" %)Get current Settings|(% style="width:606px" %)(((
1266 1,0,NULL  (default)
1267 OK
1268 )))
1269 |(% colspan="1" rowspan="3" style="width:134px" %)(((
1270
1271
1272
1273
1274
1275
1276 AT+BKDNS=a,b,c
1277 )))|(% style="width:143px" %)(((
1278 **a**: Enable/Disable static DNS resolution.
1279 )))|(% style="width:606px" %)(((
1280 **0:** Disable static DNS resolution
1281
1282 **1**: Enable static DNS resolution. The ip address will be saved after the domain name is resolved, if the next domain name resolution fails, the last saved ip address will be used.
1283 )))
1284 |(% style="width:143px" %)**b**: Meaningless.|(% style="width:606px" %)(((
1285 Set to **0**.
1286 )))
1287 |(% style="width:143px" %)(((
1288 **c**: Set the IP address manually.
1289 )))|(% style="width:606px" %)(((
1290 The format is the same as AT+SERVADDR.
1291 If domain name resolution fails, this ip address will be used directly, if domain name resolution succeeds, parameter c will be updated to the successfully resolved IP address.
1292 )))
1293
1294 **Example:**
1295
1296 * AT+BKDNS=0,0,NULL  ~/~/Disable static DNS resolution.
1297 * AT+BKDNS=1,0,NULL  ~/~/ Enable static DNS resolution.
1298 * AT+BKDNS=1,0,3.69.98.183,1883  ~/~/Enable static DNS resolution, if domain name resolution succeeds, the node uses the ip address successfully resolved and saves it to parameter c. If the domain name resolution fails, use the manually set ip address: 3.69.98.183 for communication.
1299
1300 (% style="color:blue" %)**Downlink Command:  **
1301
1302 No downlink commands for feature.
1303
1304
1305 = 4. Battery & Power Consumption =
1306
1307
1308 D2x-CB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
1309
1310 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
1311
1312
1313 = 5. Firmware update =
1314
1315
1316 User can change device firmware to::
1317
1318 * Update with new features.
1319
1320 * Fix bugs.
1321
1322 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/scl/fo/1mzflb9p9kx15btnc11gr/AEp3kdQy4VER0NWQeHrZxZ8/D2x-CB?dl=0&rlkey=ku98jt8u30coqy66saebai2co&subfolder_nav_tracking=1]]**
1323
1324 Methods to Update Firmware:
1325
1326 * (Recommended way) OTA firmware update via BLE: [[**Instruction**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE_Firmware_Update_NB_Sensors_BC660K-GL/]].
1327
1328 * Update through UART TTL interface : **[[Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/UART_Access_for_NB_ST_BC660K-GL/#H4.2UpdateFirmware28Assumethedevicealreadyhaveabootloader29]]**.
1329
1330 = 6. FAQ =
1331
1332 == 6.1 How can I access the BG95-NGFF AT Commands? ==
1333
1334
1335 User can access to BG95-NGFF directly and send AT Commands.
1336
1337 [[See BG95-NGFF AT Command set>>https://www.dropbox.com/scl/fo/1mzflb9p9kx15btnc11gr/ALDWTvDjuVoXvDJuYWCRh5U/Vendor%20Datasheet/BG95?dl=0&rlkey=ku98jt8u30coqy66saebai2co&subfolder_nav_tracking=1]]
1338
1339
1340 == 6.2 General Manual for -CB , -CS models ==
1341
1342
1343 Users can follow the instructions in this [[link>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Manual%20for%20-CB%20%2C%20-CS%20models/]] to see how to configure to connect to different servers.
1344
1345
1346 = 7. Order Info =
1347
1348
1349 Part Number: (% style="color:blue" %)**D20-CB-XX  / D20S-CB**(%%)** (designed for used in Soil or Road)/(% style="color:blue" %)D22-CB-XX / D23-CB-XX(%%)**
1350
1351 (% style="color:red" %)**XX**(%%):
1352
1353 * (% style="color:#037691" %)**GE**(%%): General version ( Exclude SIM card)
1354
1355 * (% style="color:#037691" %)**1T**(%%): with 1NCE* 10 years 500MB SIM card and Pre-configure to ThingsEye server
1356
1357 = 8. ​Packing Info =
1358
1359
1360 (% style="color:#037691" %)**Package Includes**:
1361
1362 * D2x-CB NB-IoT/LTE-M Temperature Sensor x 1
1363
1364 * External antenna x 1
1365
1366 (% style="color:#037691" %)**Dimension and weight**:
1367
1368 * Device Size: cm
1369
1370 * Device Weight: g
1371
1372 * Package Size / pcs : cm
1373
1374 * Weight / pcs : g
1375
1376 = 9. Support =
1377
1378
1379 * 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.
1380
1381 * 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]].
1382
1383 (% style="display:none" %) (%%)