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