Show last authors
1
2
3 (% style="text-align:center" %)
4 [[image:image-20231020174533-1.png||height="561" width="443"]]
5
6
7
8
9
10
11 **Table of Contents:**
12
13 {{toc/}}
14
15
16
17
18
19
20 = 1. Introduction =
21
22 == 1.1 What is SDI-12 to NB-IoT Converter ==
23
24
25 The Dragino (% style="color:blue" %)**SDI-12-NB**(%%) is a (% style="color:blue" %)**SDI-12 to NB-IoT Converter **(%%)designed for Smart Agriculture solution.
26
27 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.
28
29 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.
30
31 SDI-12-NB supports different uplink methods including (% style="color:blue" %)**MQTT, MQTTs, UDP & TCP**(%%) for different application requirement, and support uplinks to various IoT Servers.
32
33 SDI-12-NB (% style="color:blue" %)**supports BLE configure **(%%)and(% style="color:blue" %)** OTA update**(%%) which make user easy to use.
34
35 SDI-12-NB is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), it is designed for long-term use up to several years.
36
37 SDI-12-NB has optional built-in SIM card and default IoT server connection version. Which makes it works with simple configuration.
38
39 [[image:image-20231023085355-1.png||height="338" width="890"]]
40
41
42 == 1.2 ​Features ==
43
44
45 * NB-IoT Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85 @H-FDD
46 * Ultra-low power consumption
47 * Controllable 3.3v, 5v and 12v output to power external sensor
48 * SDI-12 Protocol to connect to SDI-12 Sensor
49 * Multiply Sampling and one uplink
50 * Support Bluetooth v5.1 remote configure and update firmware
51 * Uplink on periodically
52 * Downlink to change configure
53 * 8500mAh Battery for long term use
54 * Uplink via MQTT, MQTTs, TCP, or UDP
55 * Nano SIM card slot for NB-IoT SIM
56
57 == 1.3 Specification ==
58
59
60 (% style="color:blue" %)**Common DC Characteristics:**
61
62 * Supply Voltage: 2.5v ~~ 3.6v
63 * Support current: 5V 300mA, 12V 100mA
64 * Operating Temperature: -40 ~~ 85°C
65
66 (% style="color:blue" %)**Current Input (DC) Measuring :**
67
68 * Range: 0 ~~ 20mA
69 * Accuracy: 0.02mA
70 * Resolution: 0.001mA
71
72 (% style="color:blue" %)**Voltage Input Measuring:**
73
74 * Range: 0 ~~ 30v
75 * Accuracy: 0.02v
76 * Resolution: 0.001v
77
78 (% style="color:blue" %)**NB-IoT Spec:**
79
80 (% style="color:#037691" %)**NB-IoT Module: BC660K-GL**
81
82 (% style="color:#037691" %)**Support Bands:**
83
84 * B1 @H-FDD: 2100MHz
85 * B2 @H-FDD: 1900MHz
86 * B3 @H-FDD: 1800MHz
87 * B4 @H-FDD: 2100MHz
88 * B5 @H-FDD: 860MHz
89 * B8 @H-FDD: 900MHz
90 * B12 @H-FDD: 720MHz
91 * B13 @H-FDD: 740MHz
92 * B17 @H-FDD: 730MHz
93 * B18 @H-FDD: 870MHz
94 * B19 @H-FDD: 870MHz
95 * B20 @H-FDD: 790MHz
96 * B25 @H-FDD: 1900MHz
97 * B28 @H-FDD: 750MHz
98 * B66 @H-FDD: 2000MHz
99 * B70 @H-FDD: 2000MHz
100 * B85 @H-FDD: 700MHz
101
102 (% style="color:blue" %)**Battery:**
103
104 * Li/SOCI2 un-chargeable battery
105 * Capacity: 8500mAh
106 * Self Discharge: <1% / Year @ 25°C
107 * Max continuously current: 130mA
108 * Max boost current: 2A, 1 second
109
110 (% style="color:blue" %)**Power Consumption**
111
112 * STOP Mode: 10uA @ 3.3v
113 * Max transmit power: 350mA@3.3v
114
115 == 1.4 Connect to SDI-12 Sensor ==
116
117
118 [[image:image-20231102161319-1.png||height="525" width="564"]]
119
120
121 == 1.5 Sleep mode and working mode ==
122
123
124 (% 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.
125
126 (% 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.
127
128
129 == 1.6 Button & LEDs ==
130
131
132 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675071855856-879.png]]
133
134
135 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
136 |=(% 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**
137 |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
138 If sensor has already attached to NB-IoT network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
139 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
140 )))
141 |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
142 (% 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.
143 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
144 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.
145 )))
146 |(% 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.
147
148 (% 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.**
149
150
151 == 1.7 BLE connection ==
152
153
154 SDI-12-NB support BLE remote configure and firmware update.
155
156
157 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:
158
159 * Press button to send an uplink
160 * Press button to active device.
161 * Device Power on or reset.
162
163 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
164
165
166 == 1.8 Pin Definitions , Switch & SIM Direction ==
167
168
169 SDI-12-NB use the mother board which as below.
170
171 [[image:image-20230913113836-1.png||height="330" width="545"]]
172
173
174 === 1.8.1 Jumper JP2 ===
175
176
177 Power on Device when put this jumper.
178
179
180 === 1.8.2 BOOT MODE / SW1 ===
181
182
183 **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.
184
185 **2)** (% style="color:blue" %)**Flash**(%%): work mode, device starts to work and send out console output for further debug
186
187
188 === 1.8.3 Reset Button ===
189
190
191 Press to reboot the device.
192
193
194 === 1.8.4 SIM Card Direction ===
195
196
197 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]].
198
199
200 == 1.9 Mechanical ==
201
202
203 [[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-20230201090139-2.png?rev=1.1||alt="image-20230201090139-2.png"]]
204
205
206 [[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-20230201090139-3.png?rev=1.1||alt="image-20230201090139-3.png"]]
207
208
209 [[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-20230201090139-4.png?rev=1.1||alt="image-20230201090139-4.png"]]
210
211
212 = 2. Use SDI-12-NB to communicate with IoT Server =
213
214 == 2.1 Send data to IoT server via NB-IoT network ==
215
216
217 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.
218
219
220 Below shows the network structure:
221
222 [[image:image-20231023085409-2.png||height="331" width="871"]]
223
224
225 There are two version: (% style="color:blue" %)**-GE**(%%) and (% style="color:blue" %)**-1D**(%%) version of SDI-12-NB.
226
227
228 (% 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.
229
230 * 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]].
231
232 * 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]]. 
233
234 Below shows result of different server as a glance.
235
236 (% border="1" cellspacing="3" style="width:515px" %)
237 |(% 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**
238 |(% 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" %)(((
239 (% style="text-align:center" %)
240 [[image:image-20230819113244-8.png||height="183" width="367"]]
241 )))|(% style="width:170px" %)
242 |(% 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" %)(((
243 (% style="text-align:center" %)
244 [[image:image-20230819113244-9.png||height="119" width="367"]]
245 )))|(% style="width:170px" %)
246 |(% 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" %)
247 |(% 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" %)
248 |(% 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" %)
249
250 (% style="color:blue" %)**1D Version**(%%): This version has 1NCE SIM card pre-installed and configure to send value to DataCake. User Just need to select the sensor type in DataCake and Activate SDI-12-NB and user will be able to see data in DataCake. See here for [[DataCake Config Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.4Datacake]].
251
252
253 == 2.2 ​Payload Types ==
254
255
256 To meet different server requirement, SDI-12-NB supports different payload type.
257
258 **Includes:**
259
260 * [[General JSON format payload>>||anchor="H2.2.1GeneralJsonFormat28Type3D529"]]. (Type=5)
261
262 * [[HEX format Payload>>||anchor="H2.2.2HEXformatPayload28Type3D029"]]. (Type=0)
263
264 User can specify the payload type when choose the connection protocol. Example:
265
266 (% style="color:#037691" %)**AT+PRO=2,0**  (%%) ~/~/ Use UDP Connection & hex Payload
267
268 (% style="color:#037691" %)**AT+PRO=2,5**   (%%) ~/~/ Use UDP Connection & Json Payload
269
270 (% style="color:#037691" %)**AT+PRO=3,0**  (%%) ~/~/ Use MQTT Connection & hex Payload
271
272 (% style="color:#037691" %)**AT+PRO=3,5 ** (%%) ~/~/ Use MQTT Connection & Json Payload
273
274 (% style="color:#037691" %)**AT+PRO=4,0**  (%%) ~/~/ Use TCP Connection & hex Payload
275
276 (% style="color:#037691" %)**AT+PRO=4,5**   (%%) ~/~/ Use TCP Connection & Json Payload
277
278
279 === 2.2.1 General Json Format(Type~=5) ===
280
281
282 This is the General Json Format. As below:
283 \\(% style="color:#4472c4" %)**{"IMEI":"866207053462705","Model":"SDI12-NB","Payload":01013INFWIN  MT10B 6.12305120000000,"battery":3.589,"signal":24}**
284
285
286 (% style="color:red" %)**Notice:The maximum number of bytes in the Payload is 1 payload version number plus 1374 SDI12 data.**
287
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" %)**f866207053462705 1664 0df4 11 00 00 64f02eb0 01 303133494e4657494e20204d5431304220362e31323330353132303030303030300d0a**
295
296 [[image:1698912942381-686.png]]
297
298
299 (% style="color:blue" %)**Version:**
300
301 These bytes include the hardware and software version.
302
303 (% style="color:#037691" %)**Higher byte:**(%%) Specify Sensor Model: 0x16 for SDI-12-NB
304
305 (% style="color:#037691" %)**Lower byte:**(%%) Specify the software version: 0x64=100, means firmware version 1.0.0
306
307
308 (% style="color:blue" %)**BAT (Battery Info):**
309
310 Check the battery voltage for SDI-12-NB.
311
312 Ex1: 0x0df4 =  3572mV
313
314 Ex2: 0x0B49 = 2889mV
315
316
317 (% style="color:blue" %)**Signal Strength:**
318
319 NB-IoT Network signal Strength.
320
321 **Ex1: 0x11 = 16**
322
323 **0**  -113dBm or less
324
325 **1**  -111dBm
326
327 **2...30** -109dBm... -53dBm
328
329 **31**   -51dBm or greater
330
331 **99**    Not known or not detectable
332
333
334 (% style="color:blue" %)**GPIO_EXTI Level:**
335
336 GPIO_EXTI is used as Interrupt Pin.
337
338 (% style="color:#037691" %)**Example**:
339
340 01 (H):  GPIO_EXTI pin is high level.
341
342 00 (L):  GPIO_EXTI pin is low level.
343
344
345 (% style="color:blue" %)**GPIO_EXTI Flag:**
346
347 This data field shows if this packet is generated by (% style="color:blue" %)**Interrupt Pin** (%%)or not. 
348
349 Note: The Interrupt Pin is a separate pin in the screw terminal.
350
351 (% style="color:#037691" %)**Example:**
352
353 0x00: Normal uplink packet.
354
355 0x01: Interrupt Uplink Packet.
356
357
358 (% style="color:blue" %)**TimeStamp:   **
359
360 Unit TimeStamp Example: 64e2d74f(H) = 1692587855(D)
361
362 Put the decimal value into this link([[https:~~/~~/www.epochconverter.com)>>https://www.epochconverter.com]])to get the time.
363
364
365 (% style="color:blue" %)**Payload_version: **
366
367 The payload version number is used to parse different decodes.
368
369
370 (% style="color:blue" %)**SDI12_sensor_data:**
371
372 The data returned by the SDI-12 sensor or UART sensor needs to be cut out the AT+DATACUTx  or AT+ALLDATAMOD commands.
373
374
375 == ​2.3 SDI-12 Related Commands ==
376
377
378 User need to configure SDI-12-NB to communicate with SDI-12 sensors otherwise the uplink payload will only include a few bytes.
379
380
381 === 2.3.1 Basic SDI-12 debug command ===
382
383
384 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.
385
386 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.
387
388 The following is the display information on the serial port and the server.
389
390
391 [[image:image-20231102163336-2.png||height="287" width="500"]]
392
393
394 [[image:image-20231102163417-5.png||height="83" width="772"]]
395
396
397
398 ==== (% style="color:blue" %)**al!  ~-~- Get SDI-12 sensor Identification**(%%) ====
399
400
401 * AT Command: AT+ADDRI=aa
402 * NB-IoT Downlink(prefix 0xAA00): AA 00 aa
403
404 (% style="color:#037691" %)**Parameter:  **(%%)aa: ASCII value of SDI-12 sensor address in downlink or HEX value in AT Command)
405
406 (% style="color:blue" %)**Example :   **(%%)AT+ADDRI=0 ( Equal to downlink: 0x AA 00 30)
407
408
409 The following is the display information on the serial port and the server.
410
411
412 [[image:image-20231030170258-5.png]]
413
414
415 [[image:image-20231030170155-4.png||height="400" width="1192"]]
416
417 (% style="display:none" %) (%%)
418
419
420 ==== (% style="color:blue" %)**aM!,aMC!, aM1!- aM9!, aMC1!- aMC9!**(%%) ====
421
422
423 (% style="color:red" %)**aM! **(%%): Start Non-Concurrent Measurement
424
425 (% style="color:red" %)**aMC! **(%%): Start Non-Concurrent Measurement – Request CRC
426
427 (% style="color:red" %)**aM1!- aM9! **(%%): Additional Measurements
428
429 (% style="color:red" %)**aMC1!- aMC9!**(%%) : Additional Measurements – Request CRC
430
431
432 * AT Command : AT+ADDRM=0,1,0,1
433
434 (% style="color:#037691" %)**aa**(%%): SDI-12 sensor address.
435
436 (% style="color:#037691" %)**bb**(%%): 0: no CRC, 1: request CRC
437
438 (% style="color:#037691" %)**cc**(%%): 1-9: Additional Measurement, 0: no additional measurement
439
440 (% style="color:#037691" %)**dd**(%%): delay (in second) to send (% style="color:#037691" %)__**aD0!**__(%%) to get return.
441
442
443 The following is the display information on the serial port and the server.
444
445
446 [[image:image-20231030173023-6.png]]
447
448
449 [[image:image-20231030173128-7.png||height="253" width="1114"]]
450
451
452
453 ==== (% style="color:blue" %)**aC!, aCC!,  aC1!- aC9!,  aCC1!- aCC9! **(%%) ====
454
455
456 (% style="color:red" %)**aC!**(%%) : Start Concurrent Measurement
457
458 (% style="color:red" %)**aCC!** (%%): Start Concurrent Measurement – Request CRC
459
460 (% style="color:red" %)**aC1!- aC9!**(%%) : Start Additional Concurrent Measurements
461
462 (% style="color:red" %)**aCC1!- aCC9!**(%%) : Start Additional Concurrent Measurements – Request CRC
463
464
465 * AT Command : AT+ADDRC=0,1,0,1 
466
467 (% style="color:#037691" %)**aa**(%%): SDI-12 sensor address.
468
469 (% style="color:#037691" %)**bb**(%%): 0: no CRC, 1: request CRC
470
471 (% style="color:#037691" %)**cc**(%%): 1-9: Additional Measurement, 0: no additional measurement
472
473 (% style="color:#037691" %)**dd**(%%): delay (in second) to send (% style="color:#037691" %)__**aD0!**__(%%)__ __to get return.
474
475
476 The following is the display information on the serial port and the server.
477
478
479 [[image:image-20231030173510-8.png]]
480
481
482 [[image:image-20231030173533-9.png||height="231" width="1159"]]
483
484
485
486 ==== (% style="color:blue" %)**aR0!- aR9!,  aRC0!- aRC9!**(%%) ====
487
488
489 Start Continuous Measurement
490
491 Start Continuous Measurement – Request CRC
492
493
494 * AT Command : AT+ADDRR=0,1,0,1 
495
496 (% style="color:#037691" %)**aa**(%%): SDI-12 sensor address.
497
498 (% style="color:#037691" %)**bb**(%%): 0: no CRC, 1: request CRC
499
500 (% style="color:#037691" %)**cc**(%%): 1-9: Additional Measurement, 0: no additional measurement
501
502 (% style="color:#037691" %)**dd**(%%): delay (in second) to send (% style="color:#037691" %)__**aD0!**__(%%) to get return.
503
504
505 The following is the display information on the serial port and the server.
506
507
508 [[image:image-20231030173727-10.png]]
509
510
511 [[image:image-20231030173747-11.png||height="237" width="1194"]]
512
513
514 === 2.3.2 Advance SDI-12 Debug command ===
515
516
517 This command can be used to debug all SDI-12 command.(% style="display:none" %)
518
519 (% style="color:blue" %)**Example1: **(%%) AT+CFGDEV =0RC0!,1
520
521 (% style="color:#037691" %)**0RC0! **(%%): SDI-12 Command,
522
523 (% style="color:#037691" %)**1 **(%%): Delay 1 second.  ( 0: 810 mini-second)
524
525 The following is the display information on the serial port and the server.
526
527 [[image:image-20231030174559-13.png]]
528
529 (% style="display:none" %) (%%)
530
531 (% style="color:blue" %)**Example2: **(%%) AT+CFGDEV =0M!,1,1
532
533 (% style="color:#037691" %)**0M! **(%%): SDI-12 Command,
534
535 (% style="color:#037691" %)**1 **(%%): Delay 1 second.  ( 0: 810 mini-second)
536
537 (% style="color:#037691" %)**1 **(%%): Use aD0! command access.
538
539
540 The following is the display information on the serial port and the server.
541
542 [[image:image-20231030174626-14.png]]
543
544
545 === 2.3.3 Convert ASCII to String ===
546
547
548 This command is used to convert between ASCII and String format.
549
550 AT+CONVFORM ( Max length: 80 bytes)
551
552
553 (% style="color:blue" %)**Example:**
554
555 1) AT+CONVFORM=0, string Convert String from String to ASCII
556
557 [[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"]]
558
559
560 2) AT+CONVFORM=1, ASCII Convert ASCII to String.
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/1675214856590-846.png?rev=1.1||alt="1675214856590-846.png"]]
563
564
565 === 2.3.4 Define periodically SDI-12 commands and uplink. ===
566
567
568 AT+COMMANDx & AT+DATACUTx
569
570 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.
571
572
573 * (% style="color:blue" %)**AT Command:**
574
575 (% style="color:#037691" %)**AT+COMMANDx=var1,var2,var3,var4.**
576
577 (% style="color:red" %)**var1**(%%): SDI-12 command , for example: 0RC0!
578
579 (% style="color:red" %)**var2**(%%): Wait timeout for return. (unit: second)
580
581 (% style="color:red" %)**var3**(%%): Whether to send //addrD0!// to get return after var2 timeout. 0: Don't Send //addrD0! //; 1: Send //addrD0!//.
582
583 (% style="color:red" %)**var4**(%%): validation check for return. If return invalid, SDI-12-NB will resend this command. Max 3 retries.
584
585 (% style="color:red" %)**0 **(%%) No validation check;
586
587 (% style="color:red" %)**1** (%%) Check if return chars are printable char(0x20 ~~ 0x7E);
588
589 (% style="color:red" %)**2**(%%)  Check if there is return from SDI-12 sensor
590
591 (% style="color:red" %)**3** (%%) Check if return pass CRC check ( SDI-12 command var1 must include CRC request);
592
593
594 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.
595
596
597 (% style="color:blue" %)**AT+DATACUTx**(%%) : This command defines how to handle the return from AT+COMMANDx, max return length is 100 bytes.
598
599 (% border="1" style="width:433px" %)
600 |(% style="background-color:#f2f2f2; width:433px" %)(((
601 (% style="color:#0070c0" %)**AT+DATACUTx=a,b,c**
602
603 **a**:  length for the return of AT+COMMAND
604
605 **b**: 1: grab valid value by byte, max 6 bytes. 2: grab valid value by bytes section, max 3 sections.
606
607 **c**:  define the position for valid value. 
608 )))
609
610 For example, if return from AT+COMMAND1 is “013METER   TER12 112T12-00024895<CR><LF>” , Below AT+DATACUT1 will get different result to combine payload:
611
612
613 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
614 |=(% style="width: 164px;background-color:#4F81BD;color:white" %)**AT+DATACUT1 value**|=(% style="width: 346px;background-color:#4F81BD;color:white" %)**Final Result to combine Payload**
615 |(% style="background-color:#f2f2f2; width:164px" %)34,1,1+2+3|(% style="background-color:#f2f2f2; width:344px" %)0D 00 01 30 31 33
616 |(% 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
617 |(% 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
618
619 (% style="color:red" %)**Note : if user use AT+COMMANDx to add a new command, he also need to send AT+DATACUTx downlink.**
620
621
622
623 (% style="color:blue" %)**Clear SDI12 Command**
624
625 The AT+COMMANDx and AT+DATACUTx settings are stored in special location, user can use below command to clear them.
626
627
628 * (% style="color:#037691" %)**AT Command:**
629
630 (% style="color:#4f81bd" %)**AT+CMDEAR=mm,nn** (%%) mm: start position of erase ,nn: stop position of erase
631
632
633 **Etc.** AT+CMDEAR=1,10 means erase AT+COMMAND1/AT+DATACUT1 to AT+COMMAND10/AT+DATACUT10
634
635
636 (% style="color:blue" %)**command combination**
637
638 Below shows a screen shot how the results combines together to a uplink payload.
639
640 (% style="display:none" %) (%%)
641
642 [[image:image-20231102172455-6.png||height="909" width="1014"]]
643
644 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.
645
646 (% 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.
647
648
649 (% 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.
650
651
652 [[image:image-20231102172516-7.png||height="819" width="1074"]](% style="display:none" %)
653
654 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.
655
656 for example in above screen, F1 23 means the return is from AT+COMMAND1 and the return is 35 bytes.
657
658
659 == 2.4 Examples To Set SDI commands ==
660
661
662 (% 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.**
663
664
665 === 2.4.1 Examples 1 ~-~- General Example ===
666
667
668 COM port and SDI-12 sensor communication converted to SDI-12-NB and SDI-12 sensor communication.
669
670 [[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-20230222143809-1.png?width=729&height=564&rev=1.1||alt="image-20230222143809-1.png"]]
671
672
673 (% style="color:blue" %)**1) The AT+COMMANDx command is applied to the red arrow part, and sends the SDI12 command to the SDI12 sensor:**
674
675 a. Send the first command and get the first reply:
676
677 (% style="color:#037691" %)**AT+COMMANDx=1I!,0,0,1**
678
679 b. Send the second command and get the second reply:
680
681 (% style="color:#037691" %)**AT+COMMANDx=2I!,0,0,1**
682
683 c. Send the third command and get the third reply:
684
685 (% style="color:#037691" %)**AT+COMMANDx=3I!,0,0,1**
686
687 d. Send the fourth command and get the fourth reply:
688
689 (% style="color:#037691" %)**AT+COMMANDx=4I!,0,0,1**
690
691 e. Send the fifth command plus the sixth command, get the sixth reply:
692
693 (% style="color:#037691" %)**AT+COMMANDx=1M!,2,1,1**
694
695 f. Send the seventh command plus the eighth command, get the eighth reply:
696
697 (% style="color:#037691" %)**AT+COMMANDx=2M!,2,1,1**
698
699 g. Send the ninth command plus the tenth command, get the tenth reply:
700
701 (% style="color:#037691" %)**AT+COMMANDx=3M!,1,1,1**
702
703 h. Send the eleventh command plus the twelfth command, get the twelfth reply:
704
705 (% style="color:#037691" %)**AT+COMMANDx=4M!,1,1,1**
706
707
708 (% style="color:blue" %)**2) The AT+DATACUTx command is applied to the green arrow part, receiving and cut out data from the SDI12 sensor:**
709
710 a. The first reply, all 34 characters: ”113TRUEBNERSMT100038220303182331<CR><LF>”
711
712 Cut out all characters: (% _mstmutation="1" style="color:#037691" %)**AT+ALLDATAMOD=1 or AT+DATACUTx=34,2,1~~34**(% style="color:#037691" %);
713
714 b. The sixth reply, all 31 characters:”1+19210+1.04+0.00+22.49+11.75<CR><LF>”
715
716 Cut out all characters: (% _mstmutation="1" style="color:#037691" %)**AT+ALLDATAMOD=1 or AT+DATACUTx=31,2,1~~31**(% style="color:#037691" %);
717
718 c. The eighth reply, all 31 characters:”2+18990+1.08+0.00+22.24+11.80<CR><LF>”
719
720 Cut out all characters: (% _mstmutation="1" style="color:#037691" %)**AT+ALLDATAMOD=1 or AT+DATACUTx=31,2,1~~31**(% style="color:#037691" %);
721
722 d. The tenth reply, all 15 characters:”3-2919.8+24.0<CR><LF>”
723
724 Cut out all characters: (% _mstmutation="1" style="color:#037691" %)**AT+ALLDATAMOD=1 or AT+DATACUTx=15,2,1~~15**(% style="color:#037691" %);
725
726 e. The twelfth reply, all 25 characters:”4+30.8+22.84+4.7+954.38<CR><LF>”
727
728 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”**.
729
730
731 === 2.4.2 Example 2 ~-~- Connect to Hygrovue10 ===
732
733 ==== 2.4.2.1 Reference Manual and Command ====
734
735
736 * [[Hygrovue10 Product Page>>https://www.campbellsci.com/hygrovue10]]
737
738 * Commands to be used in PC and output.
739
740 ~1. check device address
741
742 2. change device address
743
744 3. check device ID
745
746 4. start measure
747
748 5. Get Meausre result
749
750 [[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-20230603120209-2.png?width=267&height=281&rev=1.1||alt="image-20230603120209-2.png"]]
751
752
753
754 ==== 2.4.2.2 Hardware Connection to SDI-12-NB ====
755
756
757 [[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-20230603120515-3.png?rev=1.1||alt="image-20230603120515-3.png"]]
758
759
760 ==== 2.4.2.3 Commands set in SDI-12-NB and uplink payload ====
761
762
763 [[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-20230603120648-4.png?rev=1.1||alt="image-20230603120648-4.png"]]
764
765 [[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-20230603120726-5.png?rev=1.1||alt="image-20230603120726-5.png"]]
766
767
768 === 2.4.3 Example 3 ~-~- Connect to SIL-400 ===
769
770 ==== 2.4.3.1 Reference Manual and Command ====
771
772
773 * [[SIL-400 Product Page>>https://www.apogeeinstruments.com/sil-411-commercial-grade-sdi-12-digital-output-standard-field-of-view-infrared-radiometer-sensor/]]
774
775 * Commands to be used in PC and output.
776
777 ~1. check device address
778
779 2. change device address
780
781 3. check device ID
782
783 4. start measure
784
785 5. Get Meausre result
786
787 [[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-20230603121606-7.png?width=307&height=242&rev=1.1||alt="image-20230603121606-7.png"]]
788
789
790 ==== 2.4.3.2 Hardware Connection to SDI-12-NB ====
791
792
793 [[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-20230603121643-8.png?width=656&height=442&rev=1.1||alt="image-20230603121643-8.png"]]
794
795
796 ==== 2.4.3.3 Commands set in SDI-12-NB and uplink payload ====
797
798
799 [[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-20230603121721-9.png?rev=1.1||alt="image-20230603121721-9.png"]]
800
801 [[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"]]
802
803
804 === 2.4.4 Example 4 ~-~- Connect to TEROS-12 ===
805
806 ==== 2.4.4.1 Reference Manual and Command ====
807
808
809 * [[TEROS-12 Product Page>>https://www.metergroup.com/en/meter-environment/products/teros-12-soil-moisture-sensor]]
810
811 * Commands to be used in PC and output.
812
813 1.check device address
814
815 2.change device address
816
817 3.check device ID
818
819 4.start measure
820
821 5.Get Meausre result
822
823 [[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-20230603122248-16.png?width=198&height=196&rev=1.1||alt="image-20230603122248-16.png"]]
824
825
826 ==== 2.4.4.2 Hardware Connection to SDI-12-NB ====
827
828
829 [[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-20230603122212-15.png?width=667&height=502&rev=1.1||alt="image-20230603122212-15.png"]]
830
831
832 ==== 2.4.4.3 Commands set in SDI-12-NB and uplink payload ====
833
834
835 [[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-20230603122040-12.png?rev=1.1||alt="image-20230603122040-12.png"]]
836
837 [[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-20230603122109-13.png?width=762&height=469&rev=1.1||alt="image-20230603122109-13.png"]]
838
839
840 === 2.4.5 Example 5 ~-~- Connect to SIL-400/TEROS-12 & Hygrovue10 ===
841
842 ==== 2.4.5.1 Important Notice! ====
843
844
845 * The product page and reference command see above example 2,3,4
846
847 * 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.
848
849 * 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.
850
851 * If these SDI-12 sensors are powered by external power source. It will add 300uA in the total current in SDI-12-NB.
852
853 (% style="display:none" %)
854
855
856
857 ==== 2.4.5.2 Hardware Connection to SDI-12-NB ====
858
859
860 [[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-20230603122508-17.png?width=742&height=526&rev=1.1||alt="image-20230603122508-17.png"]]
861
862
863 ==== 2.4.5.3 Commands set in SDI-12-NB and uplink payload ====
864
865
866 [[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-20230603122549-18.png?rev=1.1||alt="image-20230603122549-18.png"]]
867
868 [[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-20230603122623-19.png?width=1121&height=483&rev=1.1||alt="image-20230603122623-19.png"]]
869
870
871 === 2.4.6 Example 6 ~-~- Connect to ENTELECHY-EP_SDI-12 ===
872
873 ==== 2.4.6.1 Reference Manual and Command ====
874
875
876 * [[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]]
877
878 * Commands to be used in PC and output.
879
880 1.check device address
881
882 2.change device address
883
884 3.check device ID
885
886 4.start measure
887
888 5.Get Meausre result
889
890 [[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-20230627174559-3.png?rev=1.1||alt="image-20230627174559-3.png"]]
891
892
893 ==== 2.4.6.2 Hardware Connection to SDI-12-NB ====
894
895
896 [[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-20230627174446-2.png?rev=1.1||alt="image-20230627174446-2.png"]]
897
898
899 (% style="display:none" %) (%%)
900
901 ==== 2.4.6.3 Commands set in SDI-12-NB and uplink payload ====
902
903
904 [[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-20230627175513-4.png?width=576&height=596&rev=1.1||alt="image-20230627175513-4.png"]]
905
906 [[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-20230627175736-5.png?width=693&height=429&rev=1.1||alt="image-20230627175736-5.png"]]
907
908
909 == 2.5 Test Uplink and Change Update Interval ==
910
911
912 By default, Sensor will send uplinks (% style="color:blue" %)**every 2 hours**
913
914 User can use below commands to change the (% style="color:blue" %)**uplink interval**.
915
916 (% style="color:#037691" %)**AT+TDC=600 ** (%%) ~/~/ Set Update Interval to 600s
917
918 User can also push the button for more than 1 seconds to activate an uplink.
919
920
921 == 2.6 Trggier an uplink by external interrupt ==
922
923
924 SDI-12-NB has an external trigger interrupt function. Users can use the GPIO_EXTI pin to trigger the upload of data packets.
925
926 (% style="color:blue" %)**AT command:**
927
928 * (% style="color:#037691" %)**AT+INTMOD **(%%) ~/~/ Set the trigger interrupt mode
929
930 * (% style="color:#037691" %)**AT+INTMOD=0 **(%%) ~/~/ Disable Interrupt,as a digital input pin
931
932 * (% style="color:#037691" %)**AT+INTMOD=1 **(%%) ~/~/ Trigger by rising and falling edge
933
934 * (% style="color:#037691" %)**AT+INTMOD=2 **(%%) ~/~/ Trigger by falling edge
935
936 * (% style="color:#037691" %)**AT+INTMOD=3  **(%%) ~/~/ Trigger by rising edge
937
938 == 2.7 Set the output time ==
939
940
941 Feature, Control the output 3V3 , 5V or 12V.
942
943 (% style="color:blue" %)**AT Command: AT+3V3T**
944
945 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:474px" %)
946 |=(% 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**
947 |(% style="background-color:#f2f2f2; width:154px" %)AT+3V3T=?|(% style="background-color:#f2f2f2; width:201px" %)Show 3V3 open time.|(% style="background-color:#f2f2f2; width:116px" %)(((
948 0
949 OK
950 )))
951 |(% 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" %)(((
952 OK
953 default setting
954 )))
955 |(% 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" %)(((
956 OK
957 )))
958 |(% 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" %)(((
959 OK
960 )))
961
962 (% style="color:blue" %)**AT Command: AT+5VT**
963
964 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:470px" %)
965 |=(% 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**
966 |(% style="background-color:#f2f2f2; width:155px" %)AT+5VT=?|(% style="background-color:#f2f2f2; width:196px" %)Show 5V open time.|(% style="background-color:#f2f2f2; width:114px" %)(((
967 0
968 OK
969 )))
970 |(% 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" %)(((
971 OK
972 default setting
973 )))
974 |(% 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" %)(((
975 OK
976 )))
977 |(% 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" %)(((
978 OK
979 )))
980
981 (% style="color:blue" %)**AT Command: AT+12VT **
982
983 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:443px" %)
984 |=(% 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**
985 |(% style="background-color:#f2f2f2; width:156px" %)AT+12VT=?|(% style="background-color:#f2f2f2; width:199px" %)Show 12V open time.|(% style="background-color:#f2f2f2; width:83px" %)(((
986 0
987 OK
988 )))
989 |(% 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
990 |(% 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" %)(((
991 OK
992 )))
993
994 == 2.8 Set the all data mode ==
995
996
997 Feature, Set the all data mode.
998
999 (% style="color:blue" %)**AT Command: AT+ALLDATAMOD**
1000
1001 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:437px" %)
1002 |=(% style="background-color:#4F81BD;color:white" %)**Command Example**|=(% style="background-color:#4F81BD;color:white" %)**Function**|=(% style="background-color:#4F81BD;color:white" %)**Response**
1003 |(% style="background-color:#f2f2f2" %)AT+ALLDATAMOD=?|(% style="background-color:#f2f2f2" %)Show current all data mode|(% style="background-color:#f2f2f2" %)(((
1004 0
1005 OK
1006 )))
1007 |(% style="background-color:#f2f2f2" %)AT+ALLDATAMOD=1|(% style="background-color:#f2f2f2" %)Set all data mode is 1.|(% style="background-color:#f2f2f2" %)OK
1008
1009 == 2.9 Set the payload version ==
1010
1011
1012 Feature, Set the payload version.
1013
1014 (% style="color:blue" %)**AT Command: AT+PAYVER**
1015
1016 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:437px" %)
1017 |=(% 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**
1018 |(% style="background-color:#f2f2f2; width:158px" %)AT+PAYVER=?|(% style="background-color:#f2f2f2; width:192px" %)Show current payload version|(% style="background-color:#f2f2f2" %)(((
1019 1
1020 OK
1021 )))
1022 |(% 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
1023
1024 = 3. Configure SDI-12-NB =
1025
1026 == 3.1 Configure Methods ==
1027
1028
1029 SDI-12-NB supports below configure method:
1030
1031 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
1032
1033 * 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]].
1034
1035 == 3.2 AT Commands Set ==
1036
1037
1038 AT+<CMD>?        : Help on <CMD>
1039
1040 AT+<CMD>         : Run <CMD>
1041
1042 AT+<CMD>=<value> : Set the value
1043
1044 AT+<CMD>=?       : Get the value
1045
1046
1047 (% style="color:blue" %)**General Commands**      
1048
1049 AT                    : Attention       
1050
1051 AT?  : Short Help     
1052
1053 ATZ  : MCU Reset    
1054
1055 AT+TDC  : Application Data Transmission Interval
1056
1057 AT+CFG  : Print all configurations
1058
1059 AT+MODEL  :Get module information
1060
1061 AT+SLEEP  :Get or set the sleep status
1062
1063 AT+DEUI  : Get or set the Device ID
1064
1065 AT+INTMOD            : Set the trigger interrupt mode
1066
1067 AT+APN : Get or set the APN
1068
1069 AT+3V3T  : Set extend the time of 3V3 power  
1070
1071 AT+5VT           : Set extend the time of 5V power  
1072
1073 AT+12VT           : Set extend the time of 12V power  
1074
1075 AT+ADDRI  : Send aI command to SDI12 sensor
1076
1077 AT+ADDRM  : Send aM command to SDI12 sensor
1078
1079 AT+ADDRC  : Send aC command to SDI12 sensor
1080
1081 AT+ADDRR  : Send aR command to SDI12 sensor
1082
1083 AT+CMDEAR  : Erase command(number of begin to number of ending)
1084
1085 AT+CFGDEV  : Send data to SDI12 deceive
1086
1087 AT+PAYVER  : Get or Set payload version
1088
1089 AT+ALLDATAMOD  : Get or Set mode of all data is cuted
1090
1091 AT+CONVFORM  : Conversion between characters and their ASCII
1092
1093 AT+COMMAND  : Send data of command1-15 to SDI12 deceive for payload
1094
1095 AT+DATACUT  : Cut receive data after use command1-15
1096
1097 AT+PRO          : Choose agreement
1098
1099 AT+RXDL  : Extend the sending and receiving time
1100
1101 AT+DNSCFG  : Get or Set DNS Server
1102
1103 AT+CSQTIME : Get or Set the time to join the network
1104
1105 AT+DNSTIMER : Get or Set the NDS timer
1106
1107 AT+TLSMOD : Get or Set the TLS mode
1108
1109 AT+GETSENSORVALUE   : Returns the current sensor measurement
1110
1111 AT+SERVADDR :  Server Address
1112
1113
1114 (% style="color:blue" %)**MQTT Management**
1115
1116 AT+CLIENT               : Get or Set MQTT client
1117
1118 AT+UNAME              : Get or Set MQTT Username
1119
1120 AT+PWD                  : Get or Set MQTT password
1121
1122 AT+PUBTOPIC  : Get or Set MQTT publish topic
1123
1124 AT+SUBTOPIC  : Get or Set MQTT subscription topic
1125
1126
1127 (% style="color:blue" %)**Information**          
1128
1129 AT+FDR  : Factory Data Reset
1130
1131 AT+PWORD  : Serial Access Password
1132
1133 AT+LDATA  : Get the last upload data
1134
1135
1136 = 4. Battery & Power Consumption =
1137
1138
1139 SDI-12-NB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
1140
1141 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
1142
1143
1144 = 5. Firmware update =
1145
1146
1147 User can change device firmware to::
1148
1149 * Update with new features.
1150
1151 * Fix bugs.
1152
1153 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/lqbsyml3l6otn80/AADq_gJXs8MHwBCixf0EEkDka?dl=0]]**
1154
1155 Methods to Update Firmware:
1156
1157 * (Recommended way) OTA firmware update via BLE: [[**Instruction**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE_Firmware_Update_NB_Sensors_BC660K-GL/]].
1158
1159 * Update through UART TTL interface : **[[Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/UART_Access_for_NB_ST_BC660K-GL/#H4.2UpdateFirmware28Assumethedevicealreadyhaveabootloader29]]**.
1160
1161 = 6. FAQ =
1162
1163 == 6.1 How can I access t BC660K-GL AT Commands? ==
1164
1165
1166 User can access to BC660K-GL directly and send AT Commands.
1167
1168 [[See BC660K-GL AT Command set>>url:https://www.dropbox.com/sh/5f6ssda5fum8rvs/AABT68l8ZzWOvZ5eg2qwOoFda?dl=0]]
1169
1170
1171 == 6.2 How to configure the device through the MQTT subscription function? ==
1172
1173
1174 Subscription content: {AT COMMAND}
1175
1176 (% style="color:#037691" %)**Example:**
1177
1178 Setting AT+5VT=500 through Node-RED requires MQTT to send the content {AT+5VT=500}.
1179
1180 [[image:http://8.211.40.43/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/RS485-NB_RS485UART_to_NB-IoT_Converter_User_Manual/WebHome/1698140180821-486.png?rev=1.1||alt="1698140180821-486.png"]]
1181
1182 The serial port displays:
1183
1184 [[image:http://8.211.40.43/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/PS-NB-NA_NB-IoT_Analog_Sensor_User_Manual/WebHome/image-20231025162958-3.png?rev=1.1||alt="image-20231025162958-3.png"]]
1185
1186
1187 = 7. Order Info =
1188
1189
1190 Part Number: (% style="color:blue" %)**SDI-12-NB-XX-YY**
1191
1192 (% style="color:red" %)**XX:**
1193
1194 * (% style="color:#037691" %)**GE**(%%): General version ( Exclude SIM card)
1195
1196 * (% style="color:#037691" %)**1D**(%%): with 1NCE* 10 years 500MB SIM card and Pre-configure to DataCake server
1197
1198 (% style="color:blue" %)**YY: The grand connector hole size**
1199
1200 * M12: M12 hole
1201
1202 * M16: M16 hole
1203
1204 = 8. ​Packing Info =
1205
1206
1207 (% style="color:#037691" %)**Package Includes**:
1208
1209 * SDI-12-NB SDI-12 to NB-IoT Converter x 1
1210
1211 * External antenna x 1
1212
1213 (% style="color:#037691" %)**Dimension and weight**:
1214
1215 * Device Size: cm
1216
1217 * Device Weight: g
1218
1219 * Package Size / pcs : cm
1220
1221 * Weight / pcs : g
1222
1223 = 9. Support =
1224
1225
1226 * 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.
1227
1228 * 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]].
1229
1230 (% style="display:none" %) (%%)
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0