Last modified by kai on 2025/07/29 13:42

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 S31x-NB NB-IoT Temperature & Humidity Sensor ==
22
23
24 The Dragino S31-NB and S31B-NB are (% style="color:blue" %)**NB-IoT 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 network*.
25
26 The temperature & humidity sensor used in S31-NB 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 S31-NB supports different uplink methods include (% style="color:blue" %)**TCP, MQTT, UDP, MQTTs or CoAP**(%%) for different application requirement. and Support Uplinks to various IoT Servers.
29
30 S31-NB 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 coverage locally.
33
34
35 == 1.2 ​Features ==
36
37
38 * NB-IoT Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85 @H-FDD
39 * Ultra-low power consumption
40 * External 3 meters SHT31 probe (For S31-NB)
41 * Measure range -40°C ~~ 80°C
42 * Temperature & Humidity alarm
43 * Multiply Sampling and one uplink
44 * Support Bluetooth v5.1 remote configure and update firmware
45 * Uplink on periodically
46 * Downlink to change configure
47 * 8500mAh Battery for long term use
48 * Nano SIM card slot for NB-IoT SIM
49
50 == 1.3 Specification ==
51
52
53 (% style="color:blue" %)**Common DC Characteristics:**
54
55 * Supply Voltage: 2.1v ~~ 3.6v
56 * Operating Temperature: -40 ~~ 85°C
57
58 (% style="color:blue" %)**Temperature Sensor:**
59
60 * Range: -40 to + 80°C
61 * Accuracy: ±0.2 @ 0-90 °C
62 * Resolution: 0.1°C
63 * Long Term Shift: <0.03 °C/yr
64
65 (% style="color:blue" %)**Humidity Sensor: **
66
67 * Range: 0 ~~ 99.9% RH
68 * Accuracy: ± 2%RH ( 0 ~~ 100%RH)
69 * Resolution: 0.01% RH
70 * Long Term Shift: <0.25 %RH/yr
71
72 (% style="color:blue" %)**NB-IoT Spec:**
73
74 (% style="color:#037691" %)**NB-IoT Module: BC660K-GL**
75
76 (% style="color:#037691" %)**Support Bands:**
77
78 * B1 @H-FDD: 2100MHz
79 * B2 @H-FDD: 1900MHz
80 * B3 @H-FDD: 1800MHz
81 * B4 @H-FDD: 2100MHz
82 * B5 @H-FDD: 860MHz
83 * B8 @H-FDD: 900MHz
84 * B12 @H-FDD: 720MHz
85 * B13 @H-FDD: 740MHz
86 * B17 @H-FDD: 730MHz
87 * B18 @H-FDD: 870MHz
88 * B19 @H-FDD: 870MHz
89 * B20 @H-FDD: 790MHz
90 * B25 @H-FDD: 1900MHz
91 * B28 @H-FDD: 750MHz
92 * B66 @H-FDD: 2000MHz
93 * B70 @H-FDD: 2000MHz
94 * B85 @H-FDD: 700MHz
95
96 (% style="color:blue" %)**Battery:**
97
98 * Li/SOCI2 un-chargeable battery
99 * Capacity: 8500mAh
100 * Self Discharge: <1% / Year @ 25°C
101 * Max continuously current: 130mA
102 * Max boost current: 2A, 1 second
103
104 (% style="color:blue" %)**Power Consumption**
105
106 * STOP Mode: 10uA @ 3.3v
107 * Max transmit power: 350mA@3.3v
108
109 == 1.4 Applications ==
110
111
112 * Smart Buildings & Home Automation
113 * Logistics and Supply Chain Management
114 * Smart Metering
115 * Smart Agriculture
116 * Smart Cities
117 * Smart Factory
118
119 == 1.5 Sleep mode and working mode ==
120
121
122 (% style="color:blue" %)**Deep Sleep Mode: **(%%)Sensor doesn't have any NB-IoT activate. This mode is used for storage and shipping to save battery life.
123
124 (% 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.
125
126
127 == 1.6 Button & LEDs ==
128
129
130 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675071855856-879.png]]
131
132 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
133 |=(% style="width: 167px;background-color:#4F81BD;color:white" %)**Behavior on ACT**|=(% style="width: 117px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width:226px;background-color:#4F81BD;color:white" %)**Action**
134 |[[image:1749523496860-387.png]] 1~~3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
135 If sensor has already attached to NB-IoT network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
136 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
137 )))
138 |[[image:1749523498895-955.png]] >3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
139 (% style="color:green" %)**Green led**(%%) will fast blink 5 times, device will enter (% style="color:#037691" %)**OTA mode**(%%) for 3 seconds. And then start to attach NB-IoT network.
140 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
141 Once sensor is active, BLE module will be active and user can connect via BLE to configure device, no matter if device attach NB-IoT network or not.
142 )))
143 |[[image:1749523517826-904.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.
144
145 (% 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.**
146
147
148 == 1.7 BLE connection ==
149
150
151 S31x-NB support BLE remote configure and firmware update.
152
153 BLE can be used to configure the parameter of sensor or see the console output from sensor. BLE will be only activate on below case:
154
155 * Press button to send an uplink
156 * Press button to active device.
157 * Device Power on or reset.
158
159 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
160
161
162 == 1.8 Pin Definitions , Switch & SIM Direction ==
163
164
165 S31x-NB use the mother board from S31-NB which as below.
166
167 [[image:image-20230819104805-5.png]]
168
169
170 === 1.8.1 Jumper JP2 ===
171
172
173 Power on Device when put this jumper.
174
175 Power off device when take out this jumper
176
177
178 === 1.8.2 BOOT MODE / SW1 ===
179
180
181 **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.
182
183 **2)** (% style="color:blue" %)**Flash**(%%): work mode, device starts to work and send out console output for further debug
184
185
186 === 1.8.3 Reset Button ===
187
188
189 Press to reboot the device.
190
191
192 === 1.8.4 SIM Card Direction ===
193
194 See this link. [[How to insert SIM Card>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H2.AttachNetwork]].
195
196
197 == 1.9 Hardware Variant ==
198
199
200 (% border="1" cellspacing="3" style="width:410px" %)
201 |=(% 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
202 |(% style="width:102px" %)(((
203 S31-NB
204 )))|(% style="width:126px" %)(((
205 [[image:image-20230819110632-6.png||data-xwiki-image-style-alignment="center" height="130" width="104"]]
206 )))|(% style="width:179px" %)(((
207 1 x SHT31 Probe
208
209 Cable Length : 3 meters
210
211
212 )))
213 |(% style="width:102px" %)(((
214 S31B-NB
215 )))|(% style="width:126px" %)(((
216 [[image:image-20230819110702-7.png||data-xwiki-image-style-alignment="center" height="164" width="90"]]
217 )))|(% style="width:179px" %)(((
218 1 x SHT31 Probe
219
220 Installed in device.
221 )))
222
223 (% style="display:none" %)
224
225 == 1.10 Wiring of DS18B20 temperature sensor ==
226
227 The S31x-NB supports connection to the external temperature sensor DS18B20. The wiring method is as follows:
228
229 [[image:1749779850163-145.jpg||height="408" width="651"]]
230
231
232 = 2. Use S31x-NB to communicate with IoT Server =
233
234 == 2.1 Send data to IoT server via NB-IoT network ==
235
236
237 The S31x-NB is equipped with a NB-IoT module, the pre-loaded firmware in S31x-NB will get environment data from sensors and send the value to local NB-IoT network via the NB-IoT module.  The NB-IoT network will forward this value to IoT server via the protocol defined by S31x-NB.
238
239 Below shows the network structure:
240
241 [[image:image-20250416143553-1.png]]
242
243
244 There are two version: (% style="color:blue" %)**-GE**(%%) and (% style="color:blue" %)**-1T**(%%) version of S31x-NB.
245
246 (% 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-NB send data to IoT server.
247
248 * 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]].
249
250 * 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]]. 
251
252 Below shows result of different server as a glance.
253
254 (% border="1" cellspacing="3" style="width:515px" %)
255 |(% 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**
256 |(% 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" %)(((
257 [[image:image-20230819113244-8.png||data-xwiki-image-style-alignment="center" height="183" width="367"]]
258 )))|(% style="width:170px" %)
259 |(% 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" %)(((
260 [[image:image-20230819113244-9.png||data-xwiki-image-style-alignment="center" height="119" width="367"]]
261 )))|(% style="width:170px" %)
262 |(% 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" %)[[image:image-20250113195609-1.png]]|(% style="width:170px" %)
263 |(% 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" %)
264 |(% 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" %)
265 |(% 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" %)(((
266 [[image:image-20230819113244-10.png||data-xwiki-image-style-alignment="center" height="104" width="367"]]
267 )))|(% style="width:170px" %)
268 |(% 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" %)(((
269 [[image:image-20230819113244-11.png||data-xwiki-image-style-alignment="center" height="141" width="367"]]
270 )))|(% style="width:170px" %)
271
272 (% 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-NB and user will be able to see data in ThingsEye. See here for [[ThingsEye Config Instruction>>url:https://wiki.thingseye.io/xwiki/bin/view/Main/]].
273
274
275 == 2.2 ​Payload Types ==
276
277
278 To meet different server requirement, S31x-NB supports different payload type.
279
280 **Includes:**
281
282 * [[General JSON format payload>>||anchor="H2.2.1GeneralJsonFormat28Type3D529"]]. (Type=5)
283
284 * [[HEX format Payload>>||anchor="H2.2.2HEXformatPayload28Type3D029"]]. (Type=0)
285
286 * [[ThingSpeak Format>>||anchor="H2.2.4ThingSpeakPayload28Type3D129"]]. (Type=1)
287
288 * [[ThingsBoard Format>>||anchor="H2.2.3ThingsBoardPayload28Type3D329"]]. (Type=3)
289
290 User can specify the payload type when choose the connection protocol. Example:
291
292
293 (% style="color:#037691" %)**AT+PRO=1,0**  (%%) ~/~/ Use COAP Connection & hex Payload
294
295 (% style="color:#037691" %)**AT+PRO=1,5**   (%%) ~/~/ Use COAP Connection & Json Payload
296
297 (% style="color:#037691" %)**AT+PRO=2,0**  (%%) ~/~/ Use UDP Connection & hex Payload
298
299 (% style="color:#037691" %)**AT+PRO=2,5**   (%%) ~/~/ Use UDP Connection & Json Payload
300
301 (% style="color:#037691" %)**AT+PRO=3,0**  (%%) ~/~/ Use MQTT Connection & hex Payload
302
303 (% style="color:#037691" %)**AT+PRO=3,5 ** (%%) ~/~/ Use MQTT Connection & Json Payload
304
305 (% style="color:#037691" %)**AT+PRO=4,0**  (%%) ~/~/ Use TCP Connection & hex Payload
306
307 (% style="color:#037691" %)**AT+PRO=4,5 ** (%%) ~/~/ Use TCP Connection & Json Payload
308
309 **Since firmware V1.3.0**, (% style="color:#4472c4" %)**IMSI**(%%) has been added to payload.
310
311 **Since firmware V1.3.1**, [[count mode>>path:#H3.18Workingmodeselection28SincefirmwareV1.0.429]] has been added to the S31x-NB payload in (% style="color:#4472c4" %)**JSON**(%%) format.
312
313
314 === 2.2.1 General Json Format(Type~=5) ===
315
316
317 This is the General Json Format. As below:
318
319 (% style="color:#4472c4" %)**{"IMEI":"863663062765285","IMSI":"460086859301435","Model":"S31x-NB","temperature":21.4,"humidity":34.6,"interrupt":0,"interrupt_level":0,"count":20,"battery":3.23,"signal":23,"time":"2024/12/17 02:22:08","1":[301.4,298.4,"2024/12/16 09:53:14"],"2":[301.4,298.3,"2024/12/16 09:38:14"],"3":[301.4,298.3,"2024/12/16 09:23:23"],"4":[502.1,497.0,"2024/12/16 09:08:34"],"5":[0.0,0.0,"2024/12/16 08:34:20"],"6":[0.0,0.0,"2024/12/16 08:19:20"],"7":[0.0,0.0,"2024/12/16 08:05:32"],"8":[0.0,0.0,"2024/12/16 07:49:20"]}**
320
321 Example:
322
323 [[image:image-20241217102539-1.png||height="673" width="834"]]
324
325 (% style="color:blue" %)**Count:**
326
327 When using count mode, PB15 will accumulate counts each time it is triggered.
328
329 **Example: **0x00000064(H)= 100(D), So the count value is 100.
330
331 Use the **[[AT+CFGMOD>>path:#H3.18Workingmodeselection28SincefirmwareV1.0.429]]** command to set the working mode to count mode.
332
333 Use **[[AT+EXT>>path:#H3.19SetCountvalue28SincefirmwareV1.0.429]]** to set the count value.
334
335 (% style="color:red" %)**Notice, from above payload:**
336
337 * Temperature, Humidity, Interrupt, Interrupt_level, (% class="mark" %)count(%%), Battery, Signal  & time are the value at uplink time.
338
339 * 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.
340
341 === 2.2.2 HEX format Payload(Type~=0) ===
342
343
344 This is the HEX Format. As below:
345
346 (% style="color:#4472c4" %)**f863663062798914f46008351350731400820cae1101Ffff000000000000f70274673d463500f90260673d435800f802c86735ca3500f802c86735c9f900f802c56735c9bd00f802d26735c98100f702cf6735c94500f802c46735c90900f902bf6735c8cd**
347
348 [[image:image-20241204093743-1.png||height="198" width="1346"]]
349
350 [[image:image-20241120101725-2.png||height="622" width="730"]]
351
352 (% style="color:blue" %)**Version:**
353
354 These bytes include the hardware and software version.
355
356 (% style="color:#037691" %)**Higher byte:**(%%) Specify Sensor Model: 0x00 for S31B-NB & S31-NB
357
358 (% style="color:#037691" %)**Lower byte:**(%%) Specify the software version: 0x82=130, means firmware version 1.3.0
359
360
361 (% style="color:blue" %)**BAT (Battery Info):**
362
363 Ex1: 0x0CBA = 3258mV
364
365
366 (% style="color:blue" %)**Signal Strength:**
367
368 NB-IoT Network signal Strength.
369
370 **Ex1: 0x16 = 22**
371
372 **0**  -113dBm or less
373
374 **1**  -111dBm
375
376 **2...30** -109dBm... -53dBm
377
378 **31**   -51dBm or greater
379
380 **99**    Not known or not detectable
381
382
383 (% style="color:blue" %)**DS18B20_Temperature:**
384
385 **Example:** 0x00de(H)= 222(D) =22.2℃
386
387 (% style="color:red" %)**Note:**(%%) If the DS18B20 sensor is not connected, the hex payload is **0xFFFF** and Serial port print: **-409.5 ° C.**
388
389
390 (% style="color:blue" %)**PA4_level:**
391
392 Level of PA4 pin. (0: Low level  1: High level)
393
394
395 (% style="color:blue" %)**Interrupt:**
396
397 This data field shows if this packet is generated by interrupt or not.
398
399 **Example:**
400
401 If byte[0]&0x01=0x00 : Normal uplink packet.
402
403 If byte[0]&0x01=0x01 : Interrupt Uplink Packet.
404
405
406 (% style="color:blue" %)**Interrupt_level:**
407
408 This byte shows whether the interrupt is triggered by a high or low level.
409
410 **Ex1:** 0x00  Interrupt triggered by falling edge (low level)
411
412 **Ex2: **0x01  Interrupt triggered by rising edge (high level)
413
414
415 (% style="color:blue" %)**Temperature: **
416
417 If payload is: 0105H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree
418
419 If payload is: FF3FH :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
420
421 (FF3F & 8000: Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
422
423
424 (% style="color:blue" %)**Humidity:   **
425
426 Read:0295(H)=661(D)    Value:  661 / 10=66.1, So 66.1%
427
428
429 (% style="color:blue" %)**TimeStamp:   **
430
431 Unit TimeStamp Example: 64d49439(H) = 1691653177(D)
432
433 Put the decimal value into this link(https:~/~/www.epochconverter.com/) to get the time.
434
435
436 === 2.2.3 ThingsBoard Payload(Type~=3) ===
437
438
439 Type3 payload special design for ThingsBoard, it will also configure other default server to ThingsBoard.
440
441 (% style="color:#4472c4" %)**{
442 "topic": "004-NB",
443 "payload": {
444 "IMEI": "863663062765285",
445 "IMSI": "460086859301439",
446 "Model": "S31x-NB",
447 "temperature": 26.7,
448 "humidity": 51.2,
449 "interrupt": 0,
450 "interrupt_level": 0,
451 "battery": 3.31,
452 "signal": 20,
453 "time": "2024/12/06 12:22:56",
454 "1": [7.8, 1141.6, "1970/03/01 07:07:05"],
455 "2": [0.0, 0.0, "1970/07/14 04:20:16"],
456 "3": [7.8, 1141.6, "1970/03/01 07:07:05"],
457 "4": [0.0, 0.0, "1970/07/14 04:20:16"],
458 "5": [7.8, 1141.6, "1970/03/01 07:07:05"],
459 "6": [0.0, 0.0, "1970/07/14 04:20:16"],
460 "7": [7.8, 1141.6, "1970/03/01 07:07:05"],
461 "8": [0.0, 0.0, "1970/07/14 04:20:16"]
462 }
463 }**
464
465 [[image:image-20241206202452-1.png||height="641" width="1351"]]
466
467
468 === 2.2.4 ThingSpeak Payload(Type~=1) ===
469
470
471 This payload meets ThingSpeak platform requirement. It includes only four fields. Form 1~~4 are:
472
473 Temperature, Humidity, Battery & Signal. This payload type only valid for ThingsSpeak Platform
474
475 As below:
476
477 (% style="color:#4472c4" %)**field1=Tem&field2=Hum&field3=BatV&field4=Singal**
478
479 [[image:image-20240531171506-5.png]]
480
481
482 == 2.3 Test Uplink and Change Update Interval ==
483
484
485 By default, Sensor will send uplinks (% style="color:blue" %)**every 2 hours**(%%)
486
487 User can use below commands to change the uplink interval.
488
489 (% style="color:blue" %)**AT Command: **(% style="color:#037691" %)**AT+TDC**
490
491 Example: AT+TDC=7200  ~/~/ Set Update Interval to 7200 seconds
492
493 (% style="color:blue" %)**Downlink Command**(%%)**: (% style="color:#037691" %)0x01(%%)**
494
495 Format: Command Code (0x01) followed by 3 bytes.
496
497 Example:  12 hours= 43200 seconds  43200(D)=0xA8C0(H)
498
499 Downlink Payload: **01 00 A8 C0**  ~/~/ AT+TDC=43200, Set Update Interval to 12 hours.
500
501 (% style="color:red" %)**Note: User can also push the button for more than 1 second to activate an uplink.**
502
503
504 == 2.4 Multi-Samplings and One uplink ==
505
506
507 (% style="color:red" %)**Notice: The AT+NOUD feature is upgraded to Clock Logging, please refer [[Clock Logging Feature>>||anchor="H2.7Clocklogging28Sincefirmwareversionv1.2.129"]]**
508
509 To save battery life, S31-NB will sample temperature & humidity data every 15 minutes and send one uplink every 2 hours. So each uplink it will include 8 stored data + 1 real-time data. They are defined by:
510
511 * (% style="color:#037691" %)**AT+TR=900**   (%%) ~/~/ The unit is seconds, and the default is to record data once every 900 seconds (15 minutes, the minimum can be set to 180 seconds)
512
513 * (% style="color:#037691" %)**AT+NOUD=8**     (%%)~/~/  The device uploads 8 sets of recorded data by default. Up to 32 sets of record data can be uploaded.
514
515 The diagram below explains the relationship between TR, NOUD, and TDC more clearly:
516
517 [[image:1692424376354-959.png]]
518
519
520 == 2.5 Humidity and Temperature alarm function ==
521
522
523 On each sampling define by AT+TR ( default 900s or 15 minutes), when the value exceed the range, it will trigger an Alarm and immediately sends a uplink.
524
525
526 (% style="color:blue" %)**AT Commands:**
527
528 (% style="color:#037691" %)**AT+ SHHUM=min,max**
529
530 Example: AT+ SHHUM=50,80  ~/~/ Alarm when humidity lower than 50 or higher than 80.
531
532
533 (% style="color:#037691" %)**AT+ SHTEMP=min,max**
534
535 Example: AT+ SHTEMP=20,30  ~/~/ Alarm when temperature lower than 20 or higher than 30
536
537
538 (% style="color:red" %)**Notice:**
539
540 * To disable Alarm, user can set min and max to same value , such as (% style="color:#037691" %)**AT+SHTEMP=0,0.**
541
542 * 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=-80,0.**
543
544 * (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x08(%%)**
545
546 Format: Command Code (0x08) followed by 5 bytes.
547
548 * **Example 1**: Downlink Payload:** 081E2A3250**  ~/~/ Set the temperature alarm to 30~~40℃ and the humidity alarm to 50%~~80%
549 * **Example 2**: Downlink Payload:** 08F6141E32**  ~/~/ Set the temperature alarm to -10℃~~20℃ and the humidity alarm to 20%~~50%
550
551 (% style="color:red" %)**Note: When entering the downlink payload, there must be no Spaces between bytes.**
552
553
554
555 == 2.6 Trggier an uplink by external interrupt ==
556
557
558 S31-NB has an external trigger interrupt function. Users can use the PB15 pin to trigger the upload of data packets.
559
560 (% style="color:blue" %)**AT command:**
561
562 * (% style="color:#037691" %)**AT+INTMOD **(%%) ~/~/ Set the trigger interrupt mode
563
564 * (% style="color:#037691" %)**AT+INTMOD=0 **(%%) ~/~/ Disable Interrupt
565
566 * (% style="color:#037691" %)**AT+INTMOD=1 **(%%) ~/~/ Trigger by rising and falling edge
567
568 * (% style="color:#037691" %)**AT+INTMOD=2 **(%%) ~/~/ Trigger by falling edge
569
570 * (% style="color:#037691" %)**AT+INTMOD=3  **(%%) ~/~/ Trigger by rising edge
571
572 == 2.7 Clock logging (Since firmware version v1.2.1) ==
573
574
575 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.
576
577 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.
578
579 * (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+CLOCKLOG=a,b,c,d(%%)**
580
581 (% style="color:#037691" %)**a: **(%%)**0:** Disable Clock logging.  ** 1: **Enable Clock Logging
582
583 (% 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.
584
585 (% style="color:#037691" %)**c: **(%%)Specify the sampling interval: range **(0 ~~ 255 minutes)**
586
587 (% style="color:#037691" %)**d:**(%%)** **How many entries should be uplink on every TDC **(max 32)**
588
589 (% style="color:red" %)**Note: To disable clock recording, set the following parameters: AT+CLOCKLOG=1,65535,0,0**
590
591 [[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"]]
592
593 **Example:**
594
595 **AT+CLOCKLOG=1,65535,1,5**
596
597 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).
598
599 (% class="wikigeneratedid" %)
600 [[image:image-20240316172630-1.png||height="452" width="1127"]]
601
602 (% class="wikigeneratedid" %)
603 (% 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.**
604
605
606 * (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x0A(%%)**
607
608 Format: Command Code (0x0A) followed by 5 bytes.
609
610 * **Example 1**: Downlink Payload:** 0A01FFFF0F08**  ~/~/ Set SHT record time: AT+CLOCKLOG=1,65535,15,8
611 * **Example 1**: Downlink Payload:** 0A0104B00F08**  ~/~/ Set SHT record time: AT+CLOCKLOG=1,1200,15,8
612
613 (% style="color:red" %)**Note: When entering the downlink payload, there must be no Spaces between bytes.**
614
615
616 === Unix TimeStamp ===
617
618 S31x-NB uses Unix TimeStamp format based on
619
620 [[image:image-20240909174932-5.png]]
621
622 User can get this time from link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] :
623
624 Below is the converter example
625
626 [[image:image-20240909180010-1.png||height="364" width="865"]]
627
628 So, 1725875962 means that the current time is Monday, September 9, 2024 at 9:59 AM.
629
630
631 === Poll sensor value ===
632
633
634 User can poll sensor value based on timestamps from the server. Below is the downlink command.
635
636 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:330px" %)
637 |=(% style="width: 63px; background-color: rgb(79, 129, 189); color: white;" %)**1 byte**|=(% style="width: 129px; background-color: rgb(79, 129, 189); color: white;" %)**4 bytes**|=(% style="width: 138px; background-color: rgb(79, 129, 189); color: white;" %)**4 bytes**
638 |(% style="width:63px" %)31|(% style="width:129px" %)Timestamp start|(% style="width:131px" %)Timestamp end
639
640 Timestamp start and Timestamp end use Unix TimeStamp format as mentioned above. Devices will reply with all data log during this time period.
641
642 For example, downlink command **31 66DE 6384 66DE 7194**
643
644 Is to check 2024/9/9 02:55:00 to 2024/9/9 03:55:00's data
645
646
647 === Datalog Uplink payload ===
648
649
650 The Datalog poll reply uplink will use below payload format.
651
652 **Retrieval data payload:**
653
654 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:460px" %)
655 |=(% style="width: 67px; background-color: rgb(79, 129, 189); color: white;" %)**Size(bytes)**|=(% style="width: 138px; background-color: rgb(79, 129, 189); color: white;" %)2|=(% style="width: 136px; background-color: rgb(79, 129, 189); color: white;" %)**2**|=(% style="width: 119px; background-color: rgb(79, 129, 189); color: white;" %)4
656 |(% style="width:63px" %)value|(% style="width:128px" %)Hum|(% style="width:126px" %)Temp|(% style="width:109px" %)Timestamp
657
658 (% style="color:blue" %)**Function Description: **(%%)This feature is only used when the clock logging feature is turned on. one uplink packet can send **64** groups of stored data totaling **512** bytes.
659
660 (% style="color:blue" %)**Example(For MQTT.fx):**
661
662 If user sends below downlink command:
663
664 Where : Start time: 60065F97 = time 24/9/9 02:55:00
665
666 Stop time: 66DE6A8C= time 24/9/9 03:25:00
667
668 **S31x-NB will uplink this payload.**
669
670 [[image:image-20240909163051-1.png||height="463" width="641"]]
671
672 0x0100024966de638b 0100024866de63c7 00ff024d66de6403 00ff024b66de643f 00ff024666de647b 0100024b66de64b7 00ff024f66de64f3 00ff024566de652f
673
674 [[image:image-20240909165436-4.png]]
675
676 Temp=0x0100/10=25.6℃
677
678 Hum=0x0249/10=58.5%rh
679
680 Unix time is 0x66de638b =1725850507s=24/9/9 02:55:00
681
682
683 == 2.8 Example Query saved historical records ==
684
685
686 * (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+CDP(%%)**
687
688 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.
689
690 (% class="wikigeneratedid" %)
691 [[image:image-20240316172700-2.png||height="610" width="791"]]
692
693
694 == 2.9 Uplink log query ==
695
696
697 * (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+GETLOG(%%)**
698
699 This command can be used to query upstream logs of data packets.
700
701 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/PS-NB-NA_NB-IoT_Analog_Sensor_User_Manual/WebHome/image-20240407191922-2.png?width=903&height=631&rev=1.1||alt="image-20240407191922-2.png" height="539" width="771"]]
702
703
704 == 2.10 Scheduled domain name resolution ==
705
706
707 This command is used to set up scheduled domain name resolution
708
709 (% style="color:blue" %)**AT command:**
710
711 * (% style="color:#037691" %)**AT+DNSTIMER=XX**(%%)**  **~/~/ Unit: hour
712
713 After setting this command, domain name resolution will be performed regularly.
714
715
716 == 2.11 Set the QoS level ==
717
718
719 This command is used to set the QoS level of **MQTT**.
720
721 (% style="color:blue" %)**AT command:**
722
723 * (% style="color:#037691" %)**AT+MQOS=xx**(%%)**   **~/~/ 0~~2
724
725 (% style="color:blue" %)**Downlink command:**(%%)** (% style="color:#037691" %)0x07(%%)**
726
727 Format: Command Code (0x07) followed by 1 byte.
728
729 **Ex1:** Downlink payload: **0x0700**  ~/~/ AT+MQOS=0
730
731 **Ex2:** Downlink payload: **0x0701**  ~/~/ AT+MQOS=1
732
733
734 == 2.12  Set CoAP option ==
735
736
737 This command sets the connection parameters of the COAP.
738
739 (% style="color:blue" %)**AT command:**
740
741 * AT+URI1       ~/~/ CoAP option name, CoAP option length, "CoAP option value"
742 * AT+URI2      ~/~/ CoAP option name, CoAP option length,  "CoAP option value"
743 * AT+URI3     ~/~/ CoAP option name, CoAP option length,  "CoAP option value"
744 * AT+URI4     ~/~/ CoAP option name, CoAP option length,  "CoAP option value"
745
746 **Example:**
747
748 * AT+URI1=11,38,"i/faaa241f-af4a-b780-4468-c671bb574858"
749
750 == 2.13 Print last few data entries ==
751
752
753 Feature: Print the last few data entries
754
755 (% style="color:blue" %)**AT command: AT+PLDTA**
756
757 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
758 |=(% style="width: 148px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 362px; background-color: rgb(79, 129, 189); color: white;" %)**4 bytes**
759 |(% style="width:148px" %)AT+PLDTA=5
760 Print last 5 entries|(% style="width:169px" %)(((
761 Stop Tx events when read sensor data
762
763 1 24/9/9 09:02:12 temp=25.4 hum=65.9
764
765 2 24/9/9 09:03:12 temp=25.4 hum=64.4
766
767 3 24/9/9 09:04:12 temp=25.3 hum=63.8
768
769 4 24/9/9 09:05:12 temp=25.4 hum=63.8
770
771 5 24/9/9 09:06:15 temp=25.4 hum=62.6
772
773 Start Tx events
774
775
776 OK
777 )))
778
779 (% style="color:blue" %)**Downlink Command: **
780
781 No downlink commands for feature
782
783
784 == 2.14 Print data entries base on page ==
785
786
787 Feature: Print the sector data from start page to stop page.
788
789 (% style="color:blue" %)**AT command: AT+PDTA**
790
791 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
792 |=(% style="width: 148px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 362px; background-color: rgb(79, 129, 189); color: white;" %)**4 bytes**
793 |(% style="width:148px" %)AT+PDTA=1,1
794 Print page 1 to 1|(% style="width:169px" %)(((
795 Stop Tx events when read sensor data
796
797 8028A00 24/9/9 02:55:07 temp=25.6 hum=58.5
798
799 8028A08 24/9/9 02:56:07 temp=25.6 hum=58.4
800
801 8028A10 24/9/9 02:57:07 temp=25.5 hum=58.9
802
803 8028A18 24/9/9 02:58:07 temp=25.5 hum=58.7
804
805 8028A20 24/9/9 02:59:07 temp=25.5 hum=58.2
806
807 8028A28 24/9/9 03:00:07 temp=25.6 hum=58.7
808
809 8028A30 24/9/9 03:01:07 temp=25.5 hum=59.1
810
811 8028A38 24/9/9 03:02:07 temp=25.5 hum=58.1
812
813 8028A40 24/9/9 03:03:07 temp=25.5 hum=57.7
814
815 8028A48 24/9/9 03:04:07 temp=25.5 hum=57.6
816
817 8028A50 24/9/9 03:05:07 temp=25.4 hum=59.3
818
819 8028A58 24/9/9 03:06:07 temp=25.4 hum=58.7
820
821 8028A60 24/9/9 03:07:07 temp=25.3 hum=58.3
822
823 8028A68 24/9/9 03:08:07 temp=25.3 hum=58.9
824
825 8028A70 24/9/9 03:09:07 temp=25.4 hum=59.1
826
827 8028A78 24/9/9 03:10:07 temp=25.4 hum=60.0
828
829 Start Tx events
830
831 OK
832 )))
833
834 (% style="color:blue" %)**Downlink Command: **
835
836 No downlink commands for feature
837
838
839 == 2.15 Clear Flash Record ==
840
841
842 Feature: Clear flash storage for data log feature.
843
844 (% style="color:blue" %)**AT command: AT+CLRDTA**
845
846 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
847 |=(% style="width: 153px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 139px; background-color: rgb(79, 129, 189); color: white;" %)**Function**|=(% style="width: 218px; background-color: rgb(79, 129, 189); color: white;" %)**Response**
848 |(% style="width:153px" %)AT+CLRDTA |(% style="width:139px" %)(((
849 Clear date record
850 )))|(% style="width:213px" %)(((
851 Stop Tx events,Please wait for the erase to complete
852
853 Clear all stored sensor data...
854
855 Start Tx events
856
857 OK
858 )))
859
860 (% style="color:blue" %)**Downlink Command:  0x32**
861
862 * Example: 0x32 00   ~/~/  Same as AT+CLRDTA
863
864 == 2.16 Set the downlink debugging mode(Since firmware v1.3.0) ==
865
866
867 Feature: Set the conversion between the standard version and 1T version downlinks.
868
869 (% style="color:blue" %)**AT command: AT+DOWNTE**
870
871 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
872 |=(% 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**
873 |(% style="width:134px" %)AT+DOWNTE=?|(% style="width:143px" %)Get current Settings|(% style="width:229px" %)(((
874 0,0  (default)
875 OK
876 )))
877 |(% colspan="1" rowspan="2" style="width:134px" %)(((
878
879
880
881
882 AT+DOWNTE=a,b
883 )))|(% style="width:143px" %)**a**: Set the conversion between the downlink of the standard version and 1T version|(% style="width:229px" %)(((
884 **0**: Set the downlink of the standard version.
885 **1**: Set the downlink of the 1T version(ThingsEye platform)
886 )))
887 |(% style="width:143px" %)**b**: Enable/Disable downlink debugging|(% style="width:229px" %)(((
888 **0**: Disable downlink debugging mode.
889 **1**: Enable downlink debugging mode, users can see the original downlink reception.
890 )))
891
892 **Example:**
893
894 * AT+DOWNTE=0,1  ~/~/ Set to standard version downlink, and enable downlink debugging.
895 * AT+DOWNTE=1,1  ~/~/ Set to 1T version downlink, and enable downlink debugging.
896
897 (% style="color:blue" %)**Downlink Command:  **
898
899 No downlink commands for feature
900
901
902 == 2.17 Domain name resolution settings(Since firmware v1.3.0) ==
903
904
905 Feature: Set dynamic domain name resolution IP.
906
907 (% style="color:blue" %)**AT command: AT+BKDNS**
908
909 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
910 |=(% 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**
911 |(% style="width:134px" %)(((
912 AT+BKDNS=?
913 )))|(% style="width:143px" %)Get current Settings|(% style="width:606px" %)(((
914 1,0,NULL  (default)
915 OK
916 )))
917 |(% colspan="1" rowspan="3" style="width:134px" %)(((
918
919
920
921
922
923
924
925
926
927
928
929 AT+BKDNS=a,b,c
930 )))|(% style="width:143px" %)(((
931 **a**: Enable/Disable dynamic domain name resolution.
932 )))|(% style="width:606px" %)**1**: Disable dynamic domain name update. The ip address will be saved after the domain name is resolved, if the next domain name resolution fails, the last saved ip address will be used.
933 **2**: Enable dynamic domain name update. The ip address will be saved after domain name resolution, if the next domain name resolution fails, the last saved ip address will be used, and the domain name resolution will be updated regularly according to the time set by the customer.
934 |(% style="width:143px" %)**b**: Set the time to update the domain name resolution at regular intervals.|(% style="width:606px" %)(((
935 Unit: hour
936 )))
937 |(% style="width:143px" %)(((
938 **c**: Set the IP address manually.
939 )))|(% style="width:606px" %)(((
940 The format is the same as AT+SERVADDR.
941 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.
942 )))
943
944 **Example:**
945
946 * AT+BKDNS=1,0  ~/~/ Dynamic domain name resolution is disabled.
947 * AT+BKDNS=2,1  ~/~/ The dynamic domain name resolution function is enabled and the automatic update time is set to 1 hour.
948 * AT+BKDNS=2,4,3.69.98.183,1883  ~/~/ The dynamic domain name resolution function is enabled and the automatic update time is set to 4 hour, and manually set the ip address, if the domain name failed to resolve, it will directly use this ip to communicate. When the next domain name resolution is successful, it will be updated to the ip address of the successful resolution.
949
950 (% style="color:blue" %)**Downlink Command:  **
951
952 No downlink commands for feature
953
954
955 == 2.18 Working mode selection(Since firmware V1.3.1) ==
956
957
958 Feature: Set interrupt mode or count mode (PB15 pin).
959
960 (% style="color:blue" %)**AT command: **(% style="color:#037691" %)**AT+CFGMOD**
961
962 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:470px" %)
963 |=(% 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**
964 |(% style="width:191px" %)AT+CFGMOD=1|(% style="width:277px" %)(((
965 Interrupt mode (default mode)
966 )))
967 |(% style="width:191px" %)AT+CFGMOD=2|(% style="width:277px" %)count mode
968
969 (% style="color:blue" %)**Downlink Command:  **(% style="color:#037691" %)**0x02**
970
971 * Downlink command: 02 01  ~/~/ Equal to AT+CFGMOD=1
972 * Downlink command: 02 02  ~/~/ Equal to AT+CFGMOD=2
973
974 == 2.19 Set Count value(Since firmware V1.3.1) ==
975
976
977 Feature: Set the count value of PB15.
978
979 (% style="color:blue" %)**AT command: **(% style="color:#037691" %)**AT+EXT**
980
981 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:470px" %)
982 |=(% 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**
983 |(% style="width:157px" %)AT+EXT=?|(% style="width:211px" %)Show current count value.|(% style="width:110px" %)(((
984 0  (default)
985
986 OK
987 )))
988 |(% style="width:157px" %)AT+EXT=100|(% style="width:211px" %)Set the count value to 100.|(% style="width:110px" %)OK
989
990 (% style="color:blue" %)**Downlink Command:  **(% style="color:#037691" %)**0x0B**
991
992 Format: Command Code (0x0B) followed by 4 bytes.
993
994 * Downlink command: 0B 00 00 00 00  ~/~/ Set the count value to 0
995 * Downlink command: 0B 00 00 00 64  ~/~/ Set the count value to 100
996
997 = 3. Configure S31x-NB =
998
999 == 3.1 Configure Methods ==
1000
1001
1002 S31x-NB supports below configure method:
1003
1004 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
1005
1006 * 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]].
1007
1008 == 3.2  Serial Access Password ==
1009
1010
1011 After the Bluetooth or UART connection is successful, use the Serial Access Password to enter the AT command window.
1012
1013 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.
1014
1015 [[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"]]
1016
1017
1018 If you need to change the password, use **AT+PWORD=**xxxxxx (6 characters), NB nodes only support lowercase letters.
1019
1020 [[image:image-20240826165233-2.png]]
1021
1022
1023 (% 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.**
1024
1025 [[image:image-20240826165228-1.png]]
1026
1027
1028 == 3.3 AT Commands Set ==
1029
1030
1031 AT+<CMD>? : Help on <CMD>
1032
1033 AT+<CMD> : Run <CMD>
1034
1035 AT+<CMD>=<value> : Set the value
1036
1037 AT+<CMD>=? : Get the value
1038
1039
1040 (% style="color:blue" %)**General Commands**      
1041
1042 AT+MODEL : Get module information
1043
1044 ATZ : Trig a reset of the MCU
1045
1046 AT+CFGMOD : Working mode selection
1047
1048 AT+DEUI : Get or set the Device ID
1049
1050 AT+CFG : Print all settings
1051
1052 AT+SERVADDR: Get or Set the Server address
1053
1054 AT+TDC : Get or set the application data transmission interval in s
1055
1056 AT+INTMOD : Get or Set the trigger interrupt mode (0:input,1:falling or rising,2:falling,3:rising)
1057
1058 AT+APN : Get or set the APN
1059
1060 AT+5VT : Get or Set extend the time of 5V power
1061
1062 AT+PRO : Get or Set usage agreement (1:COAP,2:UDP,3:MQTT,4:TCP)
1063
1064 AT+RXDL : Get or Set the receiving time
1065
1066 AT+EXT : Get or Set Count value
1067
1068 AT+SHTEMP:Get or Set alarm of shtemp
1069
1070 AT+SHHUM:Get or Set alarm of shthum
1071
1072 AT+GETSENSORVALUE : Returns the current sensor measurement
1073
1074 AT+DNSCFG : Get or Set DNS Server
1075
1076 AT+CSQTIME : Get or Set the time to join the network
1077
1078 AT+BKDNS : Get or Set dynamic domain name resolution IP
1079
1080 AT+TLSMOD : Get or Set the TLS mode
1081
1082 AT+SLEEP : Get or Set the sleep mode
1083
1084 AT+GETLOG : Print serial port logs
1085
1086 AT+CLOCKLOG: Get or set SHT record time
1087
1088 AT+DOWNTE: Get or set the conversion between the standard version and 1T version downlinks
1089
1090
1091 (% style="color:blue" %)**MQTT Management**
1092
1093 AT+MQOS : Set the QoS level of MQTT
1094
1095 AT+CLIENT : Get or Set the MQTT clientID
1096
1097 AT+UNAME : Get or Set the MQTT Username
1098
1099 AT+PWD : Get or Set the MQTT password
1100
1101 AT+PUBTOPIC: Get or set MQTT publishing topic
1102
1103 AT+SUBTOPIC: Get or set MQTT subscription topic
1104
1105
1106 (% style="color:blue" %)**Information**          
1107
1108 AT+FDR1 : Reset parameters to factory default values except for passwords
1109
1110 AT+FDR : Reset Parameters to Factory Default
1111
1112 AT+PWORD : Get or set the System password
1113
1114 AT+CDP : Read or Clear cached data
1115
1116 AT+LDATA : Get the last upload data
1117
1118
1119 (% style="color:blue" %)**COAP Management**
1120
1121 AT+URI1: Get or set CoAP option 1
1122
1123 AT+URI2: Get or set CoAP option 2
1124
1125 AT+URI3: Get or set CoAP option 3
1126
1127 AT+URI4: Get or set CoAP option 4
1128
1129
1130 (% style="color:blue" %)**Print or clear historical data**
1131
1132 AT+PDTA: Print the sector data from start page to stop page
1133
1134 AT+PLDTA: Print the last few sets of data
1135
1136 AT+CLRDTA: Clear the storage, record position back to 1st
1137
1138
1139 = 4. Battery & Power Consumption =
1140
1141
1142 S31x-NB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
1143
1144 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
1145
1146
1147 = 5. Firmware update =
1148
1149
1150 User can change device firmware to:
1151
1152 * Update with new features.
1153
1154 * Fix bugs.
1155
1156 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/fhb3uyl4gt6clru/AAAiZVTFcxrfE1JOOyfcgO9ha?dl=0]]**
1157
1158 Methods to Update Firmware:
1159
1160 * (Recommended way) OTA firmware update via BLE: [[**Instruction**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE_Firmware_Update_NB_Sensors_BC660K-GL/]].
1161
1162 * Update through UART TTL interface : **[[Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/UART_Access_for_NB_ST_BC660K-GL/#H4.2UpdateFirmware28Assumethedevicealreadyhaveabootloader29]]**.
1163
1164 = 6. FAQ =
1165
1166 == 6.1 How can I access t BC660K-GL AT Commands? ==
1167
1168
1169 User can access to BC660K-GL directly and send AT Commands.
1170
1171 [[See BC660K-GL AT Command set>>url:https://www.dropbox.com/sh/5f6ssda5fum8rvs/AABT68l8ZzWOvZ5eg2qwOoFda?dl=0]]
1172
1173
1174 = 7. Order Info =
1175
1176
1177 Part Number: (% style="color:blue" %)**S31-NB-XX  / S31B-NB-XX**
1178
1179 (% style="color:red" %)**XX**(%%):
1180
1181 * (% style="color:#037691" %)**GE**(%%): General version ( Exclude SIM card)
1182
1183 * (% style="color:#037691" %)**1T**(%%): with 1NCE * 10 years 500MB SIM card and Pre-configure to ThingsEye server
1184
1185 = 8. ​Packing Info =
1186
1187
1188 (% style="color:#037691" %)**Package Includes**:
1189
1190 * S31-NB or S31-NB NB-IoT Sensor Node x 1
1191
1192 * External antenna x 1
1193
1194 (% style="color:#037691" %)**Dimension and weight**:
1195
1196 * Device Size: 13.0 x 5 x 4.5 cm
1197
1198 * Device Weight: 150g
1199
1200 * Package Size / pcs : 14.0 x 8x 5 cm
1201
1202 * Weight / pcs : 180g
1203
1204 = 9. Support =
1205
1206
1207 * 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.
1208
1209 * 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]].
1210
1211 (% style="display:none" %) (%%)