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

Show last authors
1
2
3 [[image:image-20231020174533-1.png||data-xwiki-image-style-alignment="center" height="561" width="443"]]
4
5
6
7
8
9
10 **Table of Contents:**
11
12 {{toc/}}
13
14
15
16
17
18
19 = 1. Introduction =
20
21 == 1.1 What is SDI-12 to NB-IoT Converter ==
22
23
24 The Dragino (% style="color:blue" %)**SDI-12-NB**(%%) is a (% style="color:blue" %)**SDI-12 to NB-IoT Converter **(%%)designed for Smart Agriculture solution.
25
26 SDI-12 (Serial Digital Interface at 1200 baud) is an asynchronous [[serial communications>>url:https://en.wikipedia.org/wiki/Serial_communication]] protocol for intelligent sensors that monitor environment data. SDI-12 protocol is widely used in Agriculture sensor and Weather Station sensors.
27
28 SDI-12-NB has SDI-12 interface and support 12v output to power external SDI-12 sensor. It can get the environment data from SDI-12 sensor and sends out the data via NB-IoT wireless protocol.
29
30 SDI-12-NB 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.
31
32 SDI-12-NB (% style="color:blue" %)**supports BLE configure **(%%)and(% style="color:blue" %)** OTA update**(%%) which make user easy to use.
33
34 SDI-12-NB is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), it is designed for long-term use up to several years.
35
36 SDI-12-NB has optional built-in SIM card and default IoT server connection version. Which makes it works with simple configuration.
37
38
39 == 1.2 ​Features ==
40
41
42 * NB-IoT Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85 @H-FDD
43 * Ultra-low power consumption
44 * Controllable 3.3v, 5v and 12v output to power external sensor
45 * SDI-12 Protocol to connect to SDI-12 Sensor
46 * Multiply Sampling and one uplink
47 * Support Bluetooth v5.1 remote configure and update firmware
48 * Uplink on periodically
49 * Downlink to change configure
50 * 8500mAh Battery for long term use
51 * Uplink via MQTT, MQTTs, TCP, UDP or CoAP
52 * Nano SIM card slot for NB-IoT SIM
53
54 == 1.3 Specification ==
55
56
57 (% style="color:blue" %)**Common DC Characteristics:**
58
59 * Supply Voltage: 2.5v ~~ 3.6v
60 * Support current: 5V 300mA, 12V 100mA
61 * Operating Temperature: -40 ~~ 85°C
62
63 (% style="color:blue" %)**Current Input (DC) Measuring :**
64
65 * Range: 0 ~~ 20mA
66 * Accuracy: 0.02mA
67 * Resolution: 0.001mA
68
69 (% style="color:blue" %)**Voltage Input Measuring:**
70
71 * Range: 0 ~~ 30v
72 * Accuracy: 0.02v
73 * Resolution: 0.001v
74
75 (% style="color:blue" %)**NB-IoT Spec:**
76
77 (% style="color:#037691" %)**NB-IoT Module: BC660K-GL**
78
79 (% style="color:#037691" %)**Support Bands:**
80
81 * B1 @H-FDD: 2100MHz
82 * B2 @H-FDD: 1900MHz
83 * B3 @H-FDD: 1800MHz
84 * B4 @H-FDD: 2100MHz
85 * B5 @H-FDD: 860MHz
86 * B8 @H-FDD: 900MHz
87 * B12 @H-FDD: 720MHz
88 * B13 @H-FDD: 740MHz
89 * B17 @H-FDD: 730MHz
90 * B18 @H-FDD: 870MHz
91 * B19 @H-FDD: 870MHz
92 * B20 @H-FDD: 790MHz
93 * B25 @H-FDD: 1900MHz
94 * B28 @H-FDD: 750MHz
95 * B66 @H-FDD: 2000MHz
96 * B70 @H-FDD: 2000MHz
97 * B85 @H-FDD: 700MHz
98
99 (% style="color:blue" %)**Battery:**
100
101 * Li/SOCI2 un-chargeable battery
102 * Capacity: 8500mAh
103 * Self Discharge: <1% / Year @ 25°C
104 * Max continuously current: 130mA
105 * Max boost current: 2A, 1 second
106
107 (% style="color:blue" %)**Power Consumption**
108
109 * STOP Mode: 10uA @ 3.3v
110 * Max transmit power: 350mA@3.3v
111
112 == 1.4 Connect to SDI-12 Sensor ==
113
114
115 [[image:image-20231102161319-1.png||height="525" width="564"]]
116
117
118 == 1.5 Sleep mode and working mode ==
119
120
121 (% style="color:blue" %)**Deep Sleep Mode: **(%%)Sensor doesn't have any NB-IoT activate. This mode is used for storage and shipping to save battery life.
122
123 (% 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.
124
125
126 == 1.6 Button & LEDs ==
127
128
129 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675071855856-879.png]]
130
131
132 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
133 |=(% 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**
134 |[[image:1749523857708-841.png]] 1~~3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
135 If sensor has already attached to NB-IoT network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
136 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
137 )))
138 |[[image:1749523860312-478.png]] >3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
139 (% style="color:green" %)**Green led**(%%) will fast blink 5 times, device will enter (% style="color:#037691" %)**OTA mode**(%%) for 3 seconds. And then start to attach NB-IoT network.
140 Once sensor is active, BLE module will be active and user can connect via BLE to configure device, no matter if device attach NB-IoT network or not.
141 )))
142 |[[image:1749523820965-449.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.
143
144 (% 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.**
145
146
147 == 1.7 BLE connection ==
148
149
150 SDI-12-NB support BLE remote configure and firmware update.
151
152
153 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:
154
155 * Press button to send an uplink
156 * Press button to active device.
157 * Device Power on or reset.
158
159 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
160
161
162 == 1.8 Pin Definitions , Switch & SIM Direction ==
163
164
165 SDI-12-NB use the mother board which as below.
166
167 [[image:image-20230913113836-1.png||height="330" width="545"]]
168
169
170 === 1.8.1 Jumper JP2 ===
171
172
173 Power on Device when put this jumper.
174
175
176 === 1.8.2 BOOT MODE / SW1 ===
177
178
179 **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.
180
181 **2)** (% style="color:blue" %)**Flash**(%%): work mode, device starts to work and send out console output for further debug
182
183
184 === 1.8.3 Reset Button ===
185
186
187 Press to reboot the device.
188
189
190 === 1.8.4 SIM Card Direction ===
191
192
193 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]].
194
195
196 == 1.9 Mechanical ==
197
198
199
200 [[image:image-20250329140956-4.jpeg]]
201
202
203 = 2. Use SDI-12-NB to communicate with IoT Server =
204
205 == 2.1 Send data to IoT server via NB-IoT network ==
206
207
208 The SDI-12-NB is equipped with a NB-IoT module, the pre-loaded firmware in SDI-12-NB will get environment data from sensors and send the value to local NB-IoT network via the NB-IoT module.  The NB-IoT network will forward this value to IoT server via the protocol defined by SDI-12-NB.
209
210 Below shows the network structure:
211
212 [[image:image-20250416150902-1.png]]
213
214
215 There are two version: (% style="color:blue" %)**-GE**(%%) and (% style="color:blue" %)**-1T**(%%) version of SDI-12-NB.
216
217 (% 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 SDI-12-NB send data to IoT server.
218
219 * 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]].
220
221 * 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]]. 
222
223 Below shows result of different server as a glance.
224
225 (% border="1" cellspacing="3" style="width:515px" %)
226 |(% 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**
227 |(% 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" %)(((
228 [[image:image-20230819113244-8.png||data-xwiki-image-style-alignment="center" height="183" width="367"]]
229 )))|(% style="width:170px" %)
230 |[[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]]|(((
231 (% contenteditable="false" tabindex="-1" %)[[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/S31-CBS31B-CB--NB-IoTLTE-M_Temperature%26Humidity_Sensor_User_Manual/WebHome/image-20230819113244-10.png?width=367&height=104&rev=1.1||alt="image-20230819113244-10.png" height="104" width="367"]]
232 )))|
233 |[[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]]|(((
234 (% contenteditable="false" tabindex="-1" %)[[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/S31-CBS31B-CB--NB-IoTLTE-M_Temperature%26Humidity_Sensor_User_Manual/WebHome/image-20230819113244-11.png?width=367&height=141&rev=1.1||alt="image-20230819113244-11.png" height="141" width="367"]]
235 )))|
236 |(% 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" %)
237 |(% 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" %)
238 |(% 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" %)
239
240 (% 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 SDI-12-NB 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/]].
241
242 == 2.2 ​Payload Types ==
243
244
245 To meet different server requirement, SDI-12-NB supports different payload type.
246
247 **Includes:**
248
249 * [[General JSON format payload>>||anchor="H2.2.1GeneralJsonFormat28Type3D529"]]. (Type=5)
250
251 * [[HEX format Payload>>||anchor="H2.2.2HEXformatPayload28Type3D029"]]. (Type=0)
252
253 User can specify the payload type when choose the connection protocol. Example:
254
255 (% style="color:#037691" %)**AT+PRO=1,0**  (%%) ~/~/ Use COAP Connection & hex Payload
256
257 (% style="color:#037691" %)**AT+PRO=1,5**   (%%) ~/~/ Use COAP Connection & Json Payload
258
259 (% style="color:#037691" %)**AT+PRO=2,0**  (%%) ~/~/ Use UDP Connection & hex Payload
260
261 (% style="color:#037691" %)**AT+PRO=2,5**   (%%) ~/~/ Use UDP Connection & Json Payload
262
263 (% style="color:#037691" %)**AT+PRO=3,0**  (%%) ~/~/ Use MQTT Connection & hex Payload
264
265 (% style="color:#037691" %)**AT+PRO=3,5 ** (%%) ~/~/ Use MQTT Connection & Json Payload
266
267 (% style="color:#037691" %)**AT+PRO=4,0**  (%%) ~/~/ Use TCP Connection & hex Payload
268
269 (% style="color:#037691" %)**AT+PRO=4,5**   (%%) ~/~/ Use TCP Connection & Json Payload
270
271
272 === 2.2.1 General Json Format(Type~=5) ===
273
274
275 This is the General Json Format. As below:
276
277 (% style="color:#4472c4" %)**{"IMEI":"863663062798815","IMSI":"460083513507309","Model":"SDI12-NB","Payload":"01(1)0+1.06+19.9\r\n","battery":3.605,"signal":22,"time":"2024/12/17 01:34:48","1":["01","2024/12/16 05:55:26"],"2":["01","2024/12/16 05:40:26"],"3":["01","2024/12/16 05:25:26"],"4":["01","2024/12/16 05:10:26"],"5":["01","2024/12/16 04:55:26"],"6":["01","2024/12/16 04:40:26"],"7":["01","2024/12/16 04:25:26"],"8":["01","2024/12/16 04:10:26"]}**
278
279 (% style="color:red" %)**Notice: The maximum number of bytes in the Payload is 1 payload version number plus 1374 SDI12 data.**
280
281 [[image:image-20241217094329-1.png||height="592" width="740"]]
282
283 (% style="color:red" %)**Notice, from above payload:**
284
285 * Payload, Battery, Signal, time are the value at uplink time.
286
287 * Json entry 1 ~~ 8 are the last 1 ~~ 8 sampling data as specify by (% style="color:#037691" %)**AT+CLOCKLOG=1,65535,1,8**(%%)** ** Command. Each entry includes (from left to right): Payload  Command. Each entry includes (from left to right): Payload, Sampling time.
288
289 === 2.2.2 HEX format Payload(Type~=0) ===
290
291
292 This is the HEX Format. As below:
293
294 (% style="color:#4472c4" %)**f863663062798815 f460083513507309 1678 0e15 15 00 00 6760d7e6 01 f10d302b312e30362b31392e360d0a 675fc0ce 010000 675fbd4a 010000 675fb9c6 010000 675fb642 010000 675fb2be 010000 675faf3a 010000 675fabb6 010000 675fa832 010000**
295
296 [[image:image-20250321102300-1.png||height="203" width="1377"]]
297
298 [[image:image-20241217100024-2.png||height="620" width="762"]]
299
300 (% style="color:blue" %)**VersDevice ID(f+IMEI): **(%%)f863663062798815 = 863663062798815
301
302 (% style="color:blue" %)**SIM Card ID(f+IMSI):**(%%) f460083513507309 = 460083513507309
303
304 (% style="color:blue" %)**Version:**
305
306 These bytes include the hardware and software version.
307
308 (% style="color:#037691" %)**Higher byte:**(%%) Specify Sensor Model: 0x16 for SDI-12-NB
309
310 (% style="color:#037691" %)**Lower byte:**(%%) Specify the software version: 0x78=120, means firmware version 1.2.0
311
312
313 (% style="color:blue" %)**BAT (Battery Info):**
314
315 Check the battery voltage for SDI-12-NB.
316
317 Ex1: 0x0df4 =  3572mV
318
319 Ex2: 0x0B49 = 2889mV
320
321
322 (% style="color:blue" %)**Signal Strength:**
323
324 NB-IoT Network signal Strength.
325
326 **Ex1: 0x15 = 21**
327
328 **0**  -113dBm or less
329
330 **1**  -111dBm
331
332 **2...30** -109dBm... -53dBm
333
334 **31**   -51dBm or greater
335
336 **99**    Not known or not detectable
337
338
339 (% style="color:blue" %)**GPIO_EXTI Level:**
340
341 GPIO_EXTI is used as Interrupt Pin.
342
343 (% style="color:#037691" %)**Example**:
344
345 01 (H):  GPIO_EXTI pin is high level.
346
347 00 (L):  GPIO_EXTI pin is low level.
348
349
350 (% style="color:blue" %)**GPIO_EXTI Flag:**
351
352 This data field shows if this packet is generated by (% style="color:blue" %)**Interrupt Pin** (%%)or not. 
353
354 Note: The Interrupt Pin is a separate pin in the screw terminal.
355
356 (% style="color:#037691" %)**Example:**
357
358 0x00: Normal uplink packet.
359
360 0x01: Interrupt Uplink Packet.
361
362
363 (% style="color:blue" %)**TimeStamp:   **
364
365 Unit TimeStamp Example: 64e2d74f(H) = 1692587855(D)
366
367 Put the decimal value into this link([[https:~~/~~/www.epochconverter.com)>>https://www.epochconverter.com]])to get the time.
368
369
370 (% style="color:blue" %)**Payload_version: **
371
372 The payload version number is used to parse different decodes.
373
374
375 (% style="color:blue" %)**SDI12_sensor_data:**
376
377 The data returned by the SDI-12 sensor or UART sensor needs to be cut out the AT+DATACUTx  or AT+ALLDATAMOD commands.
378
379
380 == ​2.3 SDI-12 Related Commands ==
381
382
383 User need to configure SDI-12-NB to communicate with SDI-12 sensors otherwise the uplink payload will only include a few bytes.
384
385
386 === 2.3.1 Basic SDI-12 debug command ===
387
388
389 User can run some basic SDI-12 command to debug the connection to the SDI-12 sensor. These commands can be sent via AT Command or NB-IoT downlink command.
390
391 If SDI-12 sensor return value after get these commands, //SDI-12-NB// will uplink the return on FPORT=100, otherwise, if there is no response from SDI-12 sensor. //SDI-12-NB// will uplink NULL (0x 4E 55 4C 4C) to server.
392
393 The following is the display information on the serial port and the server.
394
395
396 [[image:image-20231102163336-2.png||height="287" width="500"]]
397
398
399 [[image:image-20231102163417-5.png||height="83" width="772"]]
400
401
402
403 ==== (% style="color:blue" %)**al!  ~-~- Get SDI-12 sensor Identification**(%%) ====
404
405
406 * AT Command: AT+ADDRI=aa
407 * NB-IoT Downlink(prefix 0xAA00): AA 00 aa
408
409 (% style="color:#037691" %)**Parameter:  **(%%)aa: ASCII value of SDI-12 sensor address in downlink or HEX value in AT Command)
410
411 (% style="color:blue" %)**Example :   **(%%)AT+ADDRI=0 ( Equal to downlink: 0x AA 00 30)
412
413
414 The following is the display information on the serial port and the server.
415
416
417 [[image:image-20231030170258-5.png]]
418
419
420 [[image:image-20231030170155-4.png||height="400" width="1192"]]
421
422 (% style="display:none" %) (%%)
423
424
425 ==== (% style="color:blue" %)**aM!,aMC!, aM1!- aM9!, aMC1!- aMC9!**(%%) ====
426
427
428 (% style="color:red" %)**aM! **(%%): Start Non-Concurrent Measurement
429
430 (% style="color:red" %)**aMC! **(%%): Start Non-Concurrent Measurement – Request CRC
431
432 (% style="color:red" %)**aM1!- aM9! **(%%): Additional Measurements
433
434 (% style="color:red" %)**aMC1!- aMC9!**(%%) : Additional Measurements – Request CRC
435
436
437 * AT Command : AT+ADDRM=0,1,0,1
438
439 (% style="color:#037691" %)**aa**(%%): SDI-12 sensor address.
440
441 (% style="color:#037691" %)**bb**(%%): 0: no CRC, 1: request CRC
442
443 (% style="color:#037691" %)**cc**(%%): 1-9: Additional Measurement, 0: no additional measurement
444
445 (% style="color:#037691" %)**dd**(%%): delay (in second) to send (% style="color:#037691" %)__**aD0!**__(%%) to get return.
446
447
448 The following is the display information on the serial port and the server.
449
450
451 [[image:image-20231030173023-6.png]]
452
453
454 [[image:image-20231030173128-7.png||height="253" width="1114"]]
455
456
457
458 ==== (% style="color:blue" %)**aC!, aCC!,  aC1!- aC9!,  aCC1!- aCC9! **(%%) ====
459
460
461 (% style="color:red" %)**aC!**(%%) : Start Concurrent Measurement
462
463 (% style="color:red" %)**aCC!** (%%): Start Concurrent Measurement – Request CRC
464
465 (% style="color:red" %)**aC1!- aC9!**(%%) : Start Additional Concurrent Measurements
466
467 (% style="color:red" %)**aCC1!- aCC9!**(%%) : Start Additional Concurrent Measurements – Request CRC
468
469
470 * AT Command : AT+ADDRC=0,1,0,1 
471
472 (% style="color:#037691" %)**aa**(%%): SDI-12 sensor address.
473
474 (% style="color:#037691" %)**bb**(%%): 0: no CRC, 1: request CRC
475
476 (% style="color:#037691" %)**cc**(%%): 1-9: Additional Measurement, 0: no additional measurement
477
478 (% style="color:#037691" %)**dd**(%%): delay (in second) to send (% style="color:#037691" %)__**aD0!**__(%%)__ __to get return.
479
480
481 The following is the display information on the serial port and the server.
482
483
484 [[image:image-20231030173510-8.png]]
485
486
487 [[image:image-20231030173533-9.png||height="231" width="1159"]]
488
489
490
491 ==== (% style="color:blue" %)**aR0!- aR9!,  aRC0!- aRC9!**(%%) ====
492
493
494 Start Continuous Measurement
495
496 Start Continuous Measurement – Request CRC
497
498
499 * AT Command : AT+ADDRR=0,1,0,1 
500
501 (% style="color:#037691" %)**aa**(%%): SDI-12 sensor address.
502
503 (% style="color:#037691" %)**bb**(%%): 0: no CRC, 1: request CRC
504
505 (% style="color:#037691" %)**cc**(%%): 1-9: Additional Measurement, 0: no additional measurement
506
507 (% style="color:#037691" %)**dd**(%%): delay (in second) to send (% style="color:#037691" %)__**aD0!**__(%%) to get return.
508
509
510 The following is the display information on the serial port and the server.
511
512
513 [[image:image-20231030173727-10.png]]
514
515
516 [[image:image-20231030173747-11.png||height="237" width="1194"]]
517
518
519 === 2.3.2 Advance SDI-12 Debug command ===
520
521
522 This command can be used to debug all SDI-12 command.(% style="display:none" %)
523
524 (% style="color:blue" %)**Example1: **(%%) AT+CFGDEV =0RC0!,1
525
526 (% style="color:#037691" %)**0RC0! **(%%): SDI-12 Command,
527
528 (% style="color:#037691" %)**1 **(%%): Delay 1 second.  ( 0: 810 mini-second)
529
530 The following is the display information on the serial port and the server.
531
532 [[image:image-20231030174559-13.png]]
533
534 (% style="display:none" %) (%%)
535
536 (% style="color:blue" %)**Example2: **(%%) AT+CFGDEV =0M!,1,1
537
538 (% style="color:#037691" %)**0M! **(%%): SDI-12 Command,
539
540 (% style="color:#037691" %)**1 **(%%): Delay 1 second.  ( 0: 810 mini-second)
541
542 (% style="color:#037691" %)**1 **(%%): Use aD0! command access.
543
544
545 The following is the display information on the serial port and the server.
546
547 [[image:image-20231030174626-14.png]]
548
549
550 === 2.3.3 Convert ASCII to String ===
551
552
553 This command is used to convert between ASCII and String format.
554
555 AT+CONVFORM ( Max length: 80 bytes)
556
557
558 (% style="color:blue" %)**Example:**
559
560 1) AT+CONVFORM=0, string Convert String from String to ASCII
561
562 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SDI-12-LB%20--%20SDI-12%20to%20LoRaWAN%20Converter%20User%20Manual/WebHome/1675214845056-885.png?rev=1.1||alt="1675214845056-885.png"]]
563
564
565 2) AT+CONVFORM=1, ASCII Convert ASCII to String.
566
567 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SDI-12-LB%20--%20SDI-12%20to%20LoRaWAN%20Converter%20User%20Manual/WebHome/1675214856590-846.png?rev=1.1||alt="1675214856590-846.png"]]
568
569
570 === 2.3.4 Define periodically SDI-12 commands and uplink. ===
571
572
573 AT+COMMANDx & AT+DATACUTx
574
575 User can define max 15 SDI-12 Commands (AT+COMMAND1 ~~ AT+COMMANDF). On each uplink period (TDC time, default 20 minutes), SDI-12-NB will send these SDI-12 commands and wait for return from SDI-12 sensors. SDI-12-NB will then combine these returns and uplink via NB-IoT.
576
577
578 * (% style="color:blue" %)**AT Command:**
579
580 (% style="color:#037691" %)**AT+COMMANDx=var1,var2,var3,var4.**
581
582 (% style="color:red" %)**var1**(%%): SDI-12 command , for example: 0RC0!
583
584 (% style="color:red" %)**var2**(%%): Wait timeout for return. (unit: second)
585
586 (% style="color:red" %)**var3**(%%): Whether to send //addrD0!// to get return after var2 timeout. 0: Don't Send //addrD0! //; 1: Send //addrD0!//.
587
588 (% style="color:red" %)**var4**(%%): validation check for return. If return invalid, SDI-12-NB will resend this command. Max 3 retries.
589
590 (% style="color:red" %)**0 **(%%) No validation check;
591
592 (% style="color:red" %)**1** (%%) Check if return chars are printable char(0x20 ~~ 0x7E);
593
594 (% style="color:red" %)**2**(%%)  Check if there is return from SDI-12 sensor
595
596 (% style="color:red" %)**3** (%%) Check if return pass CRC check ( SDI-12 command var1 must include CRC request);
597
598
599 Each AT+COMMANDx is followed by a (% style="color:blue" %)**AT+DATACUT**(%%) command. AT+DATACUT command is used to take the useful string from the SDI-12 sensor so the final payload will have the minimum length to uplink.
600
601
602 (% style="color:blue" %)**AT+DATACUTx**(%%) : This command defines how to handle the return from AT+COMMANDx, max return length is 100 bytes.
603
604 (% border="1" style="width:433px" %)
605 |(% style="background-color:#f2f2f2; width:433px" %)(((
606 (% style="color:#0070c0" %)**AT+DATACUTx=a,b,c**
607
608 **a**:  length for the return of AT+COMMAND
609
610 **b**: 1: grab valid value by byte, max 6 bytes. 2: grab valid value by bytes section, max 3 sections.
611
612 **c**:  define the position for valid value. 
613 )))
614
615 For example, if return from AT+COMMAND1 is “013METER   TER12 112T12-00024895<CR><LF>” , Below AT+DATACUT1 will get different result to combine payload:
616
617
618 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
619 |=(% style="width: 164px;background-color:#4F81BD;color:white" %)**AT+DATACUT1 value**|=(% style="width: 346px;background-color:#4F81BD;color:white" %)**Final Result to combine Payload**
620 |(% style="background-color:#f2f2f2; width:164px" %)34,1,1+2+3|(% style="background-color:#f2f2f2; width:344px" %)0D 00 01 30 31 33
621 |(% style="background-color:#f2f2f2; width:164px" %)34,2,1~~8+12~~16|(% style="background-color:#f2f2f2; width:344px" %)0D 00 01 30 31 33 4D 45 54 45 52 54 45 52 31 32
622 |(% style="background-color:#f2f2f2; width:164px" %)34,2,1~~34|(% style="background-color:#f2f2f2; width:344px" %)0D 00 01 30 31 33 4D 45 54 45 52 20 20 20 54 45 52 31 32 20 31 31 32 54 31 32 2D 30 30 30 32 34 38 39 35 0D 0A
623
624 (% style="color:red" %)**Note : if user use AT+COMMANDx to add a new command, he also need to send AT+DATACUTx downlink.**
625
626
627
628 (% style="color:blue" %)**Clear SDI12 Command**
629
630 The AT+COMMANDx and AT+DATACUTx settings are stored in special location, user can use below command to clear them.
631
632
633 * (% style="color:#037691" %)**AT Command:**
634
635 (% style="color:#4f81bd" %)**AT+CMDEAR=mm,nn** (%%) mm: start position of erase ,nn: stop position of erase
636
637
638 **Etc.** AT+CMDEAR=1,10 means erase AT+COMMAND1/AT+DATACUT1 to AT+COMMAND10/AT+DATACUT10
639
640
641 (% style="color:blue" %)**command combination**
642
643 Below shows a screen shot how the results combines together to a uplink payload.
644
645 (% style="display:none" %) (%%)
646
647 [[image:image-20231102172455-6.png||height="909" width="1014"]]
648
649 If user don't want to use DATACUT for some command, he simply want to uplink all returns. AT+ALLDATAMOD can be set to 1.
650
651 (% style="color:blue" %)**AT+ALLDATAMOD**(%%) will simply get all return and don't do CRC check as result for SDI-12 command. AT+DATACUTx command has higher priority, if AT+DATACUTx has been set, AT+ALLDATAMOD will be ignore for this SDI-12 command.
652
653
654 (% style="color:#4f81bd" %)**For example: **(%%) as below photo, AT+ALLDATAMOD=1, but AT+DATACUT1&2 has been set, AT+DATACUT1 &2will be still effect the result.
655
656
657 [[image:image-20231102172516-7.png||height="819" width="1074"]](% style="display:none" %)
658
659 If AT+ALLDATAMOD=1, (% style="color:#4f81bd" %)**FX,X**(%%) will be added in the payload, (% style="color:#4f81bd" %)**FX**(%%) specify which command is used and (% style="color:#4f81bd" %)**X**(%%) specify the length of return(Hex format), (% style="color:#4f81bd" %)**(X) **(%%)in JSON format will be added to the payload, where (% style="color:#4f81bd" %)**X**(%%) represents the command number.
660
661 for example in above screen, F1 23 means the return is from AT+COMMAND1 and the return is 35 bytes.
662
663
664 == 2.4 Examples To Set SDI commands ==
665
666
667 (% style="color:red" %)**Note: The reading sensor command method of the NB series SDI12 converter is the same as that of the LORA series SDI12 converter.**
668
669
670 === 2.4.1 Examples 1 ~-~- General Example ===
671
672
673 COM port and SDI-12 sensor communication converted to SDI-12-NB and SDI-12 sensor communication.
674
675 [[image:image-20250224095437-1.jpeg]]
676
677
678 (% style="color:blue" %)**1) The AT+COMMANDx command is applied to the red arrow part, and sends the SDI12 command to the SDI12 sensor:**
679
680 a. Send the first command and get the first reply:
681
682 (% style="color:#037691" %)**AT+COMMANDx=1I!,0,0,1**
683
684 b. Send the second command and get the second reply:
685
686 (% style="color:#037691" %)**AT+COMMANDx=2I!,0,0,1**
687
688 c. Send the third command and get the third reply:
689
690 (% style="color:#037691" %)**AT+COMMANDx=3I!,0,0,1**
691
692 d. Send the fourth command and get the fourth reply:
693
694 (% style="color:#037691" %)**AT+COMMANDx=4I!,0,0,1**
695
696 e. Send the fifth command plus the sixth command, get the sixth reply:
697
698 (% style="color:#037691" %)**AT+COMMANDx=1M!,2,1,1**
699
700 f. Send the seventh command plus the eighth command, get the eighth reply:
701
702 (% style="color:#037691" %)**AT+COMMANDx=2M!,2,1,1**
703
704 g. Send the ninth command plus the tenth command, get the tenth reply:
705
706 (% style="color:#037691" %)**AT+COMMANDx=3M!,1,1,1**
707
708 h. Send the eleventh command plus the twelfth command, get the twelfth reply:
709
710 (% style="color:#037691" %)**AT+COMMANDx=4M!,1,1,1**
711
712
713 (% style="color:blue" %)**2) The AT+DATACUTx command is applied to the green arrow part, receiving and cut out data from the SDI12 sensor:**
714
715 a. The first reply, all 34 characters: ”113TRUEBNERSMT100038220303182331<CR><LF>”
716
717 Cut out all characters: (% _mstmutation="1" style="color:#037691" %)**AT+ALLDATAMOD=1 or AT+DATACUTx=34,2,1~~34**(% style="color:#037691" %);
718
719 b. The sixth reply, all 31 characters:”1+19210+1.04+0.00+22.49+11.75<CR><LF>”
720
721 Cut out all characters: (% _mstmutation="1" style="color:#037691" %)**AT+ALLDATAMOD=1 or AT+DATACUTx=31,2,1~~31**(% style="color:#037691" %);
722
723 c. The eighth reply, all 31 characters:”2+18990+1.08+0.00+22.24+11.80<CR><LF>”
724
725 Cut out all characters: (% _mstmutation="1" style="color:#037691" %)**AT+ALLDATAMOD=1 or AT+DATACUTx=31,2,1~~31**(% style="color:#037691" %);
726
727 d. The tenth reply, all 15 characters:”3-2919.8+24.0<CR><LF>”
728
729 Cut out all characters: (% _mstmutation="1" style="color:#037691" %)**AT+ALLDATAMOD=1 or AT+DATACUTx=15,2,1~~15**(% style="color:#037691" %);
730
731 e. The twelfth reply, all 25 characters:”4+30.8+22.84+4.7+954.38<CR><LF>”
732
733 Partial cut, the cut sensor address and the first two parameters:(% style="color:#037691" %)**AT+DATACUTx=25,2,1~~12, cut out the character field ” 4+30.8+22.84”**.
734
735
736 === 2.4.2 Example 2 ~-~- Connect to Hygrovue10 ===
737
738 ==== 2.4.2.1 Reference Manual and Command ====
739
740
741 * [[Hygrovue10 Product Page>>https://www.campbellsci.com/hygrovue10]]
742
743 * Commands to be used in PC and output.
744
745 ~1. check device address
746
747 2. change device address
748
749 3. check device ID
750
751 4. start measure
752
753 5. Get Meausre result
754
755 [[image:image-20250224095543-2.jpeg]]
756
757
758 ==== 2.4.2.2 Hardware Connection to SDI-12-NB ====
759
760 [[image:image-20250224095608-3.jpeg]]
761
762
763 ==== 2.4.2.3 Commands set in SDI-12-NB and uplink payload ====
764
765 [[image:image-20250224095651-4.jpeg]]
766
767 [[image:image-20250224095721-5.jpeg]]
768
769
770
771
772 === 2.4.3 Example 3 ~-~- Connect to SIL-400 ===
773
774 ==== 2.4.3.1 Reference Manual and Command ====
775
776
777 * [[SIL-400 Product Page>>https://www.apogeeinstruments.com/sil-411-commercial-grade-sdi-12-digital-output-standard-field-of-view-infrared-radiometer-sensor/]]
778
779 * Commands to be used in PC and output.
780
781 ~1. check device address
782
783 2. change device address
784
785 3. check device ID
786
787 4. start measure
788
789 5. Get Meausre result
790
791 [[image:image-20250224095926-6.jpeg]]
792
793
794 ==== 2.4.3.2 Hardware Connection to SDI-12-NB ====
795
796 [[image:image-20250224095945-7.jpeg]]
797
798
799 ==== 2.4.3.3 Commands set in SDI-12-NB and uplink payload ====
800
801 [[image:image-20250224100029-8.jpeg]]
802
803 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SDI-12-LB%20--%20SDI-12%20to%20LoRaWAN%20Converter%20User%20Manual/WebHome/image-20230628090323-1.png?width=694&height=414&rev=1.1||alt="image-20230628090323-1.png"]]
804
805
806 === 2.4.4 Example 4 ~-~- Connect to TEROS-12 ===
807
808 ==== 2.4.4.1 Reference Manual and Command ====
809
810
811 * [[TEROS-12 Product Page>>https://www.metergroup.com/en/meter-environment/products/teros-12-soil-moisture-sensor]]
812
813 * Commands to be used in PC and output.
814
815 1.check device address
816
817 2.change device address
818
819 3.check device ID
820
821 4.start measure
822
823 5.Get Meausre result
824
825 [[image:image-20250224100313-10.jpeg]]
826
827
828 ==== 2.4.4.2 Hardware Connection to SDI-12-NB ====
829
830 [[image:image-20250224100232-9.jpeg]]
831
832
833
834 ==== 2.4.4.3 Commands set in SDI-12-NB and uplink payload ====
835
836 [[image:image-20250224100332-11.jpeg]]
837
838 [[image:image-20250224100412-12.jpeg]]
839
840
841 === 2.4.5 Example 5 ~-~- Connect to SIL-400/TEROS-12 & Hygrovue10 ===
842
843 ==== 2.4.5.1 Important Notice! ====
844
845
846 * The product page and reference command see above example 2,3,4
847
848 * All of these SDI-12 sensors use the same address (address 0) by default. So we need to change their address to different address, by using **aAb!** command. See above example.
849
850 * The sensor needs to be powered to a steady statue. So the 12VT time need to be set to the maximum stable time for the sensors. in this example, it is 13 seconds.
851
852 * If these SDI-12 sensors are powered by external power source. It will add 300uA in the total current in SDI-12-NB.
853
854 (% style="display:none" %)
855
856 ==== 2.4.5.2 Hardware Connection to SDI-12-NB ====
857
858 [[image:image-20250224100520-13.jpeg]]
859
860
861 ==== 2.4.5.3 Commands set in SDI-12-NB and uplink payload ====
862
863 [[image:image-20250224100658-14.jpeg]]
864
865 [[image:image-20250224100745-15.jpeg]]
866
867
868 === 2.4.6 Example 6 ~-~- Connect to ENTELECHY-EP_SDI-12 ===
869
870 ==== 2.4.6.1 Reference Manual and Command ====
871
872
873 * [[https:~~/~~/enviroprosoilprobes.com/wp-content/uploads/2019/11/ENTELECHY-EP_SDI-12-Commands.pdf>>url:https://enviroprosoilprobes.com/wp-content/uploads/2019/11/ENTELECHY-EP_SDI-12-Commands.pdf]]
874
875 * Commands to be used in PC and output.
876
877 1.check device address
878
879 2.change device address
880
881 3.check device ID
882
883 4.start measure
884
885 5.Get Meausre result
886
887 [[image:image-20250224100947-16.jpeg]]
888
889
890 ==== 2.4.6.2 Hardware Connection to SDI-12-NB ====
891
892 [[image:image-20250224101100-17.jpeg]]
893
894 (% style="display:none" %) (%%)
895
896 ==== 2.4.6.3 Commands set in SDI-12-NB and uplink payload ====
897
898 [[image:image-20250224101121-18.jpeg]]
899
900 [[image:image-20250224101150-19.jpeg]]
901
902
903 === 2.6.7 Example 7 ~-~- Connect to GroPoint Profile-8 (SDI-12 Version) ===
904
905 ==== 2.6.7.1  Reference Manual and Command ====
906
907
908 * [[https:~~/~~/static1.squarespace.com/static/5db0b690c4990258f8f6d042/t/64189e1ab3ebc54e6947b0c0/1679334941034/2625-N-T+GroPoint+Profile+User+Manual-V1.1.3.pdf>>https://static1.squarespace.com/static/5db0b690c4990258f8f6d042/t/64189e1ab3ebc54e6947b0c0/1679334941034/2625-N-T+GroPoint+Profile+User+Manual-V1.1.3.pdf]]
909
910 * Commands to be used in PC and output.
911
912 1. check device address
913 1. change device address
914 1. check device ID
915 1. start measure
916 1. Get Meausre result
917
918 [[image:image-20250224101241-20.jpeg]]
919
920
921 ==== 2.6.7.2 Hardware Connection to SDI-12-NB ====
922
923
924 **Note: When the bytes returned by the sensor are not fixed, the full byte interception can be used: AT+ALLDATAMOD=1 (The DATACUTx parameter needs to be cleared when using this directive, or it will not work.)**
925
926 [[image:image-20250224101403-21.jpeg]]
927
928
929
930 ==== 2.6.7.3 Commands set in SDI-12-NB and uplink payload ====
931
932 [[image:image-20250224101450-22.jpeg]]
933
934 [[image:image-20250224101515-23.jpeg]]
935
936
937
938 DATA in TTN:
939
940 [[image:image-20250224101600-24.jpeg]]
941
942
943 === 2.6.8 Example 8 ~-~- Connect to Acclima TDR Soil Moisture Sensor ===
944
945 ==== 2.6.8.1  Reference Manual and Command ====
946
947
948 * [[Acclima TDR Soil Moisture Sensor User Manual>>url:https://acclima.com/tdr-soil-moisture-sensor-user-manual/]]
949
950 * Commands to be used in PC and output.
951
952 1. check device address
953 1. change device address
954 1. check device ID
955 1. start measure
956 1. Get Meausre result
957
958 [[image:image-20250224101723-25.jpeg]]
959
960 [[image:image-20250224101859-26.jpeg]]
961
962
963 ==== 2.6.8.2 Hardware Connection to SDI-12-NB ====
964
965
966 **Note: When the bytes returned by the sensor are not fixed, the full byte interception can be used: AT+ALLDATAMOD=1 (The DATACUTx parameter needs to be cleared when using this directive, or it will not work.)**
967
968 [[image:image-20250224102038-27.jpeg]]
969
970
971 ==== 2.6.8.3 Commands set in SDI-12-NB and uplink payload ====
972
973 [[image:image-20250224102105-28.jpeg]]
974
975 [[image:image-20250224102132-29.jpeg]]
976
977
978 DATA in TTN:
979
980 [[image:image-20250224102155-30.jpeg]]
981
982
983 == 2.5 Test Uplink and Change Update Interval ==
984
985
986 By default, Sensor will send uplinks (% style="color:blue" %)**every 2 hours**(%%)
987
988 User can use below commands to change the uplink interval.
989
990 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+TDC**
991
992 Example: AT+TDC=7200  ~/~/ Set Update Interval to 7200 seconds
993
994 (% style="color:blue" %)**Downlink Command**(%%)**: (% style="color:#037691" %)0x01(%%)**
995
996 Format: Command Code (0x01) followed by 3 bytes.
997
998 Example:  12 hours= 43200 seconds  43200(D)=0xA8C0(H)
999
1000 Downlink Payload: **01 00 A8 C0**  ~/~/ AT+TDC=43200, Set Update Interval to 12 hours.
1001
1002 (% style="color:red" %)**Note: User can also push the button for more than 1 second to activate an uplink.**
1003
1004
1005
1006 == 2.6 Trggier an uplink by external interrupt ==
1007
1008
1009 SDI-12-NB has an external trigger interrupt function. Users can use the GPIO_EXTI pin to trigger the upload of data packets.
1010
1011 (% style="color:blue" %)**AT command:**
1012
1013 * (% style="color:#037691" %)**AT+INTMOD **(%%) ~/~/ Set the trigger interrupt mode
1014
1015 * (% style="color:#037691" %)**AT+INTMOD=0 **(%%) ~/~/ Disable Interrupt,as a digital input pin
1016
1017 * (% style="color:#037691" %)**AT+INTMOD=1 **(%%) ~/~/ Trigger by rising and falling edge
1018
1019 * (% style="color:#037691" %)**AT+INTMOD=2 **(%%) ~/~/ Trigger by falling edge
1020
1021 * (% style="color:#037691" %)**AT+INTMOD=3  **(%%) ~/~/ Trigger by rising edge
1022
1023 == 2.7 Set the output time ==
1024
1025
1026 Feature, Control the output 3V3 , 5V or 12V.
1027
1028 (% style="color:blue" %)**AT Command: AT+3V3T**
1029
1030 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:474px" %)
1031 |=(% style="width: 154px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 201px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 119px;background-color:#4F81BD;color:white" %)**Response**
1032 |(% style="background-color:#f2f2f2; width:154px" %)AT+3V3T=?|(% style="background-color:#f2f2f2; width:201px" %)Show 3V3 open time.|(% style="background-color:#f2f2f2; width:116px" %)(((
1033 0
1034 OK
1035 )))
1036 |(% style="background-color:#f2f2f2; width:154px" %)AT+3V3T=0|(% style="background-color:#f2f2f2; width:201px" %)Normally open 3V3 power supply.|(% style="background-color:#f2f2f2; width:116px" %)(((
1037 OK
1038 default setting
1039 )))
1040 |(% style="background-color:#f2f2f2; width:154px" %)AT+3V3T=1000|(% style="background-color:#f2f2f2; width:201px" %)Close after a delay of 1000 milliseconds.|(% style="background-color:#f2f2f2; width:116px" %)(((
1041 OK
1042 )))
1043 |(% style="background-color:#f2f2f2; width:154px" %)AT+3V3T=65535|(% style="background-color:#f2f2f2; width:201px" %)Normally closed 3V3 power supply.|(% style="background-color:#f2f2f2; width:116px" %)(((
1044 OK
1045 )))
1046
1047 (% style="color:blue" %)**AT Command: AT+5VT**
1048
1049 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:470px" %)
1050 |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 196px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 119px;background-color:#4F81BD;color:white" %)**Response**
1051 |(% style="background-color:#f2f2f2; width:155px" %)AT+5VT=?|(% style="background-color:#f2f2f2; width:196px" %)Show 5V open time.|(% style="background-color:#f2f2f2; width:114px" %)(((
1052 0
1053 OK
1054 )))
1055 |(% style="background-color:#f2f2f2; width:155px" %)AT+5VT=0|(% style="background-color:#f2f2f2; width:196px" %)Normally closed 5V power supply.|(% style="background-color:#f2f2f2; width:114px" %)(((
1056 OK
1057 default setting
1058 )))
1059 |(% style="background-color:#f2f2f2; width:155px" %)AT+5VT=1000|(% style="background-color:#f2f2f2; width:196px" %)Close after a delay of 1000 milliseconds.|(% style="background-color:#f2f2f2; width:114px" %)(((
1060 OK
1061 )))
1062 |(% style="background-color:#f2f2f2; width:155px" %)AT+5VT=65535|(% style="background-color:#f2f2f2; width:196px" %)Normally open 5V power supply.|(% style="background-color:#f2f2f2; width:114px" %)(((
1063 OK
1064 )))
1065
1066 (% style="color:blue" %)**AT Command: AT+12VT **
1067
1068 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:443px" %)
1069 |=(% style="width: 156px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 199px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 88px;background-color:#4F81BD;color:white" %)**Response**
1070 |(% style="background-color:#f2f2f2; width:156px" %)AT+12VT=?|(% style="background-color:#f2f2f2; width:199px" %)Show 12V open time.|(% style="background-color:#f2f2f2; width:83px" %)(((
1071 0
1072 OK
1073 )))
1074 |(% style="background-color:#f2f2f2; width:156px" %)AT+12VT=0|(% style="background-color:#f2f2f2; width:199px" %)Normally closed 12V power supply.|(% style="background-color:#f2f2f2; width:83px" %)OK
1075 |(% style="background-color:#f2f2f2; width:156px" %)AT+12VT=500|(% style="background-color:#f2f2f2; width:199px" %)Close after a delay of 500 milliseconds.|(% style="background-color:#f2f2f2; width:83px" %)(((
1076 OK
1077 )))
1078
1079 == 2.8 Set the all data mode ==
1080
1081
1082 Feature, Set the all data mode.
1083
1084 (% style="color:blue" %)**AT Command: AT+ALLDATAMOD**
1085
1086 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:437px" %)
1087 |=(% style="background-color:#4F81BD;color:white" %)**Command Example**|=(% style="background-color:#4F81BD;color:white" %)**Function**|=(% style="background-color:#4F81BD;color:white" %)**Response**
1088 |(% style="background-color:#f2f2f2" %)AT+ALLDATAMOD=?|(% style="background-color:#f2f2f2" %)Show current all data mode|(% style="background-color:#f2f2f2" %)(((
1089 0
1090 OK
1091 )))
1092 |(% style="background-color:#f2f2f2" %)AT+ALLDATAMOD=1|(% style="background-color:#f2f2f2" %)Set all data mode is 1.|(% style="background-color:#f2f2f2" %)OK
1093
1094 == 2.9 Set the payload version ==
1095
1096
1097 Feature, Set the payload version.
1098
1099 (% style="color:blue" %)**AT Command: AT+PAYVER**
1100
1101 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:437px" %)
1102 |=(% style="width: 158px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 192px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 87px;background-color:#4F81BD;color:white" %)**Response**
1103 |(% style="background-color:#f2f2f2; width:158px" %)AT+PAYVER=?|(% style="background-color:#f2f2f2; width:192px" %)Show current payload version|(% style="background-color:#f2f2f2" %)(((
1104 1
1105 OK
1106 )))
1107 |(% style="background-color:#f2f2f2; width:158px" %)AT+PAYVER=5|(% style="background-color:#f2f2f2; width:192px" %)Set payload version is 5.|(% style="background-color:#f2f2f2" %)OK
1108
1109 == 2.10 Scheduled domain name resolution ==
1110
1111
1112 This command is used to set up scheduled domain name resolution
1113
1114 (% style="color:blue" %)**AT Command:**
1115
1116 * (% style="color:#037691" %)**AT+DNSTIMER=XX**(%%)**    **~/~/ Unit: hour
1117
1118 After setting this command, domain name resolution will be performed regularly.
1119
1120
1121 == 2.11 Clock logging ==
1122
1123
1124 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.
1125
1126 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.
1127
1128 * (% style="color:blue" %)**AT Command:**(%%) (% style="color:#037691" %)**AT+CLOCKLOG=a,b,c,d**
1129
1130 (% style="color:#037691" %)**a:**(%%)** 0:** Disable Clock logging.  ** 1: **Enable Clock Logging
1131
1132 (% 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.
1133
1134 (% style="color:#037691" %)**c:**(%%)** **Specify the sampling interval: range **(0 ~~ 255 minutes)**
1135
1136 (% style="color:#037691" %)**d:**(%%)** **How many entries should be uplink on every TDC **(max 32)**
1137
1138 (% style="color:red" %)**Note: To disable clock recording, set the following parameters: AT+CLOCKLOG=1,65535,0,0**
1139
1140 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/RS485-NB%2C-NS_RS485%2CUART_to_NB-IoT_Converter_User_Manual/WebHome/image-20240309094931-1.png?rev=1.1||alt="image-20240309094931-1.png"]]
1141
1142 **Example:**
1143
1144 **AT+CLOCKLOG=1,65535,5,5**
1145 Device will log data to memory start from 2799' and then log every 1 minutes. And every TDC uplink, the uplink payload will consist: Battery info + last 32 memory record (payload+Timestamp).
1146
1147
1148 [[image:image-20241217155439-1.png||height="585" width="742"]]
1149
1150 (% 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.**
1151
1152
1153 == 2.12 Set the downlink debugging mode(Since firmware v1.2.0) ==
1154
1155
1156 Feature: Set the conversion between the standard version and 1T version downlinks.
1157
1158 (% style="color:blue" %)**AT command: AT+DOWNTE**
1159
1160 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
1161 |=(% style="width: 134px; 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: 233px; background-color: rgb(79, 129, 189); color: white;" %)**Response/Explanation**
1162 |(% style="width:134px" %)AT+DOWNTE=?|(% style="width:143px" %)Get current Settings|(% style="width:229px" %)(((
1163 0,0  (default)
1164
1165 OK
1166 )))
1167 |(% colspan="1" rowspan="2" style="width:134px" %)(((
1168
1169
1170
1171
1172 AT+DOWNTE=a,b
1173 )))|(% style="width:143px" %)**a**: Set the conversion between the downlink of the standard version and 1T version|(% style="width:229px" %)(((
1174 **0**: Set the downlink of the standard version.
1175 **1**: Set the downlink of the 1T version(ThingsEye platform)
1176 )))
1177 |(% style="width:143px" %)**b**: Enable/Disable downlink debugging|(% style="width:229px" %)(((
1178 **0**: Disable downlink debugging mode.
1179 **1**: Enable downlink debugging mode, users can see the original downlink reception.
1180 )))
1181
1182 **Example:**
1183
1184 * AT+DOWNTE=0,1  ~/~/Set to standard version downlink, and enable downlink debugging.
1185 * AT+DOWNTE=1,1  ~/~/Set to 1T version downlink, and enable downlink debugging.
1186
1187 (% style="color:blue" %)**Downlink Command:  **
1188
1189 No downlink commands for feature
1190
1191
1192 == 2.13 Domain name resolution settings(Since firmware v1.2.0) ==
1193
1194
1195 Feature: Set dynamic domain name resolution IP.
1196
1197 (% style="color:blue" %)**AT command: AT+BKDNS**
1198
1199 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
1200 |=(% style="width: 134px; 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: 233px; background-color: rgb(79, 129, 189); color: white;" %)**Response/Explanation**
1201 |(% style="width:134px" %)(((
1202 AT+BKDNS=?
1203 )))|(% style="width:143px" %)Get current Settings|(% style="width:606px" %)(((
1204 0,0,NULL  (default)
1205 OK
1206 )))
1207 |(% colspan="1" rowspan="3" style="width:134px" %)(((
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219 AT+BKDNS=a,b,c
1220 )))|(% style="width:143px" %)(((
1221
1222
1223
1224
1225
1226 **a**: Enable/Disable dynamic domain name resolution.
1227 )))|(% style="width:606px" %)**1**: Disable dynamic domain name update. 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.
1228 **2**: Enable dynamic domain name update. The ip address will be saved after domain name resolution, if the next domain name resolution fails, the last saved ip address will be used, and the domain name resolution will be updated regularly according to the time set by the customer.
1229 |(% style="width:143px" %)**b**: Set the time to update the domain name resolution at regular intervals.|(% style="width:606px" %)(((
1230 Unit: hour
1231 )))
1232 |(% style="width:143px" %)(((
1233
1234
1235
1236 **c**: Set the IP address manually.
1237 )))|(% style="width:606px" %)(((
1238 The format is the same as AT+SERVADDR.
1239 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.
1240 )))
1241
1242 **Example:**
1243
1244 * AT+BKDNS=1,0  ~/~/Dynamic domain name resolution is disabled.
1245 * AT+BKDNS=2,1  ~/~/The dynamic domain name resolution function is enabled and the automatic update time is set to 1 hour.
1246 * AT+BKDNS=2,4,3.69.98.183,1883  ~/~/The dynamic domain name resolution function is enabled and the automatic update time is set to 4 hour, and manually set the ip address, if the domain name failed to resolve, it will directly use this ip to communicate. When the next domain name resolution is successful, it will be updated to the ip address of the successful resolution.
1247
1248 (% style="color:blue" %)**Downlink Command:  **
1249
1250 No downlink commands for feature
1251
1252
1253 == 2.14  Set CoAP option ==
1254
1255
1256 This command sets the connection parameters of the COAP.
1257
1258 (% style="color:blue" %)**AT command:**
1259
1260 * AT+URI1       ~/~/ CoAP option name, CoAP option length, "CoAP option value"
1261 * AT+URI2      ~/~/ CoAP option name, CoAP option length,  "CoAP option value"
1262 * AT+URI3     ~/~/ CoAP option name, CoAP option length,  "CoAP option value"
1263 * AT+URI4     ~/~/ CoAP option name, CoAP option length,  "CoAP option value"
1264
1265 **Example:**
1266
1267 * AT+URI1=11,38,"i/faaa241f-af4a-b780-4468-c671bb574858"
1268
1269 = 3. Configure SDI-12-NB =
1270
1271 == 3.1 Configure Methods ==
1272
1273
1274 SDI-12-NB supports below configure method:
1275
1276 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
1277
1278 * 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]].
1279
1280 == 3.2  Serial Access Password ==
1281
1282
1283 After the Bluetooth or UART connection is successful, use the Serial Access Password to enter the AT command window.
1284
1285 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.
1286
1287 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/RS485-NB%2C-NS_RS485%2CUART_to_NB-IoT_Converter_User_Manual/WebHome/image-20250226165815-1.png?rev=1.1||alt="image-20250226165815-1.png"]]
1288
1289
1290 If you need to change the password, use **AT+PWORD=**xxxxxx (6 characters), NB nodes only support lowercase letters.
1291
1292 [[image:image-20240826165545-2.png]]
1293
1294
1295 (% 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.**
1296
1297 [[image:image-20240826165550-3.png]]
1298
1299
1300 == 3.3 AT Commands Set ==
1301
1302
1303 AT+<CMD>?        : Help on <CMD>
1304
1305 AT+<CMD>         : Run <CMD>
1306
1307 AT+<CMD>=<value> : Set the value
1308
1309 AT+<CMD>=?       : Get the value
1310
1311
1312 (% style="color:blue" %)**General Commands**      
1313
1314 AT                    : Attention       
1315
1316 AT?  : Short Help     
1317
1318 ATZ  : MCU Reset    
1319
1320 AT+TDC  : Application Data Transmission Interval
1321
1322 AT+CFG  : Print all configurations
1323
1324 AT+MODEL  :Get module information
1325
1326 AT+SLEEP  :Get or set the sleep status
1327
1328 AT+DEUI  : Get or set the Device ID
1329
1330 AT+INTMOD            : Set the trigger interrupt mode
1331
1332 AT+APN : Get or set the APN
1333
1334 AT+3V3T  : Set extend the time of 3V3 power  
1335
1336 AT+5VT           : Set extend the time of 5V power  
1337
1338 AT+12VT           : Set extend the time of 12V power  
1339
1340 AT+ADDRI  : Send aI command to SDI12 sensor
1341
1342 AT+ADDRM  : Send aM command to SDI12 sensor
1343
1344 AT+ADDRC  : Send aC command to SDI12 sensor
1345
1346 AT+ADDRR  : Send aR command to SDI12 sensor
1347
1348 AT+CMDEAR  : Erase command(number of begin to number of ending)
1349
1350 AT+CFGDEV  : Send data to SDI12 deceive
1351
1352 AT+PAYVER  : Get or Set payload version
1353
1354 AT+ALLDATAMOD  : Get or Set mode of all data is cuted
1355
1356 AT+CONVFORM  : Conversion between characters and their ASCII
1357
1358 AT+COMMAND  : Send data of command1-15 to SDI12 deceive for payload
1359
1360 AT+DATACUT  : Cut receive data after use command1-15
1361
1362 AT+PRO          : Choose agreement
1363
1364 AT+RXDL  : Extend the sending and receiving time
1365
1366 AT+DNSCFG  : Get or Set DNS Server
1367
1368 AT+CSQTIME : Get or Set the time to join the network
1369
1370 AT+DNSTIMER : Get or Set the NDS timer
1371
1372 AT+TLSMOD : Get or Set the TLS mode
1373
1374 AT+GETSENSORVALUE   : Returns the current sensor measurement
1375
1376 AT+SERVADDR :  Server Address
1377
1378
1379 (% style="color:blue" %)**MQTT Management**
1380
1381 AT+CLIENT               : Get or Set MQTT client
1382
1383 AT+UNAME              : Get or Set MQTT Username
1384
1385 AT+PWD                  : Get or Set MQTT password
1386
1387 AT+PUBTOPIC  : Get or Set MQTT publish topic
1388
1389 AT+SUBTOPIC  : Get or Set MQTT subscription topic
1390
1391
1392 (% style="color:blue" %)**Information**          
1393
1394 AT+FDR  : Factory Data Reset
1395
1396 AT+PWORD  : Serial Access Password
1397
1398 AT+LDATA  : Get the last upload data
1399
1400
1401 = 4. Battery & Power Consumption =
1402
1403
1404 SDI-12-NB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
1405
1406 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
1407
1408
1409 = 5. Firmware update =
1410
1411
1412 User can change device firmware to::
1413
1414 * Update with new features.
1415
1416 * Fix bugs.
1417
1418 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/lqbsyml3l6otn80/AADq_gJXs8MHwBCixf0EEkDka?dl=0]]**
1419
1420 Methods to Update Firmware:
1421
1422 * (Recommended way) OTA firmware update via BLE: [[**Instruction**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE_Firmware_Update_NB_Sensors_BC660K-GL/]].
1423
1424 * Update through UART TTL interface : **[[Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/UART_Access_for_NB_ST_BC660K-GL/#H4.2UpdateFirmware28Assumethedevicealreadyhaveabootloader29]]**.
1425
1426 = 6. FAQ =
1427
1428 == 6.1 How can I access t BC660K-GL AT Commands? ==
1429
1430
1431 User can access to BC660K-GL directly and send AT Commands.
1432
1433 [[See BC660K-GL AT Command set>>url:https://www.dropbox.com/sh/5f6ssda5fum8rvs/AABT68l8ZzWOvZ5eg2qwOoFda?dl=0]]
1434
1435
1436 == 6.2 How to configure the device through the MQTT subscription function? ==
1437
1438
1439 Subscription content: {AT COMMAND}
1440
1441 (% style="color:#037691" %)**Example:**
1442
1443 Setting AT+5VT=500 through Node-RED requires MQTT to send the content {AT+5VT=500}.
1444
1445 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/RS485-NB%2C-NS_RS485%2CUART_to_NB-IoT_Converter_User_Manual/WebHome/1698140180821-486.png?rev=1.1||alt="1698140180821-486.png"]]
1446
1447 The serial port displays:
1448
1449 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/RS485-NB%2C-NS_RS485%2CUART_to_NB-IoT_Converter_User_Manual/WebHome/image-20231024174641-2.png?width=531&height=267&rev=1.1||alt="image-20231024174641-2.png"]]
1450
1451
1452 = 7. Order Info =
1453
1454
1455 Part Number: (% style="color:blue" %)**SDI-12-NB-XX-YY**
1456
1457 (% style="color:red" %)**XX:**
1458
1459 * (% style="color:#037691" %)**GE**(%%): General version ( Exclude SIM card)
1460
1461 * (% style="color:#037691" %)**1T**(%%): with 1NCE * 10 years 500MB SIM card and Pre-configure to ThingsEye server
1462
1463 (% style="color:blue" %)**YY: The grand connector hole size**
1464
1465 * M12: M12 hole
1466
1467 * M16: M16 hole
1468
1469 = 8. ​Packing Info =
1470
1471
1472 (% style="color:#037691" %)**Package Includes**:
1473
1474 * SDI-12-NB SDI-12 to NB-IoT Converter x 1
1475
1476 * External antenna x 1
1477
1478 (% style="color:#037691" %)**Dimension and weight**:
1479
1480 * Device Size: cm
1481
1482 * Device Weight: g
1483
1484 * Package Size / pcs : cm
1485
1486 * Weight / pcs : g
1487
1488 = 9. Support =
1489
1490
1491 * 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.
1492
1493 * 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]].
1494
1495 (% style="display:none" %) (%%)