Last modified by Mengting Qiu on 2025/06/13 09:57

Show last authors
1
2
3 [[image:image-20230819102136-3.png||data-xwiki-image-style-alignment="center" height="425" width="646"]]
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 Temperature & Humidity Sensor ==
22
23
24 The Dragino S31-CB and S31B-CB are (% style="color:blue" %)**NB-IoT/LTE-M Temperature and Humidity Sensor**(%%) for Internet of Things solution. It is used to measure the surrounding (% style="color:blue" %)**environment temperature and relative air humidity precisely**(%%), and then upload to IoT server via NB-IoT or CAT-M1 network.
25
26 The temperature & humidity sensor used in S31x-CB is SHT31, which is fully calibrated, linearized, and temperature compensated digital output from Sensirion, it provides a strong reliability and long-term stability. The SHT31 is fixed in a (% style="color:blue" %)**waterproof anti-condensation casing**(%%) for long term use.
27
28 S31x-CB supports different uplink methods include (% style="color:blue" %)**MQTT, MQTTs, TCP, UDP or CoAP**(%%) for different application requirement. and Support Uplinks to various IoT Servers.
29
30 S31x-CB is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), It is designed for long term use up to several years. (Real-world battery life depends on the use environment, update period and uplink method. Please check related Power Analyze report).
31
32 *make sure you have NB-IoT or CAT-M1 coverage locally.
33
34
35 == 1.2 ​Features ==
36
37
38 * For -NB Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85
39 * For -CB Bands: B1/B2/B3/B4/B5/B8/B12/B13~/~/B18/B19/B20/B25/B28/B66/B71/B85
40 * CAT-M1 / LTE-M Bands: B1/B2/B3/B4/B5/B8/B12/B13/B18/B19/B20/B25/B26/B27/B28/B66/B85
41 * Ultra-low power consumption
42 * External 3 meters SHT31 probe (For S31-CB)
43 * Measure range -40°C ~~ 80°C
44 * Temperature & Humidity alarm
45 * Multiply Sampling and one uplink
46 * Uplink via MQTT, MQTTs, TCP, UDP or CoAP
47 * GNSS for Location Report
48 * Support Bluetooth v5.1 remote configure and update firmware
49 * Uplink on periodically
50 * Downlink to change configure
51 * 8500mAh Li/SOCl2 Battery (S31x-CB)
52 * Solar panel + 3000mAh Li-ion battery (S31x-CS)
53 * Nano SIM card slot for NB-IoT SIM
54
55 == 1.3 Specification ==
56
57
58 (% style="color:blue" %)**Common DC Characteristics:**
59
60 * Supply Voltage: 2.6v ~~ 3.6v
61 * Operating Temperature: -40 ~~ 85°C
62
63 (% style="color:blue" %)**Temperature Sensor:**
64
65 * Range: -40 to + 80°C
66 * Accuracy: ±0.2 @ 0-90 °C
67 * Resolution: 0.1°C
68 * Long Term Shift: <0.03 °C/yr
69
70 (% style="color:blue" %)**Humidity Sensor: **
71
72 * Range: 0 ~~ 99.9% RH
73 * Accuracy: ± 2%RH ( 0 ~~ 100%RH)
74 * Resolution: 0.01% RH
75 * Long Term Shift: <0.25 %RH/yr
76
77 (% style="color:blue" %)**NB-IoT Spec:**
78
79 (% style="color:#037691" %)**NB-IoT Module: BG95-NGFF**
80
81 (% style="color:#037691" %)**Support Bands:**
82
83 * B1 @H-FDD: 2100MHz
84 * B2 @H-FDD: 1900MHz
85 * B3 @H-FDD: 1800MHz
86 * B4 @H-FDD: 2100MHz
87 * B5 @H-FDD: 860MHz
88 * B8 @H-FDD: 900MHz
89 * B12 @H-FDD: 720MHz
90 * B13 @H-FDD: 740MHz
91 * B17 @H-FDD: 730MHz
92 * B18 @H-FDD: 870MHz
93 * B19 @H-FDD: 870MHz
94 * B20 @H-FDD: 790MHz
95 * B25 @H-FDD: 1900MHz
96 * B28 @H-FDD: 750MHz
97 * B66 @H-FDD: 2000MHz
98 * B70 @H-FDD: 2000MHz
99 * B85 @H-FDD: 700MHz
100
101 (% style="color:blue" %)**Battery:**
102
103 * Li/SOCI2 un-chargeable battery
104 * Capacity: 8500mAh
105 * Self Discharge: <1% / Year @ 25°C
106 * Max continuously current: 130mA
107 * Max boost current: 2A, 1 second
108
109 (% style="color:blue" %)**Power Consumption:**
110
111 * STOP Mode: 14uA @ 3.3v
112 * Max transmit power: 350mA@3.3v
113
114 == 1.4 Applications ==
115
116
117 * Smart Buildings & Home Automation
118 * Logistics and Supply Chain Management
119 * Smart Metering
120 * Smart Agriculture
121 * Smart Cities
122 * Smart Factory
123
124 == 1.5 Sleep mode and working mode ==
125
126
127 (% style="color:blue" %)**Deep Sleep Mode: **(%%)Sensor doesn't have any NB-IoT/CAT-M1 activate. This mode is used for storage and shipping to save battery life.
128
129 (% 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.
130
131
132 == 1.6 Button & LEDs ==
133
134
135 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675071855856-879.png]]
136
137 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
138 |=(% 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**
139 |[[image:1749523503750-484.png]] 1~~3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
140 If sensor has already attached to NB-IoT/CAT-M1 network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
141 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
142 )))
143 |[[image:1749523505736-728.png]] >3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
144 (% style="color:green" %)**Green led**(%%) will fast blink 5 times, device will enter (% style="color:#037691" %)**OTA mode**(%%) for 3 seconds. And then start to attach NB-IoT/CAT-M1 network.
145 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
146 Once sensor is active, BLE module will be active and user can connect via BLE to configure device, no matter if device attach NB-IoT/CAT-M1 network or not.
147 )))
148 |[[image:1749523513440-828.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.
149
150 (% 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.**
151
152
153 == 1.7 BLE connection ==
154
155
156 S31x-CB support BLE remote configure and firmware update.
157
158 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:
159
160 * Press button to send an uplink
161 * Press button to active device.
162 * Device Power on or reset.
163
164 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
165
166
167 == 1.8 Pin Definitions , Switch & SIM Direction ==
168
169
170 [[image:image-20240617104620-1.png]]
171
172
173 === 1.8.1 Jumper JP2 ===
174
175
176 Power on Device when put this jumper.
177
178 Power off device when take out this jumper
179
180
181 === 1.8.2 BOOT MODE / SW1 ===
182
183
184 **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.
185
186 **2)** (% style="color:blue" %)**Flash**(%%): work mode, device starts to work and send out console output for further debug
187
188
189 === 1.8.3 Reset Button ===
190
191
192 Press to reboot the device.
193
194
195 === 1.8.4 SIM Card Direction ===
196
197
198 See this link. [[How to insert SIM Card>>https://wiki.dragino.com/xwiki/bin/view/Main/General%20Manual%20for%20-CB%20%2C%20-CS%20models/#H2.AttachNetwork]].
199
200
201 == 1.9 Hardware Variant ==
202
203
204 (% border="1" cellspacing="3" style="width:410px" %)
205 |=(% style="width: 103px;background-color:#4F81BD;color:white" %)Model|=(% style="width: 127px; background-color:#4F81BD;color:white" %)Photo|=(% style="width: 180px;background-color:#4F81BD;color:white" %)Probe Info
206 |(% style="width:102px" %)(((
207 S31-CB
208 )))|(% style="width:126px" %)(((
209 [[image:image-20230819110632-6.png||data-xwiki-image-style-alignment="center" height="130" width="104"]]
210 )))|(% style="width:179px" %)(((
211 1 x SHT31 Probe
212
213 Cable Length : 3 meters
214
215
216 )))
217 |(% style="width:102px" %)(((
218 S31B-CB
219 )))|(% style="width:126px" %)(((
220 [[image:image-20230819110702-7.png||data-xwiki-image-style-alignment="center" height="164" width="90"]]
221 )))|(% style="width:179px" %)(((
222 1 x SHT31 Probe
223
224 Installed in device.
225 )))
226
227 (% style="display:none" %)
228
229 == 1.10 Wiring of DS18B20 temperature sensor ==
230
231 The S31x-CB supports connection to the external temperature sensor DS18B20. The wiring method is as follows:
232
233 [[image:1749779850163-145.jpg||height="408" width="651"]]
234
235
236 = 2. Use S31x-CB to communicate with IoT Server =
237
238 == 2.1 Send data to IoT server via NB-IoT/CAT-M1 network ==
239
240
241 The S31x-CB is equipped with a NB-IoT module, the pre-loaded firmware in S31x-CB will get environment data from sensors and send the value to local NB-IoT network via the NB-IoT module.  The NB-IoT network will forward this value to IoT server via the protocol defined by S31x-CB.
242
243
244 Below shows the network structure:
245
246 [[image:image-20240611104604-2.png]]
247
248
249 There are two version: (% style="color:blue" %)**-GE**(%%) and (% style="color:blue" %)**-1T**(%%) version of S31x-CB.
250
251
252 (% 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 S31x-CB send data to IoT server.
253
254 * 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]].
255
256 * 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]]. 
257
258 Below shows result of different server as a glance.
259
260 (% border="1" cellspacing="3" style="width:515px" %)
261 |(% 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**
262 |(% 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" %)(((
263 [[image:image-20230819113244-8.png||data-xwiki-image-style-alignment="center" height="183" width="367"]]
264 )))|(% style="width:170px" %)
265 |(% 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" %)(((
266 [[image:image-20230819113244-9.png||data-xwiki-image-style-alignment="center" height="119" width="367"]]
267 )))|(% style="width:170px" %)
268 |(% 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" %)
269 |(% 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" %)
270 |(% 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" %)
271 |(% style="width:127px" %)[[ThingSpeak>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.3A0ThingSpeakA028viaA0MQTT29]]|(% style="width:385px" %)(((
272 [[image:image-20230819113244-10.png||data-xwiki-image-style-alignment="center" height="104" width="367"]]
273 )))|(% style="width:170px" %)
274 |(% style="width:127px" %)[[ThingsBoard>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.6A0ThingsBoard.CloudA028viaA0MQTT29]]|(% style="width:385px" %)(((
275 [[image:image-20230819113244-11.png||data-xwiki-image-style-alignment="center" height="141" width="367"]]
276 )))|(% style="width:170px" %)
277
278 (% 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 S31x-CB and user will be able to see data in ThingsEye. See here for [[ThingsEye Config Instruction>>url:https://wiki.thingseye.io/xwiki/bin/view/Main/]].
279
280
281 == 2.2 ​Payload Types ==
282
283
284 To meet different server requirement, S31x-CB supports different payload type.
285
286 **Includes:**
287
288 * [[General JSON format payload>>||anchor="H2.2.1GeneralJsonFormat28Type3D529"]]. (Type=5)
289
290 * [[HEX format Payload>>||anchor="H2.2.2HEXformatPayload28Type3D029"]]. (Type=0)
291
292 * [[ThingSpeak Format>>||anchor="H2.2.4ThingSpeakPayload28Type3D129"]]. (Type=1)
293
294 * [[ThingsBoard Format>>||anchor="H2.2.3ThingsBoardPayload28Type3D329"]]. (Type=3)
295
296 User can specify the payload type when choose the connection protocol. Example:
297
298 (% style="color:#037691" %)**AT+PRO=1,0**  (%%) ~/~/ Use COAP Connection & hex Payload
299
300 (% style="color:#037691" %)**AT+PRO=1,5**   (%%) ~/~/ Use COAP Connection & Json Payload
301
302 (% style="color:#037691" %)**AT+PRO=2,0**  (%%) ~/~/ Use UDP Connection & hex Payload
303
304 (% style="color:#037691" %)**AT+PRO=2,5**   (%%) ~/~/ Use UDP Connection & Json Payload
305
306 (% style="color:#037691" %)**AT+PRO=3,0**  (%%) ~/~/ Use MQTT Connection & hex Payload
307
308 (% style="color:#037691" %)**AT+PRO=3,5**   (%%) ~/~/ Use MQTT Connection & Json Payload
309
310 (% style="color:#037691" %)**AT+PRO=4,0**  (%%) ~/~/ Use TCP Connection & hex Payload
311
312 (% style="color:#037691" %)**AT+PRO=4,5**   (%%) ~/~/ Use TCP Connection & Json Payload
313
314
315 **Since firmware V1.0.4**, [[count mode>>||anchor="H3.27Workingmodeselection28SincefirmwareV1.0.429"]] has been added to S31x-CB, so paylaod adds count.
316
317 **Since firmware V1.1.0**, (% style="color:#4472c4" %)**IMSI**(%%) has been added to payload.
318
319 The following describes the latest payload.
320
321 (% style="color:red" %)**Note: The default is AT+GPS=0  ~/~/ The GPS function is not enabled. Therefore, the GPS collection time in the following example paylaod does not follow the system time, and the latitude and longitude are 0.**
322
323
324 === 2.2.1 General Json Format(Type~=5) ===
325
326
327 This is the General Json Format. As below:
328
329 (% style="color:#4472c4" %)**{"IMEI":"868508065628110","IMSI":"460240210507481","Model":"S31x-CB","temperature":25.6,"humidity":52.5,"interrupt":0,"interrupt_level":0,"count":0,"battery":3.48,"signal":21,"time":"2024/12/03 03:24:54","latitude":0.000000,"longitude":0.000000,"gps_time":"1970-01-01T00:00:00Z","1":[24.2,52.5,"2024-12-02T05:34:19Z"],"2":[24.1,52.5,"2024-12-02T05:19:19Z"],"3":[24.1,52.6,"2024-12-02T05:04:19Z"],"4":[24.2,52.8,"2024-12-02T04:49:19Z"],"5":[24.3,52.0,"2024-12-02T04:34:19Z"],"6":[24.2,51.6,"2024-12-02T04:19:19Z"],"7":[24.5,50.2,"2024-12-02T03:39:02Z"],"8":[24.3,50.1,"2024-12-02T03:24:02Z"]}**
330
331
332 (% style="color:red" %)**Notice, from above payload:**
333
334 * Temperature, Humidity, Interrupt, Interrupt_level,  Count, Battery, Signal, latitude, longitude & GPS time are the value at uplink time.
335
336 * Json entry 1 ~~ 8 are the last 1 ~~ 8 sampling data as specify by (% style="color:#037691" %)**AT+CLOCKLOG=1,65535,15,8 ** (%%)Command. Each entry includes (from left to right): Temperature, Humidity, Sampling time.
337
338 Example:
339
340 [[image:image-20241203113440-1.png||height="680" width="850"]]
341
342
343 === 2.2.2 HEX format Payload(Type~=0) ===
344
345
346 This is the HEX Format. As below:
347
348 (% style="color:#4472c4" %)**f864370064394465f4600868604090064a6f0c011702Ffff00000000000000003200fd03086801e4d700000000000000000000000000fb03246801e29f00f302dd6801df1b010003386801db9700fb03136801d81300fa02e46801d48f00fc02e66801d10b010202eb6801cd87010302de6801ca03**
349
350 [[image:image-20250418141250-1.png]]
351
352 [[image:image-20250418141314-2.png]]
353
354
355 (% style="color:blue" %)**Device ID(f+IMEI): **(%%)f864370064394465 =864370064394465
356
357
358 (% style="color:blue" %)**SIM Card ID(f+IMSI): **(%%)f460086860409006 =460086860409006
359
360
361 (% style="color:blue" %)**Version:**
362
363 These bytes include the hardware and software version.
364
365 (% style="color:#037691" %)**Higher byte:**(%%) Specify Sensor Model: 0x4a for S31B-CB & S31-CB
366
367 (% style="color:#037691" %)**Lower byte:**(%%) Specify the software version: 0x6f=111, means firmware version 1.1.1
368
369
370 (% style="color:blue" %)**BAT (Battery Info):**
371
372 Ex1: 0x0c01 = 3073mV
373
374
375 (% style="color:blue" %)**Signal Strength:**
376
377 NB-IoT Network signal Strength.
378
379 **Ex1: 0x17 = 23**
380
381 **0**  -113dBm or less
382
383 **1**  -111dBm
384
385 **2...30** -109dBm... -53dBm
386
387 **31**   -51dBm or greater
388
389 **99**    Not known or not detectable
390
391
392 (% style="color:blue" %)**DS18B20_Temperature:**
393
394 **Example:** 0x00de(H)= 222(D) =22.2 ℃
395
396 (% style="color:red" %)**Note:**(%%) If the DS18B20 sensor is not connected, the hex payload is **0xFFFF** and Serial port print: **-409.5 ℃.**
397
398
399 (% style="color:blue" %)**PA4_level:**
400
401 Level of PA4 pin. (0: Low level  1: High level)
402
403
404 (% style="color:blue" %)**Interrupt:**
405
406 This data field shows if this packet is generated by interrupt or not.
407
408 **Example:**
409
410 If byte[0]&0x01=0x00 : Normal uplink packet.
411
412 If byte[0]&0x01=0x01 : Interrupt Uplink Packet.
413
414
415 (% style="color:blue" %)**Interrupt_level:**
416
417 This byte shows whether the interrupt is triggered by a high or low level.
418
419 **Ex1:** 0x00  Interrupt triggered by falling edge (low level)
420
421 **Ex2: **0x01  Interrupt triggered by rising edge (high level)
422
423
424 (% style="color:blue" %)**Count:**
425
426 When using count mode, PB15 will accumulate counts each time it is triggered.
427
428 **Example: **0x00000064(H)= 100(D), So the count value is 100.
429
430 Use the **[[AT+CFGMOD>>||anchor="H3.27Workingmodeselection28SincefirmwareV1.0.429"]]** command to set the working mode to count mode.
431
432 Use **[[AT+EXT>>||anchor="H3.28SetCountvalue28SincefirmwareV1.0.429"]]** to set the count value.
433
434
435 (% style="color:blue" %)**Temperature: **
436
437 If payload is: 0105H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree
438
439 If payload is: FF3FH :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
440
441 (FF3F & 8000: Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
442
443
444 (% style="color:blue" %)**Humidity:   **
445
446 Read:0295(H)=661(D)    Value:  661 / 10=66.1, So 66.1%
447
448
449 (% style="color:blue" %)**TimeStamp & GPS Timestamp**
450
451 Unit TimeStamp Example: 666A909F(H) = 1718259871(D)
452
453 Put the decimal value into this link(https:~/~/www.epochconverter.com/) to get the time.
454
455
456 (% style="color:blue" %)**Latitude:**
457
458 **Example: **0x015a7886(H)=22706310(D)=22.706150
459
460
461 (% style="color:blue" %)**Longitude:   **
462
463 **Example: **0x06cf341e(H)=114242590(D)=114.242830
464
465
466 === 2.2.3 ThingsBoard Payload(Type~=3) ===
467
468
469 Type3 payload special design for ThingsBoard, it will also configure other default server to ThingsBoard.
470
471 (% style="color:#4472c4" %)**{
472 "topic": "002_CB",
473 "payload": {
474 "IMEI": "868508065628110",
475 "IMSI": "460240210507481",
476 "Model": "S31x-CB",
477 "temperature": 23.7,
478 "humidity": 51.4,
479 "interrupt": 0,
480 "interrupt_level": 0,
481 "count": 0,
482 "battery": 3.15,
483 "signal": 25,
484 "time": "2024/12/09 03:35:07",
485 "latitude": 0.0,
486 "longitude": 0.0,
487 "gps_time": "1970-01-01T00:00:00Z",
488 "1": [130.0, 0.0, "2024-12-09T03:24:17Z"],
489 "2": [130.0, 0.0, "2024-12-09T03:02:32Z"],
490 "3": [130.0, 0.0, "2024-12-09T02:52:32Z"],
491 "4": [24.9, 53.3, "2024-12-04T09:10:54Z"],
492 "5": [25.1, 52.7, "2024-12-04T08:55:54Z"],
493 "6": [25.4, 52.0, "2024-12-04T08:40:54Z"],
494 "7": [25.8, 52.9, "2024-12-04T08:25:54Z"],
495 "8": [24.2, 52.5, "2024-12-04T08:10:54Z"]
496 }
497 }**
498
499 [[image:image-20241209113641-2.png]]
500
501
502 === 2.2.4 ThingSpeak Payload(Type~=1) ===
503
504
505 This payload meets ThingSpeak platform requirement. It includes only four fields. Form 1~~6 are:
506
507 Temperature, Humidity, Battery, Signal, Latitude & Longitude. This payload type only valid for ThingsSpeak Platform.
508
509 As below:
510
511 (% style="color:#4472c4" %)**field1=Tem&field2=Hum&field3=BatV&field4=Singal&field5=latitude&field6=longitude**
512
513 [[image:image-20241025142930-2.png||height="809" width="841"]]
514
515
516 = 3. Configure S31x-CB =
517
518 == 3.1 Configure Methods ==
519
520
521 S31x-CB supports below configure method:
522
523 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
524
525 * 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]].
526
527 == ​​​3.2  Serial Access Password ==
528
529
530 After the Bluetooth or UART connection is successful, use the Serial Access Password to enter the AT command window.
531
532 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.
533
534 [[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"]]
535
536
537 If you need to change the password, use **AT+PWORD=**xxxxxx (6 characters), -CB nodes only support lowercase letters.
538
539 [[image:image-20240826183254-2.png]]
540
541
542 (% 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.**
543
544 [[image:image-20240826183302-3.png]]
545
546
547 == 3.3 AT Commands Set ==
548
549
550 AT+<CMD>?  : Help on <CMD>
551
552 AT+<CMD>         : Run <CMD>
553
554 AT+<CMD>=<value> : Set the value
555
556 AT+<CMD>=?  : Get the value
557
558
559 (% style="color:blue" %)**General Commands**      
560
561 AT+MODEL : Get module information
562
563 AT+CFGMOD : Working mode selection
564
565 AT+DEUI : Get or set the Device ID
566
567 AT+CFG : Print all settings
568
569 AT+SERVADDR: Get or Set the Server address
570
571 AT+TDC : Get or set the application data transmission interval in s
572
573 AT+INTMOD : Get or Set the trigger interrupt mode (0:input,1:falling or rising,2:falling,3:rising)
574
575 AT+APN : Get or set the APN
576
577 AT+5VT : Get or Set extend the time of 5V power
578
579 AT+PRO : Get or Set usage agreement (1:COAP,2:UDP,3:MQTT,4:TCP)
580
581 AT+RXDL : Get or Set the receiving time
582
583 AT+EXT : Get or Set Count value
584
585 AT+SHTEMP:Get or Set alarm of shtemp
586
587 AT+SHHUM:Get or Set alarm of shthum
588
589 AT+GETSENSORVALUE : Returns the current sensor measurement
590
591 AT+DNSCFG : Get or Set DNS Server
592
593 AT+CSQTIME : Get or Set the time to join the network
594
595 AT+GDNS : Get or Set the DNS
596
597 AT+SLEEP : Get or Set the sleep mode
598
599 AT+IPTYPE : Set the IPv4 or IPv6
600
601 AT+QSW : Power on and power off BG95 module
602
603 AT+CLOCKLOG: Get or set SHT record time
604
605 AT+QBAND: Get or set Frequency Band
606
607 AT+IOTMOD: Configure Network Category to be Searched for under LTE RAT
608
609 AT+DOWNTE: Get or set the conversion between the standard version and 1T version downlinks
610
611
612 (% style="color:blue" %)**MQTT Management**
613
614 AT+CLIENT : Get or Set the MQTT clientID
615
616 AT+UNAME : Get or Set the MQTT Username
617
618 AT+PWD : Get or Set the MQTT password
619
620 AT+PUBTOPIC: Get or set MQTT publishing topic
621
622 AT+SUBTOPIC: Get or set MQTT subscription topic
623
624 AT+MQOS : Set the QoS level of MQTT
625
626 AT+TLSMOD : Get or Set the TLS mode
627
628
629 (% style="color:blue" %)**COAP Management**
630
631 AT+URI1: Get or set CoAP option 1
632
633 AT+URI2: Get or set CoAP option 2
634
635 AT+URI3: Get or set CoAP option 3
636
637 AT+URI4: Get or set CoAP option 4
638
639 AT+URI5: Get or set CoAP option 5
640
641 AT+URI6: Get or set CoAP option 6
642
643 AT+URI7: Get or set CoAP option 7
644
645 AT+URI8: Get or set CoAP option 8
646
647
648 (% style="color:blue" %)**GPS**
649
650 AT+GNSST : Extend the time to turn on GNSS
651
652 AT+GPS : Turn off and on GPS
653
654 AT+GTDC : Get or set GPS positioning interval in units of h
655
656
657 (% style="color:blue" %)**Information**          
658
659 AT+FDR1 : Reset parameters to factory default values except for passwords
660
661 AT+FDR : Reset Parameters to Factory Default
662
663 AT+PWORD : Get or set the System password
664
665 AT+LDATA : Get the last upload data
666
667 AT+CDP : Read or Clear cached data
668
669 AT+PDTA: Print the sector data from start page to stop page
670
671 AT+PLDTA: Print the last few sets of data
672
673 AT+CLRDTA: Clear the storage, record position back to 1st
674
675 AT+GETLOG : Print serial port logs
676
677 ATZ : Trig a reset of the MCU
678
679
680 == 3.4 Test Uplink and Change Update Interval ==
681
682
683 By default, Sensor will send uplinks **every 2 hours.**
684
685 User can use below commands to change the uplink interval.
686
687 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+TDC** (%%)
688
689 Example: AT+TDC=7200  ~/~/ Set Update Interval to 7200 seconds
690
691 (% style="color:blue" %)**Downlink Commands: **(% style="color:#037691" %)**0x01**
692
693 Format: Command Code (0x01) followed by 3 bytes.
694
695 Example:  12 hours= 43200 seconds  43200(D)=0xA8C0(H)
696
697 Downlink Payload: **01 00 A8 C0**  ~/~/ AT+TDC=43200, Set Update Interval to 12 hours.
698
699 (% style="color:red" %)**Note: User can also push the button for more than 1 second to activate an uplink.**
700
701
702 == 3.5 Set the receiving time ==
703
704
705 Feature: Extend the receiving time
706
707 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+RXDL**
708
709 Example: AT+RXDL=1000  ~/~/ Set the receiving time delay to 1000ms
710
711 (% style="color:blue" %)**Downlink Commands: **(% style="color:#037691" %)**0x03**
712
713 Format: Command Code (0x03) followed by 3 bytes.
714
715 Example:  Downlink Payload: **03 00 03 E8     **~/~/ AT+RXDL=1000
716
717
718 == 3.6 Reset ==
719
720
721 Feature: Trig a reset of the MCU.
722
723 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**ATZ**
724
725 (% style="color:blue" %)**Downlink Commands: **(% style="color:#037691" %)**0x04FF**
726
727
728 == 3.7 +5V ==
729
730
731 Feature: Set extend the time of 5V power.
732
733 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+5VT**
734
735 Example: AT+5VT=2000  ~/~/ Set extend the time of 5V power to 2000 ms
736
737 (% style="color:blue" %)**Downlink Commands: **(% style="color:#037691" %)**0x05**
738
739 Format: Command Code (0x05) followed by 3 bytes.
740
741 Example:  Downlink Payload: **05 00 07 D0    **~/~/ AT+5VT=2000
742
743
744 == 3.8 Trigger an uplink by external interrupt ==
745
746
747 S31x-CB has an external trigger interrupt function. Users can use the PB15 pin to trigger the upload of data packets.
748
749 (% style="color:blue" %)**AT command:**
750
751 * (% style="color:#037691" %)**AT+INTMOD **(%%) ~/~/ Set the trigger interrupt mode
752
753 * (% style="color:#037691" %)**AT+INTMOD=0 **(%%) ~/~/ Disable Interrupt
754
755 * (% style="color:#037691" %)**AT+INTMOD=1 **(%%) ~/~/ Trigger by rising and falling edge
756
757 * (% style="color:#037691" %)**AT+INTMOD=2 **(%%) ~/~/ Trigger by falling edge
758
759 * (% style="color:#037691" %)**AT+INTMOD=3  **(%%) ~/~/ Trigger by rising edge
760
761 (% style="color:blue" %)**Downlink Commands: **(% style="color:#037691" %)**0x06**
762
763 Format: Command Code (0x06) followed by 3 bytes.
764
765 Example1:  Downlink Payload: **06 00 00 01    **~/~/ AT+INTMOD=1
766
767 Example2:  Downlink Payload: **06 00 00 03    **~/~/ AT+INTMOD=3
768
769
770 == 3.9 Set the QoS level ==
771
772
773 This command is used to set the QoS level of **MQTT**.
774
775 (% style="color:blue" %)**AT command:**
776
777 * (% style="color:#037691" %)**AT+MQOS=xx**(%%)**   **~/~/ 0~~2
778
779 (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x07(%%)**
780
781 Format: Command Code (0x07) followed by 1 byte.
782
783 **Ex1:** Downlink payload: **0x0700**  ~/~/ AT+MQOS=0
784
785 **Ex2:** Downlink payload: **0x0701**  ~/~/ AT+MQOS=1
786
787
788 == 3.10 Clock logging ==
789
790
791 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.
792
793 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.
794
795 (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+CLOCKLOG=a,b,c,d(%%)**
796
797 (% style="color:#037691" %)**a: **(%%)**0:** Disable Clock logging.  ** 1: **Enable Clock Logging
798
799 (% 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.
800
801 (% style="color:#037691" %)**c: **(%%)Specify the sampling interval: range **(0 ~~ 255 minutes)**
802
803 (% style="color:#037691" %)**d:**(%%)** **How many entries should be uplink on every TDC **(max 32)**
804
805 (% style="color:red" %)**Note: To disable clock recording, set the following parameters: AT+CLOCKLOG=1,65535,0,0**
806
807 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SPH01-NB_NB-IoT_Soil_pH_Sensor_User_Manual/WebHome/image-20240315141254-1.png?rev=1.1||alt="image-20240315141254-1.png"]]
808
809 **Example:**
810
811 **AT+CLOCKLOG=1,65535,1,5**
812
813 After the node sends the first packet, data is recorded to the memory at intervals of 1 minute. For each TDC uplink, the uplink load will include: battery information + the last 5 memory records (payload + timestamp).
814
815 (% class="wikigeneratedid" %)
816 [[image:image-20240620104257-1.png||height="676" width="1264"]]
817
818 (% class="wikigeneratedid" %)
819 (% 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.**
820
821 (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x08(%%)**
822
823 Format: Command Code (0x08) followed by 5 bytes.
824
825 * **Example 1**: Downlink Payload:** 08 01 FFFF 0F 08**  ~/~/ Set SHT record time: AT+CLOCKLOG=1,65535,15,8
826 * **Example 2**: Downlink Payload:** 08 01 04B0 0F 08**  ~/~/ Set SHT record time: AT+CLOCKLOG=1,1200,15,8
827
828 (% style="color:red" %)**Note: When entering the downlink payload, there must be no Spaces between bytes.**
829
830
831 == 3.11 Set the TLS mode ==
832
833
834 Refer to this link ([[MQTT Connection to send data to Tago.io>>http://wiki.dragino.com/xwiki/bin/view/Main/General%20Manual%20for%20-CB%20%2C%20-CS%20models/#H3.7Tago.io28viaMQTT29]])to use the TLS mode.
835
836 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+TLSMOD**
837
838 **Example 1: ** AT+TLSMOD=0,0  ~/~/ Disable TLS Mode.
839
840 **Example 2:**  AT+TLSMOD=1,0  ~/~/ No authentication
841
842 AT+TLSMOD=1,1  ~/~/ Perform server authentication
843
844 AT+TLSMOD=1,2  ~/~/ Perform server and client authentication if requested by the remote server
845
846 (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x09(%%)**
847
848 Format: Command Code (0x09) followed by 2 bytes.
849
850 Example1:  Downlink Payload: **09 00 00    **~/~/ AT+TLSMOD=0,0
851
852 Example2:  Downlink Payload: **09 01 02    **~/~/ AT+TLSMOD=1,2
853
854
855 == 3.12 Set GNSS open time ==
856
857
858 Extend the time to turn on GNSS. The automatic GPS location time is extended when the node is activated.
859
860 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+GNSST**
861
862 Example: AT+GNSST=30  ~/~/ Set the GPS positioning time to 30 seconds
863
864 (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x10(%%)**
865
866 Format: Command Code (0x10) followed by 2 bytes.
867
868 Example:  Downlink Payload: **10 00 1E    **~/~/ AT+GNSST=30
869
870
871 == 3.13 Turn on/off GPS ==
872
873
874 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+GPS **
875
876 **Ex1:  **AT+GPS=0  ~/~/ Turn off GPS
877
878 **Ex2:  **AT+GPS=1  ~/~/ Turn on GPS
879
880 (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x11(%%)**
881
882 Format: Command Code (0x11) followed by 1 byte.
883
884 Example:  Downlink Payload: **11 01   **~/~/ AT+GPS=1
885
886
887 == 3.14 Set GPS positioning interval ==
888
889
890 Feature: Set GPS positioning interval (unit: hour).
891
892 When GPS is enabled, the node automatically locates and uplinks each time it passes **GTDC time** after activation.
893
894 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+GTDC**
895
896 Example: AT+GTDC=24  ~/~/ Set the GPS positioning interval to 24h.
897
898 (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x12(%%)**
899
900 Format: Command Code (0x12) followed by 3 bytes.
901
902 Example: 24 hours:  24(D)=0x18(H)
903
904 Downlink Payload: **12 00 00 18   **~/~/ AT+GTDC=24
905
906
907 == 3.15 Set the search network time ==
908
909
910 Feature: Get or Set the time to join the network(unit: minutes).
911
912 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+CSQTIME**
913
914 Example: AT+CSQTIME=10  ~/~/ Set the search time to 10 minutes.
915
916 (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x13(%%)**
917
918 Format: Command Code (0x13) followed by 1 byte.
919
920 Example:  Downlink Payload: **13 0A   **~/~/ AT+CSQTIME=10
921
922
923 == 3.16 Humidity and Temperature alarm function ==
924
925
926 On each sampling define by AT+CLOCKLOG=1,65535,(% style="color:red" %)**15**(%%),8 ( default 15 minutes), when the value exceed the range, it will trigger an Alarm and immediately sends a uplink.
927
928 (% style="color:blue" %)**AT Command:**
929
930 (% style="color:#037691" %)**AT+ SHTEMP=min,max**
931
932 SHTTEMP must be -40 to 125.
933
934 Example: AT+ SHTEMP=20,30  ~/~/ Alarm when temperature lower than 20 or higher than 30
935
936 (% style="color:#037691" %)**AT+ SHHUM=min,max**
937
938 Example: AT+ SHHUM=50,80  ~/~/ Alarm when humidity lower than 50 or higher than 80.
939
940
941 (% style="color:blue" %)**Downlink Commands: **(% style="color:#037691" %)**0x0A**
942
943 Format: Command Code (0x0A) followed by 4 bytes.
944
945 The first and second bytes following the function code are the minimum and maximum value of **SHTEMP**, and the third and fourth bytes are the minimum and maximum value of **SHHUM**.
946
947 * **Example 1**: Downlink Payload:** 0A 14 1E 32 50**  ~/~/ AT+ SHTEMP=20,30 & AT+ SHHUM=50,80
948 * **Example 2**: Downlink Payload:** 0A 00 00 00 00      ** ~/~/ disable temperature and humidity alarm.
949
950 For **negative payload temperature**, calculate it as follows: **65536+ temperature = FFaa**, the value is **aa**.
951
952 * **Example**:  -40℃: 65536+(-40)=65496(D)=FFD8(H), Therefore, select a numerical representation of D8 as -40 ℃ for the downlink payload.
953
954 (% style="color:red" %)**Notice:**
955
956 * To disable Alarm, user can set min and max to same value , such as (% style="color:#037691" %)**AT+SHTEMP=0,0 and AT+SHHUM=50,50**
957 * If user only want to send only min or max, user can set the alarm to a value that device won't reach. For example: (% style="color:#037691" %)**AT+SHTEMP=-40,0**(%%)(Alarm above 0 degrees Celsius).
958
959 == 3.17 Set the IPv4 or IPv6 ==
960
961
962 This command is used to set IP version.
963
964 (% style="color:blue" %)**AT command:**
965
966 * (% style="color:#037691; font-weight:bold" %)**AT+IPTYPE**(% style="color:#037691" %)**=1**(%%)**      **~/~/ IPv4
967 * (% style="color:#037691; font-weight:bold" %)**AT+IPTYPE**(% style="color:#037691" %)**=2**(%%)**      **~/~/ IPv6
968
969 == 3.18 Configure Network Category to be Searched for under LTE RAT. ==
970
971
972 (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+IOTMOD=xx(%%)**
973
974 (% style="color:#037691" %)**xx:**(%%)  **0:** eMTC
975
976 **1:** NB-IoT
977
978 **2:** eMTC and NB-IoT
979
980
981 == 3.19 Factory data reset ==
982
983
984 Two different restore factory Settings configurations.
985
986 (% style="color:blue" %)**AT command:**
987
988 * (% style="color:#037691; font-weight:bold" %)**AT+FDR**(%%)**       **~/~/ Reset Parameters to Factory Default.
989 * (% style="color:#037691; font-weight:bold" %)**AT+FDR1**(%%)**     **~/~/ Reset parameters to factory default values **except for passwords**.
990
991 == 3.20 Set CoAP option ==
992
993
994 Feature: Set CoAP option, follow this link to set up the CoaP protocol.
995
996 (% style="color:blue" %)**AT command: **(% style="color:#037691; font-weight:bold" %)**AT+URI1~~AT+URI8**
997
998 (% style="color:#037691; font-weight:bold" %)**AT+URI1=11,"i"         **(%%)~/~/ "i/" indicates that the endpoint supports observation mode. In -CB products, fixed  setting AT+URI1=11,"i"
999
1000 (% style="color:#037691; font-weight:bold" %)**AT+URI2=11,"CoAP endpoint URl"   **(%%)~/~/ 11 is a fixed parameter.
1001
1002 **Example: ** i/13a35fbe-9515-6e55-36e8-081fb6aacf86
1003
1004 AT+URI1=11,"i"
1005
1006 AT+URI2=11,"13a35fbe-9515-6e55-36e8-081fb6aacf86"
1007
1008 ~-~-> If multiple groups of CoAP endpoint urls:
1009
1010 AT+URI3=11,"i"
1011
1012 AT+URI4=11,"CoAP endpoint URl"
1013
1014
1015 == 3.21 Power on / power off BG95 module ==
1016
1017
1018 This command is used to power on and power off BG95 module.
1019
1020 * (% style="color:blue" %)**AT command: **(% style="color:#037691" %)**AT+QSW**
1021
1022 The module is powered on after the command is sent for the first time, and powered off after the command is sent again.
1023
1024 [[image:image-20240619155719-1.png||height="644" width="811"]]
1025
1026
1027 == 3.22 Example Query saved historical records ==
1028
1029
1030 * (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+CDP(%%)**
1031
1032 This command can be used to search the saved history, recording up to 32 groups of data, each group of historical data contains a maximum of 100 bytes.
1033
1034 (% class="wikigeneratedid" %)
1035 [[image:image-20240619163800-2.png||height="642" width="826"]]
1036
1037
1038 == 3.23 Uplink log query ==
1039
1040
1041 * (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+GETLOG(%%)**
1042
1043 This command can be used to query upstream logs of data packets.
1044
1045 [[image:image-20240619163835-3.png||height="637" width="827"]]
1046
1047
1048 == 3.24 Print last few data entries ==
1049
1050
1051 Feature: Print the last few data entries
1052
1053 (% style="color:blue" %)**AT command: **(% style="color:#037691" %)**AT+PLDTA**
1054
1055 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
1056 |=(% style="width: 168px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 342px; background-color: rgb(79, 129, 189); color: white;" %)**4 bytes**
1057 |(% style="width:148px" %)AT+PLDTA=5
1058 Print last 5 entries|(% style="width:169px" %)(((
1059 Stop Tx events when read sensor data
1060
1061 1 24/9/20 23:31:37 temp=29.4 hum=70.4
1062
1063 2 24/9/20 23:46:33 temp=29.4 hum=71.2
1064
1065 3 24/9/21 00:01:33 temp=29.4 hum=71.0
1066
1067 4 24/9/21 00:16:47 temp=29.5 hum=71.3
1068
1069 5 24/9/21 00:31:33 temp=27.5 hum=68.0
1070
1071 Start Tx events
1072
1073
1074 OK
1075 )))
1076
1077 (% style="color:blue" %)**Downlink Command: **
1078
1079 No downlink commands for feature
1080
1081
1082 == 3.25 Print data entries base on page ==
1083
1084
1085 Feature: Print the sector data from start page to stop page.
1086
1087 (% style="color:blue" %)**AT command: **(% style="color:#037691" %)**AT+PDTA**
1088
1089 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
1090 |=(% style="width: 168px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 342px; background-color: rgb(79, 129, 189); color: white;" %)**4 bytes**
1091 |(% style="width:148px" %)AT+PDTA=1,1
1092 Print page 1 to 1|(% style="width:169px" %)(((
1093 Stop Tx events when read sensor data
1094
1095 8028B00 24/9/20 10:31:33 temp=25.3 hum=60.0
1096
1097 8028B08 24/9/20 10:46:33 temp=25.3 hum=59.0
1098
1099 8028B10 24/9/20 11:01:33 temp=25.1 hum=59.3
1100
1101 8028B18 24/9/20 11:16:33 temp=25.0 hum=60.7
1102
1103 8028B20 24/9/20 11:31:33 temp=24.9 hum=61.4
1104
1105 8028B28 24/9/20 11:46:33 temp=24.7 hum=60.6
1106
1107 8028B30 24/9/20 12:01:33 temp=24.8 hum=60.8
1108
1109 8028B38 24/9/20 12:16:33 temp=24.6 hum=61.0
1110
1111 8028B40 24/9/20 12:31:33 temp=24.5 hum=60.8
1112
1113 8028B48 24/9/20 12:46:33 temp=24.6 hum=60.5
1114
1115 8028B50 24/9/20 13:01:33 temp=25.1 hum=60.5
1116
1117 8028B58 24/9/20 13:16:33 temp=26.4 hum=61.3
1118
1119 8028B60 24/9/20 13:31:33 temp=27.0 hum=61.9
1120
1121 8028B68 24/9/20 13:46:33 temp=27.4 hum=62.3
1122
1123 8028B70 24/9/20 14:01:33 temp=27.6 hum=62.6
1124
1125 8028B78 24/9/20 14:16:33 temp=27.8 hum=63.4
1126
1127 Start Tx events
1128
1129 OK
1130 )))
1131
1132 (% style="color:blue" %)**Downlink Command: **
1133
1134 No downlink commands for feature
1135
1136
1137 == 3.26 Clear Flash Record ==
1138
1139
1140 Feature: Clear flash storage for data log feature.
1141
1142 (% style="color:blue" %)**AT command: **(% style="color:#037691" %)**AT+CLRTDA**
1143
1144 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
1145 |=(% style="width: 160px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 130px; background-color: rgb(79, 129, 189); color: white;" %)**Function**|=(% style="width: 220px; background-color: rgb(79, 129, 189); color: white;" %)**Response**
1146 |(% style="width:160px" %)AT+CLRDTA |(% style="width:130px" %)(((
1147 Clear date record
1148 )))|(% style="width:213px" %)(((
1149 Stop Tx events,Please wait for the erase to complete
1150
1151 Clear all stored sensor data...
1152
1153 Start Tx events
1154
1155 OK
1156 )))
1157
1158 (% style="color:blue" %)**Downlink Command:  **(% style="color:#037691" %)**0x32**
1159
1160 * Example: 0x32 00   ~/~/  Same as AT+CLRDTA
1161
1162 == 3.27 Working mode selection(Since firmware V1.0.4) ==
1163
1164
1165 Feature: Set interrupt mode or count mode (PB15 pin).
1166
1167 (% style="color:blue" %)**AT command: **(% style="color:#037691" %)**AT+CFGMOD**
1168
1169 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:470px" %)
1170 |=(% style="width: 191px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 279px; background-color: rgb(79, 129, 189); color: white;" %)**Function**
1171 |(% style="width:191px" %)AT+CFGMOD=1|(% style="width:277px" %)(((
1172 Interrupt mode (default mode)
1173 )))
1174 |(% style="width:191px" %)AT+CFGMOD=2|(% style="width:277px" %)count mode
1175
1176 (% style="color:blue" %)**Downlink Command:  **(% style="color:#037691" %)**0x02**
1177
1178 * Downlink command: 02 01  ~/~/ Equal to AT+CFGMOD=1
1179 * Downlink command: 02 02  ~/~/ Equal to AT+CFGMOD=2
1180
1181 == 3.28 Set Count value(Since firmware V1.0.4) ==
1182
1183
1184 Feature: Set the count value of PB15.
1185
1186 (% style="color:blue" %)**AT command: **(% style="color:#037691" %)**AT+EXT**
1187
1188 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:470px" %)
1189 |=(% style="width: 157px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 211px; background-color: rgb(79, 129, 189); color: white;" %)**Function**|=(% style="width: 102px; background-color: rgb(79, 129, 189); color: white;" %)**Response**
1190 |(% style="width:157px" %)AT+EXT=?|(% style="width:211px" %)Show current count value.|(% style="width:110px" %)(((
1191 0  (default)
1192
1193 OK
1194 )))
1195 |(% style="width:157px" %)AT+EXT=100|(% style="width:211px" %)Set the count value to 100.|(% style="width:110px" %)OK
1196
1197 (% style="color:blue" %)**Downlink Command:  **(% style="color:#037691" %)**0x0B**
1198
1199 Format: Command Code (0x0B) followed by 4 bytes.
1200
1201 * Downlink command: 0B 00 00 00 00  ~/~/ Set the count value to 0
1202 * Downlink command: 0B 00 00 00 64  ~/~/ Set the count value to 100
1203
1204 == 3.29 Set the downlink debugging mode(Since firmware v1.1.0) ==
1205
1206
1207 Feature: Set the conversion between the standard version and 1T version downlinks.
1208
1209 (% style="color:blue" %)**AT command: AT+DOWNTE**
1210
1211 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
1212 |=(% 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**
1213 |(% style="width:134px" %)AT+DOWNTE=?|(% style="width:143px" %)Get current Settings|(% style="width:229px" %)(((
1214 0,0  (default)
1215
1216 OK
1217 )))
1218 |(% colspan="1" rowspan="2" style="width:134px" %)(((
1219
1220
1221
1222
1223 AT+DOWNTE=a,b
1224 )))|(% style="width:143px" %)**a**: Set the conversion between the downlink of the standard version and 1T version|(% style="width:229px" %)(((
1225 **0**: Set the downlink of the standard version.
1226 **1**: Set the downlink of the 1T version(ThingsEye platform)
1227 )))
1228 |(% style="width:143px" %)**b**: Enable/Disable downlink debugging|(% style="width:229px" %)(((
1229 **0**: Disable downlink debugging mode.
1230 **1**: Enable downlink debugging mode, users can see the original downlink reception.
1231 )))
1232
1233 **Example:**
1234
1235 * AT+DOWNTE=0,1  ~/~/ Set to standard version downlink, and enable downlink debugging.
1236 * AT+DOWNTE=1,1  ~/~/ Set to 1T version downlink, and enable downlink debugging.
1237
1238 (% style="color:blue" %)**Downlink Command:  **
1239
1240 No downlink commands for feature
1241
1242
1243 == 3.30 Domain name resolution settings(Since firmware v1.1.1) ==
1244
1245
1246 Feature: Set static DNS resolution IP address.
1247
1248 (% style="color:blue" %)**AT command: AT+BKDNS**
1249
1250 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
1251 |=(% style="width: 138px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 143px; background-color: rgb(79, 129, 189); color: white;" %)**Function/Parameters**|=(% style="width: 229px; background-color: rgb(79, 129, 189); color: white;" %)**Response/Explanation**
1252 |(% style="width:134px" %)(((
1253 AT+BKDNS=?
1254 )))|(% style="width:143px" %)Get current Settings|(% style="width:606px" %)(((
1255 1,0,NULL  (default)
1256 OK
1257 )))
1258 |(% colspan="1" rowspan="3" style="width:134px" %)(((
1259
1260
1261
1262
1263
1264
1265 AT+BKDNS=a,b,c
1266 )))|(% style="width:143px" %)(((
1267 **a**: Enable/Disable static DNS resolution.
1268 )))|(% style="width:606px" %)(((
1269 **0:** Disable static DNS resolution
1270
1271 **1**: Enable static DNS resolution. The ip address will be saved after the domain name is resolved, if the next domain name resolution fails, the last saved ip address will be used.
1272 )))
1273 |(% style="width:143px" %)**b**: Meaningless.|(% style="width:606px" %)(((
1274 Set to **0**.
1275 )))
1276 |(% style="width:143px" %)(((
1277 **c**: Set the IP address manually.
1278 )))|(% style="width:606px" %)(((
1279 The format is the same as AT+SERVADDR.
1280 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.
1281 )))
1282
1283 **Example:**
1284
1285 * AT+BKDNS=0,0,NULL  ~/~/Disable static DNS resolution.
1286 * AT+BKDNS=1,0,NULL  ~/~/ Enable static DNS resolution.
1287 * AT+BKDNS=1,0,3.69.98.183,1883  ~/~/Enable static DNS resolution, if domain name resolution succeeds, the node uses the ip address successfully resolved and saves it to parameter c. If the domain name resolution fails, use the manually set ip address: 3.69.98.183 for communication.
1288
1289 (% style="color:blue" %)**Downlink Command:  **
1290
1291 No downlink commands for feature.
1292
1293
1294 = 4. Battery & Power Consumption =
1295
1296
1297 S31x-CB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
1298
1299 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
1300
1301
1302 Please refer to the following instructions to ask the AI to let the AI intelligence help the user to calculate the battery life.
1303
1304 Ex1:
1305
1306 The S31x-CB using ER26500 + SPC1520 8500mAh battery packs.
1307
1308 ~1. CB version of AI questioning techniques:
1309
1310 Battery capacity is 8500mAh, self-discharge <2%/year
1311 Sleep current:  19.618uA
1312 Sampling current&Duration:  20mA. 10 seconds
1313 UDP Transmit/Receive Current & Duration:  58mA, 36 sec.
1314 MQTT protocol transmit current & duration:  63mA, 41 seconds
1315 TCP protocol transmit current & duration:  62mA, 41 seconds
1316 GSP positioning current & duration:  87.0756mA, 44.162 seconds
1317 Timed Acquisition Current & Duration:  8.78151mA, 0.125338s
1318 Acquisition every 120 minutes, launching once, GPS positioning once a day ,15 minutes timed acquisition once
1319 How many years can the battery be used in different transmission modes?
1320
1321
1322 Here are the currents and durations for different transmission protocols for CB devices:[[image:image-20250313105906-6.png]]
1323
1324
1325 Example:
1326 Every 120 minutes to collect once, transmit once, GPS positioning once a day , 15 minutes timed collection once
1327 How many years can the battery be used in different transmission modes?
1328
1329 AI will automatically help the user to calculate the average power consumption and battery life of the device for each packet sent, as shown below:
1330
1331 [[image:image-20250314084804-1.png||height="1828" width="557"]]
1332
1333
1334 The S31x-CS uses a 3000mAh Li-Ion battery, please refer to the following instructions to ask the AI to let the AI intelligence help users calculate the battery life.
1335
1336 2.CS version of AI questioning techniques:
1337
1338 Battery capacity is 8500mAh, self-discharge <2%/year
1339 Sleep current: 50.409uA
1340 Sampling current&Duration:  20mA. 10 seconds
1341 UDP Transmit/Receive Current & Duration:  58mA, 36 seconds.
1342 MQTT protocol transmit current & duration:  63mA, 41 seconds
1343 TCP protocol transmit current & duration:  62mA, 41 seconds
1344 GSP positioning current & duration:  87.0756mA, 44.162 seconds
1345 Timed Acquisition Current & Duration:  8.78151mA, 0.125338 seconds
1346 Acquisition every 120 minutes, launching once, GPS positioning once a day ,15 minutes timed acquisition once
1347 How many years can the battery be used in different transmission modes?
1348
1349
1350 Here are the currents and durations for different transmission protocols for CS devices:
1351
1352 [[image:image-20250313105516-3.png]]
1353
1354
1355 Example:
1356 Every 120 minutes to collect once, transmit once, GPS positioning once a day , 15 minutes timed collection once
1357 How many years can the battery be used in different transmission modes?
1358
1359 AI will automatically help the user to calculate the average power consumption and battery life of the device for each packet sent, as shown below:
1360
1361 [[image:image-20250314093630-2.png||height="1621" width="523"]]
1362
1363 = 5. Firmware update =
1364
1365
1366 User can change device firmware to::
1367
1368 * Update with new features.
1369
1370 * Fix bugs.
1371
1372 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/scl/fo/1mzflb9p9kx15btnc11gr/AEfB-kKqgjZnzN6CA56bO3U/S31x-CB?dl=0&rlkey=ku98jt8u30coqy66saebai2co&subfolder_nav_tracking=1]]**
1373
1374 Methods to Update Firmware:
1375
1376 * (Recommended way) OTA firmware update via BLE: [[**Instruction**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE_Firmware_Update_NB_Sensors_BC660K-GL/]].
1377
1378 * Update through UART TTL interface : **[[Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/UART_Access_for_NB_ST_BC660K-GL/#H4.2UpdateFirmware28Assumethedevicealreadyhaveabootloader29]]**.
1379
1380 = 6. FAQ =
1381
1382 == 6.1 How can I access the BG95-NGFF AT Commands? ==
1383
1384
1385
1386 User can access to BG95-NGFF directly and send AT Commands.
1387
1388 [[See BG95-NGFF AT Command set>>https://www.dropbox.com/scl/fo/1mzflb9p9kx15btnc11gr/ALDWTvDjuVoXvDJuYWCRh5U/Vendor%20Datasheet/BG95?dl=0&rlkey=ku98jt8u30coqy66saebai2co&subfolder_nav_tracking=1]]
1389
1390
1391 == 6.2 General Manual for -CB , -CS models ==
1392
1393
1394 Users can follow the instructions in this [[link>>http://wiki.dragino.com/xwiki/bin/view/Main/General%20Manual%20for%20-CB%20%2C%20-CS%20models/]] to see how to configure to connect to different servers.
1395
1396
1397 = 7. Order Info =
1398
1399
1400 Part Number: (% style="color:blue" %)**S31-CB-XX  / S31B-CB-XX**
1401
1402 (% style="color:red" %)**XX:**(%%)
1403
1404 * (% style="color:#037691" %)**GE**(%%): General version ( Exclude SIM card)
1405
1406 * (% style="color:#037691" %)**1T**(%%): with 1NCE* 10 years 500MB SIM card and Pre-configure to ThingsEye server
1407
1408 (% style="color:#037691" %)**1NCE SIM Card **(% style="color:red" %)**NB-IoT**(% style="color:#037691" %)** network coverage**(%%): Austria, Belgium, Bulgaria, Croatia, Czech Republic, Denmark, Finland, Germany, Great Britain, Greece, Hungary, Ireland, Italy, Latvia, Malta, Netherlands, Norway, Puerto Rico, Russia, Slovak , Republic, Slovenia, Spain, Sweden, Switzerland, Taiwan, USA, US Virgin Islands.
1409
1410 (% style="color:#037691" %)**1NCE SIM Card **(% style="color:red" %)**LTE-M **(% style="color:#037691" %)**network coverage**(%%): Argentina, Austria, Australia, Belgium, Canada, Denmark, Estonia, Finland, France, Germany, Great Britain, Hungary, Ireland, Japan, Jersey, Korea, Repiblic of, Latvia, Luxembourg, Mexico, Netherlands, New Zealand, Norway, Poland, Puerto Rico, Romania, Spain, Sweden, Switzerland, Taiwan, USA, US Virgin Islands.
1411
1412
1413 = 8. ​Packing Info =
1414
1415
1416 (% style="color:#037691" %)**Package Includes**:
1417
1418 * S31-CB or S31-CB Temperature & Humidity Sensor x 1
1419
1420 * External antenna x 1
1421
1422 (% style="color:#037691" %)**Dimension and weight**:
1423
1424 * Device Size: 13.0 x 5 x 4.5 cm
1425
1426 * Device Weight: 150g
1427
1428 * Package Size / pcs : 14.0 x 8x 5 cm
1429
1430 * Weight / pcs : 180g
1431
1432 = 9. Support =
1433
1434
1435 * 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.
1436
1437 * 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]].
1438
1439 (% style="display:none" %) (%%)