SDI-12-NB -- SDI-12 to NB-IoT Converter User Manual
Table of Contents:
- 1. Introduction
- 2. Use SDI-12-NB to communicate with IoT Server
- 2.1 Send data to IoT server via NB-IoT network
- 2.2 Payload Types
- 2.3 SDI-12 Related Commands
- 2.4 Examples To Set SDI commands
- 2.4.1 Examples 1 -- General Example
- 2.4.2 Example 2 -- Connect to Hygrovue10
- 2.4.3 Example 3 -- Connect to SIL-400
- 2.4.4 Example 4 -- Connect to TEROS-12
- 2.4.5 Example 5 -- Connect to SIL-400/TEROS-12 & Hygrovue10
- 2.4.6 Example 6 -- Connect to ENTELECHY-EP_SDI-12
- 2.6.7 Example 7 -- Connect to GroPoint Profile-8 (SDI-12 Version)
- 2.6.8 Example 8 -- Connect to Acclima TDR Soil Moisture Sensor
- 2.5 Test Uplink and Change Update Interval
- 2.6 Trggier an uplink by external interrupt
- 2.7 Set the output time
- 2.8 Set the all data mode
- 2.9 Set the payload version
- 2.10 Scheduled domain name resolution
- 2.11 Clock logging
- 2.12 Set the downlink debugging mode(Since firmware v1.2.0)
- 2.13 Domain name resolution settings(Since firmware v1.2.0)
- 3. Configure SDI-12-NB
- 4. Battery & Power Consumption
- 5. Firmware update
- 6. FAQ
- 7. Order Info
- 8. Packing Info
- 9. Support
1. Introduction
1.1 What is SDI-12 to NB-IoT Converter
The Dragino SDI-12-NB is a SDI-12 to NB-IoT Converter designed for Smart Agriculture solution.
SDI-12 (Serial Digital Interface at 1200 baud) is an asynchronous serial communications protocol for intelligent sensors that monitor environment data. SDI-12 protocol is widely used in Agriculture sensor and Weather Station sensors.
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.
SDI-12-NB supports different uplink methods including MQTT, MQTTs, UDP & TCP for different application requirement, and support uplinks to various IoT Servers.
SDI-12-NB supports BLE configure and OTA update which make user easy to use.
SDI-12-NB is powered by 8500mAh Li-SOCI2 battery, it is designed for long-term use up to several years.
SDI-12-NB has optional built-in SIM card and default IoT server connection version. Which makes it works with simple configuration.
1.2 Features
- NB-IoT Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85 @H-FDD
- Ultra-low power consumption
- Controllable 3.3v, 5v and 12v output to power external sensor
- SDI-12 Protocol to connect to SDI-12 Sensor
- Multiply Sampling and one uplink
- Support Bluetooth v5.1 remote configure and update firmware
- Uplink on periodically
- Downlink to change configure
- 8500mAh Battery for long term use
- Uplink via MQTT, MQTTs, TCP, or UDP
- Nano SIM card slot for NB-IoT SIM
1.3 Specification
Common DC Characteristics:
- Supply Voltage: 2.5v ~ 3.6v
- Support current: 5V 300mA, 12V 100mA
- Operating Temperature: -40 ~ 85°C
Current Input (DC) Measuring :
- Range: 0 ~ 20mA
- Accuracy: 0.02mA
- Resolution: 0.001mA
Voltage Input Measuring:
- Range: 0 ~ 30v
- Accuracy: 0.02v
- Resolution: 0.001v
NB-IoT Spec:
NB-IoT Module: BC660K-GL
Support Bands:
- B1 @H-FDD: 2100MHz
- B2 @H-FDD: 1900MHz
- B3 @H-FDD: 1800MHz
- B4 @H-FDD: 2100MHz
- B5 @H-FDD: 860MHz
- B8 @H-FDD: 900MHz
- B12 @H-FDD: 720MHz
- B13 @H-FDD: 740MHz
- B17 @H-FDD: 730MHz
- B18 @H-FDD: 870MHz
- B19 @H-FDD: 870MHz
- B20 @H-FDD: 790MHz
- B25 @H-FDD: 1900MHz
- B28 @H-FDD: 750MHz
- B66 @H-FDD: 2000MHz
- B70 @H-FDD: 2000MHz
- B85 @H-FDD: 700MHz
Battery:
- Li/SOCI2 un-chargeable battery
- Capacity: 8500mAh
- Self Discharge: <1% / Year @ 25°C
- Max continuously current: 130mA
- Max boost current: 2A, 1 second
Power Consumption
- STOP Mode: 10uA @ 3.3v
- Max transmit power: 350mA@3.3v
1.4 Connect to SDI-12 Sensor
1.5 Sleep mode and working mode
Deep Sleep Mode: Sensor doesn't have any NB-IoT activate. This mode is used for storage and shipping to save battery life.
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.
1.6 Button & LEDs
Behavior on ACT | Function | Action |
---|---|---|
Pressing ACT between 1s < time < 3s | Send an uplink | If sensor has already attached to NB-IoT network, sensor will send an uplink packet, blue led will blink once. |
Pressing ACT for more than 3s | Active Device | Green led will fast blink 5 times, device will enter OTA mode for 3 seconds. And then start to attach NB-IoT network. |
Fast press ACT 5 times. | Deactivate Device | Red led will solid on for 5 seconds. Means device is in Deep Sleep Mode. |
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.
1.7 BLE connection
SDI-12-NB support BLE remote configure and firmware update.
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:
- Press button to send an uplink
- Press button to active device.
- Device Power on or reset.
If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
1.8 Pin Definitions , Switch & SIM Direction
SDI-12-NB use the mother board which as below.
1.8.1 Jumper JP2
Power on Device when put this jumper.
1.8.2 BOOT MODE / SW1
1) 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.
2) Flash: work mode, device starts to work and send out console output for further debug
1.8.3 Reset Button
Press to reboot the device.
1.8.4 SIM Card Direction
See this link. How to insert SIM Card.
1.9 Mechanical
2. Use SDI-12-NB to communicate with IoT Server
2.1 Send data to IoT server via NB-IoT network
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.
Below shows the network structure:
There are two version: -GE and -1T version of SDI-12-NB.
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.
- Install NB-IoT SIM card and configure APN. See instruction of Attach Network.
- Set up sensor to point to IoT Server. See instruction of Configure to Connect Different Servers.
Below shows result of different server as a glance.
Servers | Dash Board | Comments |
Node-Red | ||
ThingSpeak | ||
ThingsBoard | ||
Tago.IO | ||
General UDP | Raw Payload. Need Developer to design Dash Board | |
General MQTT | Raw Payload. Need Developer to design Dash Board |
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.
2.2 Payload Types
To meet different server requirement, SDI-12-NB supports different payload type.
Includes:
- General JSON format payload. (Type=5)
- HEX format Payload. (Type=0)
User can specify the payload type when choose the connection protocol. Example:
AT+PRO=2,0 // Use UDP Connection & hex Payload
AT+PRO=2,5 // Use UDP Connection & Json Payload
AT+PRO=3,0 // Use MQTT Connection & hex Payload
AT+PRO=3,5 // Use MQTT Connection & Json Payload
AT+PRO=4,0 // Use TCP Connection & hex Payload
AT+PRO=4,5 // Use TCP Connection & Json Payload
2.2.1 General Json Format(Type=5)
This is the General Json Format. As below:
{"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"]}
Notice: The maximum number of bytes in the Payload is 1 payload version number plus 1374 SDI12 data.
Notice, from above payload:
- Payload, Battery, Signal, time are the value at uplink time.
- Json entry 1 ~ 8 are the last 1 ~ 8 sampling data as specify by 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.
2.2.2 HEX format Payload(Type=0)
This is the HEX Format. As below:
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
VersDevice ID(f+IMEI): f863663062798815 = 863663062798815
SIM Card ID(f+IMSI): f460083513507309 = 460083513507309
Version:
These bytes include the hardware and software version.
Higher byte: Specify Sensor Model: 0x16 for SDI-12-NB
Lower byte: Specify the software version: 0x78=120, means firmware version 1.2.0
BAT (Battery Info):
Check the battery voltage for SDI-12-NB.
Ex1: 0x0df4 = 3572mV
Ex2: 0x0B49 = 2889mV
Signal Strength:
NB-IoT Network signal Strength.
Ex1: 0x15 = 21
0 -113dBm or less
1 -111dBm
2...30 -109dBm... -53dBm
31 -51dBm or greater
99 Not known or not detectable
GPIO_EXTI Level:
GPIO_EXTI is used as Interrupt Pin.
Example:
01 (H): GPIO_EXTI pin is high level.
00 (L): GPIO_EXTI pin is low level.
GPIO_EXTI Flag:
This data field shows if this packet is generated by Interrupt Pin or not.
Note: The Interrupt Pin is a separate pin in the screw terminal.
Example:
0x00: Normal uplink packet.
0x01: Interrupt Uplink Packet.
TimeStamp:
Unit TimeStamp Example: 64e2d74f(H) = 1692587855(D)
Put the decimal value into this link(https://www.epochconverter.com))to get the time.
Payload_version:
The payload version number is used to parse different decodes.
SDI12_sensor_data:
The data returned by the SDI-12 sensor or UART sensor needs to be cut out the AT+DATACUTx or AT+ALLDATAMOD commands.
2.3 SDI-12 Related Commands
User need to configure SDI-12-NB to communicate with SDI-12 sensors otherwise the uplink payload will only include a few bytes.
2.3.1 Basic SDI-12 debug command
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.
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.
The following is the display information on the serial port and the server.
al! -- Get SDI-12 sensor Identification
- AT Command: AT+ADDRI=aa
- NB-IoT Downlink(prefix 0xAA00): AA 00 aa
Parameter: aa: ASCII value of SDI-12 sensor address in downlink or HEX value in AT Command)
Example : AT+ADDRI=0 ( Equal to downlink: 0x AA 00 30)
The following is the display information on the serial port and the server.
aM!,aMC!, aM1!- aM9!, aMC1!- aMC9!
aM! : Start Non-Concurrent Measurement
aMC! : Start Non-Concurrent Measurement – Request CRC
aM1!- aM9! : Additional Measurements
aMC1!- aMC9! : Additional Measurements – Request CRC
- AT Command : AT+ADDRM=0,1,0,1
aa: SDI-12 sensor address.
bb: 0: no CRC, 1: request CRC
cc: 1-9: Additional Measurement, 0: no additional measurement
dd: delay (in second) to send aD0! to get return.
The following is the display information on the serial port and the server.
aC!, aCC!, aC1!- aC9!, aCC1!- aCC9!
aC! : Start Concurrent Measurement
aCC! : Start Concurrent Measurement – Request CRC
aC1!- aC9! : Start Additional Concurrent Measurements
aCC1!- aCC9! : Start Additional Concurrent Measurements – Request CRC
- AT Command : AT+ADDRC=0,1,0,1
aa: SDI-12 sensor address.
bb: 0: no CRC, 1: request CRC
cc: 1-9: Additional Measurement, 0: no additional measurement
dd: delay (in second) to send aD0! to get return.
The following is the display information on the serial port and the server.
aR0!- aR9!, aRC0!- aRC9!
Start Continuous Measurement
Start Continuous Measurement – Request CRC
- AT Command : AT+ADDRR=0,1,0,1
aa: SDI-12 sensor address.
bb: 0: no CRC, 1: request CRC
cc: 1-9: Additional Measurement, 0: no additional measurement
dd: delay (in second) to send aD0! to get return.
The following is the display information on the serial port and the server.
2.3.2 Advance SDI-12 Debug command
This command can be used to debug all SDI-12 command.
Example1: AT+CFGDEV =0RC0!,1
0RC0! : SDI-12 Command,
1 : Delay 1 second. ( 0: 810 mini-second)
The following is the display information on the serial port and the server.
Example2: AT+CFGDEV =0M!,1,1
0M! : SDI-12 Command,
1 : Delay 1 second. ( 0: 810 mini-second)
1 : Use aD0! command access.
The following is the display information on the serial port and the server.
2.3.3 Convert ASCII to String
This command is used to convert between ASCII and String format.
AT+CONVFORM ( Max length: 80 bytes)
Example:
1) AT+CONVFORM=0, string Convert String from String to ASCII
2) AT+CONVFORM=1, ASCII Convert ASCII to String.
2.3.4 Define periodically SDI-12 commands and uplink.
AT+COMMANDx & AT+DATACUTx
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.
- AT Command:
AT+COMMANDx=var1,var2,var3,var4.
var1: SDI-12 command , for example: 0RC0!
var2: Wait timeout for return. (unit: second)
var3: Whether to send addrD0! to get return after var2 timeout. 0: Don't Send addrD0! ; 1: Send addrD0!.
var4: validation check for return. If return invalid, SDI-12-NB will resend this command. Max 3 retries.
0 No validation check;
1 Check if return chars are printable char(0x20 ~ 0x7E);
2 Check if there is return from SDI-12 sensor
3 Check if return pass CRC check ( SDI-12 command var1 must include CRC request);
Each AT+COMMANDx is followed by a 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.
AT+DATACUTx : This command defines how to handle the return from AT+COMMANDx, max return length is 100 bytes.
AT+DATACUTx=a,b,c a: length for the return of AT+COMMAND b: 1: grab valid value by byte, max 6 bytes. 2: grab valid value by bytes section, max 3 sections. c: define the position for valid value. |
For example, if return from AT+COMMAND1 is “013METER TER12 112T12-00024895<CR><LF>” , Below AT+DATACUT1 will get different result to combine payload:
AT+DATACUT1 value | Final Result to combine Payload |
---|---|
34,1,1+2+3 | 0D 00 01 30 31 33 |
34,2,1~8+12~16 | 0D 00 01 30 31 33 4D 45 54 45 52 54 45 52 31 32 |
34,2,1~34 | 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 |
Note : if user use AT+COMMANDx to add a new command, he also need to send AT+DATACUTx downlink.
Clear SDI12 Command
The AT+COMMANDx and AT+DATACUTx settings are stored in special location, user can use below command to clear them.
- AT Command:
AT+CMDEAR=mm,nn mm: start position of erase ,nn: stop position of erase
Etc. AT+CMDEAR=1,10 means erase AT+COMMAND1/AT+DATACUT1 to AT+COMMAND10/AT+DATACUT10
command combination
Below shows a screen shot how the results combines together to a uplink payload.
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.
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.
For example: as below photo, AT+ALLDATAMOD=1, but AT+DATACUT1&2 has been set, AT+DATACUT1 &2will be still effect the result.
If AT+ALLDATAMOD=1, FX,X will be added in the payload, FX specify which command is used and X specify the length of return(Hex format), (X) in JSON format will be added to the payload, where X represents the command number.
for example in above screen, F1 23 means the return is from AT+COMMAND1 and the return is 35 bytes.
2.4 Examples To Set SDI commands
Note: The reading sensor command method of the NB series SDI12 converter is the same as that of the LORA series SDI12 converter.
2.4.1 Examples 1 -- General Example
COM port and SDI-12 sensor communication converted to SDI-12-NB and SDI-12 sensor communication.
1) The AT+COMMANDx command is applied to the red arrow part, and sends the SDI12 command to the SDI12 sensor:
a. Send the first command and get the first reply:
AT+COMMANDx=1I!,0,0,1
b. Send the second command and get the second reply:
AT+COMMANDx=2I!,0,0,1
c. Send the third command and get the third reply:
AT+COMMANDx=3I!,0,0,1
d. Send the fourth command and get the fourth reply:
AT+COMMANDx=4I!,0,0,1
e. Send the fifth command plus the sixth command, get the sixth reply:
AT+COMMANDx=1M!,2,1,1
f. Send the seventh command plus the eighth command, get the eighth reply:
AT+COMMANDx=2M!,2,1,1
g. Send the ninth command plus the tenth command, get the tenth reply:
AT+COMMANDx=3M!,1,1,1
h. Send the eleventh command plus the twelfth command, get the twelfth reply:
AT+COMMANDx=4M!,1,1,1
2) The AT+DATACUTx command is applied to the green arrow part, receiving and cut out data from the SDI12 sensor:
a. The first reply, all 34 characters: ”113TRUEBNERSMT100038220303182331<CR><LF>”
Cut out all characters: AT+ALLDATAMOD=1 or AT+DATACUTx=34,2,1~34;
b. The sixth reply, all 31 characters:”1+19210+1.04+0.00+22.49+11.75<CR><LF>”
Cut out all characters: AT+ALLDATAMOD=1 or AT+DATACUTx=31,2,1~31;
c. The eighth reply, all 31 characters:”2+18990+1.08+0.00+22.24+11.80<CR><LF>”
Cut out all characters: AT+ALLDATAMOD=1 or AT+DATACUTx=31,2,1~31;
d. The tenth reply, all 15 characters:”3-2919.8+24.0<CR><LF>”
Cut out all characters: AT+ALLDATAMOD=1 or AT+DATACUTx=15,2,1~15;
e. The twelfth reply, all 25 characters:”4+30.8+22.84+4.7+954.38<CR><LF>”
Partial cut, the cut sensor address and the first two parameters:AT+DATACUTx=25,2,1~12, cut out the character field ” 4+30.8+22.84”.
2.4.2 Example 2 -- Connect to Hygrovue10
2.4.2.1 Reference Manual and Command
- Commands to be used in PC and output.
1. check device address
2. change device address
3. check device ID
4. start measure
5. Get Meausre result
2.4.2.2 Hardware Connection to SDI-12-NB
2.4.2.3 Commands set in SDI-12-NB and uplink payload
2.4.3 Example 3 -- Connect to SIL-400
2.4.3.1 Reference Manual and Command
- Commands to be used in PC and output.
1. check device address
2. change device address
3. check device ID
4. start measure
5. Get Meausre result
2.4.3.2 Hardware Connection to SDI-12-NB
2.4.3.3 Commands set in SDI-12-NB and uplink payload
2.4.4 Example 4 -- Connect to TEROS-12
2.4.4.1 Reference Manual and Command
- Commands to be used in PC and output.
1.check device address
2.change device address
3.check device ID
4.start measure
5.Get Meausre result
2.4.4.2 Hardware Connection to SDI-12-NB
2.4.4.3 Commands set in SDI-12-NB and uplink payload
2.4.5 Example 5 -- Connect to SIL-400/TEROS-12 & Hygrovue10
2.4.5.1 Important Notice!
- The product page and reference command see above example 2,3,4
- 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.
- 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.
- If these SDI-12 sensors are powered by external power source. It will add 300uA in the total current in SDI-12-NB.
2.4.5.2 Hardware Connection to SDI-12-NB
2.4.5.3 Commands set in SDI-12-NB and uplink payload
2.4.6 Example 6 -- Connect to ENTELECHY-EP_SDI-12
2.4.6.1 Reference Manual and Command
- Commands to be used in PC and output.
1.check device address
2.change device address
3.check device ID
4.start measure
5.Get Meausre result
2.4.6.2 Hardware Connection to SDI-12-NB
2.4.6.3 Commands set in SDI-12-NB and uplink payload
2.6.7 Example 7 -- Connect to GroPoint Profile-8 (SDI-12 Version)
2.6.7.1 Reference Manual and Command
- Commands to be used in PC and output.
- check device address
- change device address
- check device ID
- start measure
- Get Meausre result
2.6.7.2 Hardware Connection to SDI-12-NB
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.)
2.6.7.3 Commands set in SDI-12-NB and uplink payload
DATA in TTN:
2.6.8 Example 8 -- Connect to Acclima TDR Soil Moisture Sensor
2.6.8.1 Reference Manual and Command
- Commands to be used in PC and output.
- check device address
- change device address
- check device ID
- start measure
- Get Meausre result
2.6.8.2 Hardware Connection to SDI-12-NB
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.)
2.6.8.3 Commands set in SDI-12-NB and uplink payload
DATA in TTN:
2.5 Test Uplink and Change Update Interval
By default, Sensor will send uplinks every 2 hours
User can use below commands to change the uplink interval.
AT+TDC=7200 // Set Update Interval to 7200s
User can also push the button for more than 1 seconds to activate an uplink.
2.6 Trggier an uplink by external interrupt
SDI-12-NB has an external trigger interrupt function. Users can use the GPIO_EXTI pin to trigger the upload of data packets.
AT command:
- AT+INTMOD // Set the trigger interrupt mode
- AT+INTMOD=0 // Disable Interrupt,as a digital input pin
- AT+INTMOD=1 // Trigger by rising and falling edge
- AT+INTMOD=2 // Trigger by falling edge
- AT+INTMOD=3 // Trigger by rising edge
2.7 Set the output time
Feature, Control the output 3V3 , 5V or 12V.
AT Command: AT+3V3T
Command Example | Function | Response |
---|---|---|
AT+3V3T=? | Show 3V3 open time. | 0 |
AT+3V3T=0 | Normally open 3V3 power supply. | OK |
AT+3V3T=1000 | Close after a delay of 1000 milliseconds. | OK |
AT+3V3T=65535 | Normally closed 3V3 power supply. | OK |
AT Command: AT+5VT
Command Example | Function | Response |
---|---|---|
AT+5VT=? | Show 5V open time. | 0 |
AT+5VT=0 | Normally closed 5V power supply. | OK |
AT+5VT=1000 | Close after a delay of 1000 milliseconds. | OK |
AT+5VT=65535 | Normally open 5V power supply. | OK |
AT Command: AT+12VT
Command Example | Function | Response |
---|---|---|
AT+12VT=? | Show 12V open time. | 0 |
AT+12VT=0 | Normally closed 12V power supply. | OK |
AT+12VT=500 | Close after a delay of 500 milliseconds. | OK |
2.8 Set the all data mode
Feature, Set the all data mode.
AT Command: AT+ALLDATAMOD
Command Example | Function | Response |
---|---|---|
AT+ALLDATAMOD=? | Show current all data mode | 0 |
AT+ALLDATAMOD=1 | Set all data mode is 1. | OK |
2.9 Set the payload version
Feature, Set the payload version.
AT Command: AT+PAYVER
Command Example | Function | Response |
---|---|---|
AT+PAYVER=? | Show current payload version | 1 |
AT+PAYVER=5 | Set payload version is 5. | OK |
2.10 Scheduled domain name resolution
This command is used to set up scheduled domain name resolution
AT Command:
- AT+DNSTIMER=XX // Unit: hour
After setting this command, domain name resolution will be performed regularly.
2.11 Clock logging
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.
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.
- AT Command: AT+CLOCKLOG=a,b,c,d
a: 0: Disable Clock logging. 1: Enable Clock Logging
b: Specify First sampling start second: range (0 ~ 3599, 65535) // Note: If parameter b is set to 65535, the log period starts after the node accesses the network and sends packets.
c: Specify the sampling interval: range (0 ~ 255 minutes)
d: How many entries should be uplink on every TDC (max 32)
Note: To disable clock recording, set the following parameters: AT+CLOCKLOG=1,65535,0,0
Example:
AT+CLOCKLOG=1,65535,5,5
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).
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.
2.12 Set the downlink debugging mode(Since firmware v1.2.0)
Feature: Set the conversion between the standard version and 1T version downlinks.
AT command: AT+DOWNTE
Command Example | Function/Parameters | Response/Explanation |
---|---|---|
AT+DOWNTE=? | Get current Settings | 0,0 (default) OK |
AT+DOWNTE=a,b | a: Set the conversion between the downlink of the standard version and 1T version | 0: Set the downlink of the standard version. |
b: Enable/Disable downlink debugging | 0: Disable downlink debugging mode. |
Example:
- AT+DOWNTE=0,1 //Set to standard version downlink, and enable downlink debugging.
- AT+DOWNTE=1,1 //Set to 1T version downlink, and enable downlink debugging.
Downlink Command:
No downlink commands for feature
2.13 Domain name resolution settings(Since firmware v1.2.0)
Feature: Set dynamic domain name resolution IP.
AT command: AT+BKDNS
Command Example | Function/Parameters | Response/Explanation |
---|---|---|
AT+BKDNS=? | Get current Settings | 0,0,NULL (default) OK |
AT+BKDNS=a,b,c |
a: Enable/Disable dynamic domain name resolution. | 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. 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. |
b: Set the time to update the domain name resolution at regular intervals. |
Unit: hour | |
c: Set the IP address manually. | The format is the same as AT+SERVADDR. 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. |
Example:
- AT+BKDNS=1,0 //Dynamic domain name resolution is disabled.
- AT+BKDNS=2,1 //The dynamic domain name resolution function is enabled and the automatic update time is set to 1 hour.
- 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.
Downlink Command:
No downlink commands for feature
3. Configure SDI-12-NB
3.1 Configure Methods
SDI-12-NB supports below configure method:
- AT Command via Bluetooth Connection (Recommended): BLE Configure Instruction.
- AT Command via UART Connection : See UART Connection.
3.2 Serial Access Password
After the Bluetooth or UART connection is successful, use the Serial Access Password to enter the AT command window.
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.
If you need to change the password, use AT+PWORD=xxxxxx (6 characters), NB nodes only support lowercase letters.
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.
3.3 AT Commands Set
AT+<CMD>? : Help on <CMD>
AT+<CMD> : Run <CMD>
AT+<CMD>=<value> : Set the value
AT+<CMD>=? : Get the value
General Commands
AT : Attention
AT? : Short Help
ATZ : MCU Reset
AT+TDC : Application Data Transmission Interval
AT+CFG : Print all configurations
AT+MODEL :Get module information
AT+SLEEP :Get or set the sleep status
AT+DEUI : Get or set the Device ID
AT+INTMOD : Set the trigger interrupt mode
AT+APN : Get or set the APN
AT+3V3T : Set extend the time of 3V3 power
AT+5VT : Set extend the time of 5V power
AT+12VT : Set extend the time of 12V power
AT+ADDRI : Send aI command to SDI12 sensor
AT+ADDRM : Send aM command to SDI12 sensor
AT+ADDRC : Send aC command to SDI12 sensor
AT+ADDRR : Send aR command to SDI12 sensor
AT+CMDEAR : Erase command(number of begin to number of ending)
AT+CFGDEV : Send data to SDI12 deceive
AT+PAYVER : Get or Set payload version
AT+ALLDATAMOD : Get or Set mode of all data is cuted
AT+CONVFORM : Conversion between characters and their ASCII
AT+COMMAND : Send data of command1-15 to SDI12 deceive for payload
AT+DATACUT : Cut receive data after use command1-15
AT+PRO : Choose agreement
AT+RXDL : Extend the sending and receiving time
AT+DNSCFG : Get or Set DNS Server
AT+CSQTIME : Get or Set the time to join the network
AT+DNSTIMER : Get or Set the NDS timer
AT+TLSMOD : Get or Set the TLS mode
AT+GETSENSORVALUE : Returns the current sensor measurement
AT+SERVADDR : Server Address
MQTT Management
AT+CLIENT : Get or Set MQTT client
AT+UNAME : Get or Set MQTT Username
AT+PWD : Get or Set MQTT password
AT+PUBTOPIC : Get or Set MQTT publish topic
AT+SUBTOPIC : Get or Set MQTT subscription topic
Information
AT+FDR : Factory Data Reset
AT+PWORD : Serial Access Password
AT+LDATA : Get the last upload data
4. Battery & Power Consumption
SDI-12-NB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
Battery Info & Power Consumption Analyze .
5. Firmware update
User can change device firmware to::
- Update with new features.
- Fix bugs.
Firmware and changelog can be downloaded from : Firmware download link
Methods to Update Firmware:
- (Recommended way) OTA firmware update via BLE: Instruction.
- Update through UART TTL interface : Instruction.
6. FAQ
6.1 How can I access t BC660K-GL AT Commands?
User can access to BC660K-GL directly and send AT Commands.
6.2 How to configure the device through the MQTT subscription function?
Subscription content: {AT COMMAND}
Example:
Setting AT+5VT=500 through Node-RED requires MQTT to send the content {AT+5VT=500}.
The serial port displays:
7. Order Info
Part Number: SDI-12-NB-XX-YY
XX:
- GE: General version ( Exclude SIM card)
- 1T: with 1NCE * 10 years 500MB SIM card and Pre-configure to ThingsEye server
YY: The grand connector hole size
- M12: M12 hole
- M16: M16 hole
8. Packing Info
Package Includes:
- SDI-12-NB SDI-12 to NB-IoT Converter x 1
- External antenna x 1
Dimension and weight:
- Device Size: cm
- Device Weight: g
- Package Size / pcs : cm
- Weight / pcs : g
9. Support
- 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.
- 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.