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