Show last authors
1
2
3 (% style="text-align:center" %)
4 [[image:image-20231024134617-1.png||height="512" width="408"]]
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 NB-IoT Tilting Sensor ==
23
24
25 The Dragino TS01-NB is a (% style="color:blue" %)**NB-IoT Tilting Sensor**(%%) for Internet of Things solution. TS01-NB is an outdoor Tilting Sensor specially designed for (% style="color:blue" %)**detecting the angle of trees, buildings or large scale equipment**.
26
27 TS01-NB measures pitch and roll angle and converts to NB-IoT wireless data and sends to IoT platform via NB-IoT network.
28
29 TS01-NB supports different uplink methods including (% style="color:blue" %)**MQTT, MQTTs, UDP & TCP**(%%) for different application requirement, and support uplinks to various IoT Servers.
30
31 TS01-NB (% style="color:blue" %)**supports BLE configure **(%%)and(% style="color:blue" %)** OTA update**(%%) which make user easy to use.
32
33 TS01-NB is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), it is designed for long-term use up to several years.
34
35 TS01-NB has optional built-in SIM card and default IoT server connection version. Which makes it works with simple configuration.
36
37 [[image:image-20231024184022-1.png||height="330" width="883"]]
38
39
40 == 1.2 ​Features ==
41
42
43 * NB-IoT Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85 @H-FDD
44 * Ultra-low power consumption
45 * Detect pitch and roll angle
46 * Support Angle Alarm
47 * Support Datalog feature
48 * Multiply Sampling and one uplink
49 * Support BLE remote configure and update firmware
50 * Uplink on periodically
51 * Downlink to change configure
52 * 8500mAh Battery for long term use
53 * Uplink via MQTT, MQTTs, TCP, or UDP
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.5v ~~ 3.6v
62 * Operating Temperature: -40 ~~ 85°C
63
64 (% style="color:blue" %)**Angle Spec:**
65
66 * Measure Pitch and Roll
67 * Accuracy: 0.3°C
68
69 (% style="color:blue" %)**NB-IoT Spec:**
70
71 (% style="color:#037691" %)**NB-IoT Module: BC660K-GL**
72
73 (% style="color:#037691" %)**Support Bands:**
74
75 * B1 @H-FDD: 2100MHz
76 * B2 @H-FDD: 1900MHz
77 * B3 @H-FDD: 1800MHz
78 * B4 @H-FDD: 2100MHz
79 * B5 @H-FDD: 860MHz
80 * B8 @H-FDD: 900MHz
81 * B12 @H-FDD: 720MHz
82 * B13 @H-FDD: 740MHz
83 * B17 @H-FDD: 730MHz
84 * B18 @H-FDD: 870MHz
85 * B19 @H-FDD: 870MHz
86 * B20 @H-FDD: 790MHz
87 * B25 @H-FDD: 1900MHz
88 * B28 @H-FDD: 750MHz
89 * B66 @H-FDD: 2000MHz
90 * B70 @H-FDD: 2000MHz
91 * B85 @H-FDD: 700MHz
92
93 (% style="color:blue" %)**Battery:**
94
95 * Li/SOCI2 un-chargeable battery
96 * Capacity: 8500mAh
97 * Self Discharge: <1% / Year @ 25°C
98 * Max continuously current: 130mA
99 * Max boost current: 2A, 1 second
100
101 (% style="color:blue" %)**Power Consumption**
102
103 * STOP Mode: 10uA @ 3.3v
104 * Max transmit power: 350mA@3.3v
105
106 == 1.4 Sleep mode and working mode ==
107
108
109 (% 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.
110
111 (% 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.
112
113
114 == 1.5 Button & LEDs ==
115
116
117 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675071855856-879.png]]
118
119
120 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
121 |=(% 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**
122 |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
123 If sensor has already attached to NB-IoT network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
124 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
125 )))
126 |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
127 (% 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.
128 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
129 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.
130 )))
131 |(% 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.
132
133 (% 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.**
134
135
136 == 1.6 BLE connection ==
137
138
139 TS01-NB support BLE remote configure and firmware update.
140
141
142 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:
143
144 * Press button to send an uplink
145 * Press button to active device.
146 * Device Power on or reset.
147
148 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
149
150
151 == 1.7 Pin Definitions , Switch & SIM Direction ==
152
153
154 TS01-NB use the mother board which as below.
155
156 [[image:image-20231109114816-2.png]]
157
158
159 === 1.7.1 Jumper JP2 ===
160
161
162 Power on Device when put this jumper.
163
164
165 === 1.7.2 BOOT MODE / SW1 ===
166
167
168 **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.
169
170 **2)** (% style="color:blue" %)**Flash**(%%): work mode, device starts to work and send out console output for further debug
171
172
173 === 1.7.3 Reset Button ===
174
175
176 Press to reboot the device.
177
178
179 === 1.7.4 SIM Card Direction ===
180
181
182 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]].
183
184
185 == 1.8 Sketch of Pitch and Roll ==
186
187
188 [[image:image-20231025105743-1.png]]
189
190
191 == 1.9 Installation direction ==
192
193
194 (% style="color:blue" %)**Horizontal installation:**
195
196 [[image:image-20231025105808-2.png]]
197
198 (% style="color:blue" %)**Vertical installation:**
199
200 [[image:image-20231025105857-3.png]]
201
202
203 = 2. Use TS01-NB to communicate with IoT Server =
204
205 == 2.1 Send data to IoT server via NB-IoT network ==
206
207
208 The TS01-NB is equipped with a NB-IoT module, the pre-loaded firmware in TS01-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 TS01-NB.
209
210
211 Below shows the network structure:
212
213 [[image:image-20231024184036-2.png||height="340" width="909"]]
214
215
216 There are two version: (% style="color:blue" %)**-GE**(%%) and (% style="color:blue" %)**-1D**(%%) version of TS01-NB.
217
218
219 (% 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 TS01-NB send data to IoT server.
220
221 * 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]].
222
223 * 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]]. 
224
225 Below shows result of different server as a glance.
226
227 (% border="1" cellspacing="4" style="width:515px" %)
228 |(% 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**
229 |(% 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" %)(((
230 (% style="text-align:center" %)
231 [[image:image-20230819113244-8.png||height="183" width="367"]]
232 )))|(% style="width:170px" %)
233 |(% 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" %)(((
234 (% style="text-align:center" %)
235 [[image:image-20230819113244-9.png||height="119" width="367"]]
236 )))|(% style="width:170px" %)
237 |(% 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" %)
238 |(% 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" %)
239 |(% 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" %)
240 |(% 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" %)(((
241 (% style="text-align:center" %)
242 [[image:image-20230819113244-10.png||height="104" width="367"]]
243 )))|(% style="width:170px" %)
244 |(% 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" %)(((
245 (% style="text-align:center" %)
246 [[image:image-20230819113244-11.png||height="141" width="367"]]
247 )))|(% style="width:170px" %)
248
249 (% style="color:blue" %)**1D Version**(%%): This version has 1NCE SIM card pre-installed and configure to send value to DataCake. User Just need to select the sensor type in DataCake and Activate TS01-NB and user will be able to see data in DataCake. See here for [[DataCake Config Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.4Datacake]].
250
251
252 == 2.2 ​Payload Types ==
253
254
255 To meet different server requirement, TS01-NB supports different payload type.
256
257 **Includes:**
258
259 * [[General JSON format payload>>||anchor="H2.2.1GeneralJsonFormat28Type3D529"]]. (Type=5)
260
261 * [[HEX format Payload>>||anchor="H2.2.2HEXformatPayload28Type3D029"]]. (Type=0)
262
263 * [[ThingSpeak Format>>||anchor="H2.2.4ThingSpeakPayload28Type3D129"]]. (Type=1)
264
265 * [[ThingsBoard Format>>||anchor="H2.2.3ThingsBoardPayload28Type3D329"]]. (Type=3)
266
267 User can specify the payload type when choose the connection protocol. Example:
268
269 (% style="color:#037691" %)**AT+PRO=2,0**  (%%) ~/~/ Use UDP Connection & hex Payload
270
271 (% style="color:#037691" %)**AT+PRO=2,5**   (%%) ~/~/ Use UDP Connection & Json Payload
272
273 (% style="color:#037691" %)**AT+PRO=3,0**  (%%) ~/~/ Use MQTT Connection & hex Payload
274
275 (% style="color:#037691" %)**AT+PRO=3,1           **(%%)~/~/ Use MQTT Connection & ThingSpeak
276
277 (% style="color:#037691" %)**AT+PRO=3,3           **(%%)~/~/ Use MQTT Connection & ThingsBoard
278
279 (% style="color:#037691" %)**AT+PRO=3,5 ** (%%) ~/~/ Use MQTT Connection & Json Payload
280
281 (% style="color:#037691" %)**AT+PRO=4,0**  (%%) ~/~/ Use TCP Connection & hex Payload
282
283 (% style="color:#037691" %)**AT+PRO=4,5**   (%%) ~/~/ Use TCP Connection & Json Payload
284
285
286 === 2.2.1 General Json Format(Type~=5) ===
287
288
289 This is the General Json Format. As below:
290 \\(% style="color:#4472c4" %)**{"IMEI":"866207052559857","Model":"TS01-NB","temperature":26.0,"roll":-26.94,"pitch":-0.48,"battery":3.53,"signal":25,"1":{26.1,-26.87,-0.46,2023/11/09 06:29:31},"2":{350.2,0.42,3.83,2023/11/07 09:33:59},"3":{352.2,19.19,3.88,2023/11/07 09:19:02},"4":{352.7,0.62,3.88,2023/11/07 09:04:00},"5":{0.0,0.59,3.88,2023/11/07 08:49:02},"6":{0.0,0.62,3.88,2023/11/07 08:34:02},"7":{363.1,0.62,3.89,2023/11/07 08:18:59},"8":{0.0,0.79,3.88,2023/11/07 08:04:02}}**
291
292
293 [[image:image-20231109144307-1.png||height="813" width="1107"]]
294
295 (% style="color:red" %)**Notice, from above payload:**
296
297 * Temperature, Roll, Pitch, Battery & Signal are the value at uplink time.
298
299 * Json entry 1 ~~ 8 are the last 1 ~~ 8 sampling data as specify by (% style="color:#037691" %)**AT+NOUD=8 ** (%%)Command. Each entry includes (from left to right): Temperature, Roll, Pitch, Sampling time.
300
301 === 2.2.2 HEX format Payload(Type~=0) ===
302
303
304 This is the HEX Format. As below:
305
306 (% style="color:#4472c4" %)**f86620705255985702640de716000000010c3ffa0007654c88f70105eed20514654c84790103ee970409654c80f50105ece5ffad654c7c4b0dae004c02ba654a04870dc20da602c3654a01060dc7007002c36549fd800000006c02c36549f9fe0000007002c36549f67a**
307
308 [[image:image-20231109104707-1.png||height="207" width="1267"]]
309
310
311 [[image:image-20231109153528-2.png||height="816" width="1096"]]
312
313 (% style="color:blue" %)**Version:**
314
315 These bytes include the hardware and software version.
316
317 (% style="color:#037691" %)**Higher byte:**(%%) Specify Sensor Model: 0x02 for TS01-NB
318
319 (% style="color:#037691" %)**Lower byte:**(%%) Specify the software version: 0x64=101, means firmware version 1.0.0
320
321
322 (% style="color:blue" %)**BAT (Battery Info):**
323
324 Sensor Battery Level.
325
326 Ex1: 0x0B45 = 2885mV
327
328 Ex2: 0x0B49 = 2889mV
329
330
331 (% style="color:blue" %)**Temperature:**
332
333 **Example**:
334
335 If payload is: 0105H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree
336
337 If payload is: FF3FH :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
338
339 (FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
340
341
342 (% style="color:blue" %)**Roll:**
343
344 Read:0x(0197)=412    Value:  412 / 100=4.12
345
346
347 (% style="color:blue" %)**Pitch:**
348
349 Read:0x(0251)=412    Value:  593/ 100=5.93
350
351
352 (% style="color:blue" %)**Alarm Flag & Level of PA8:**
353
354 **Example:**
355
356 If payload & 0x01 = 0x01  **~-~->** This is an Alarm Message.
357
358 If payload & 0x01 = 0x00  **~-~->** This is a normal uplink message, no alarm.
359
360 If payload & 0x80>>7 = 0x01  **~-~->** The PA8 is low level.
361
362 If payload & 0x80>>7 =0x00  **~-~->** The PA8 is high level.
363
364
365 (% style="color:blue" %)**Instal flag:**
366
367 Read:0x(00)=0 (% style="color:#037691" %)  (%%) ~/~/  horizontal direction
368
369 Read:0x(01)=1  (% style="color:#037691" %)   (%%) ~/~/  Vertical direction
370
371
372 (% style="color:blue" %)**TimeStamp:   **
373
374 Unit TimeStamp Example: 64e2d74f(H) = 1692587855(D)
375
376 Put the decimal value into this link([[https:~~/~~/www.epochconverter.com)>>https://www.epochconverter.com]])to get the time.
377
378
379 === 2.2.3 ThingsBoard Payload(Type~=3) ===
380
381
382 Type3 payload special design for ThingsBoard, it will also configure other default server to ThingsBoard.
383
384 (% style="color:blue" %)**{"IMEI":"866207052559857","Model":"TS01-NB","temperature":26.2,"roll":88.63,"pitch":-0.18,"battery":3.55,"signal":26}**
385
386 [[image:image-20231109160445-3.png||height="577" width="1095"]]
387
388
389 === 2.2.4 ThingSpeak Payload(Type~=1) ===
390
391
392 This payload meets ThingSpeak platform requirement. It includes only five fields. Form 1~~5 are:
393
394 Temperature, Roll, Pitch, Battery & Signal. This payload type only valid for ThingsSpeak Platform
395
396 As below:
397
398 (% style="color:blue" %)**field1=Temperature value&field2=Roll value&field3=Pitch value&field4=Battery value&field5=Signal value**
399
400 [[image:image-20231109163026-4.png||height="970" width="976"]]
401
402
403 == 2.3 Angle Alarm Feature ==
404
405
406 TS01-NB work flow with Alarm feature.
407
408 TS01-NB has two alarm modes.
409
410
411 (% style="color:blue" %)**Alarm Mode 1:**
412
413 (% style="color:#037691" %)**AT+AMOD=1**
414
415 (% style="color:#037691" %)**AT+XALARM=Xvalue, AT+YALARM=Yvalue**
416
417 When an angle change is detected that exceeds the range compared to the last time, an alarm is reported.
418
419 **For example:**
420
421 AT+XALARM=10
422
423 AT+YALARM=20
424
425 The last angle measured on the X-axis was 120 degrees, and this time the angle measured on the X-axis is 135 degrees, an alarm will be triggered to upload a data packet.
426
427 The last time the angle measured on the Y-axis was 100 degrees, but this time the angle measured on the Y-axis is 50 degrees, which will trigger an alarm and upload the data packet.
428
429 If the alarm conditions are met on the X-axis or Y-axis, an alarm will be triggered.
430
431
432 (% style="color:blue" %)**Alarm Mode 2:**
433
434 (% style="color:#037691" %)**AT+AMOD=2**
435
436 (% style="color:#037691" %)**AT+XALARM=min,max**
437
438 When min=0, and max≠0, Alarm higher than max
439
440 When min≠0, and max=0, Alarm lower than min
441
442 When min≠0 and max≠0, Alarm higher than max or lower than min
443
444 **Example:**
445
446 AT+ XALARM=50,80  ~/~/ Alarm when Roll lower than 50.
447
448
449 (% style="color:#037691" %)**AT+YALARM=min,max**
450
451 When min=0, and max≠0, Alarm higher than max
452
453 When min≠0, and max=0, Alarm lower than min
454
455 When min≠0 and max≠0, Alarm higher than max or lower than min
456
457 **Example:**
458
459 AT+ YALARM=20,30  ~/~/ Alarm when Pitch lower than 20.
460
461
462 **Alarm Mode 0:**
463
464 AT+AMOD=0  ~/~/  Turn off alarm function
465
466
467 (% style="color:blue" %)**Alarm time setting:**
468
469 (% style="color:#037691" %)**AT+TR=180**   (%%) ~/~/  It means triggering an alarm every 3 minutes.
470
471
472 == 2.4 Calibration and installation direction ==
473
474
475 (% style="color:blue" %)**AT+CAL : Calibration angle**
476
477 (% style="color:red" %)**NOTE: If the installation direction is horizontal, the user needs to place the device horizontally for calibration. If the installation direction is vertical, the user needs to place the device vertically for calibration. If the direction is incorrect, it may result in opposite angles or inaccurate degrees.**
478
479 When the calibration angle is 0 or close to 0, it is considered successful calibration.
480
481
482 (% style="color:blue" %)**Installation direction command:**
483
484 (% style="color:#037691" %)**AT+INSTAL=0 ** (%%) ~/~/  horizontal direction
485
486 (% style="color:#037691" %)**AT+INSTAL=1 ** (%%) ~/~/  Vertical direction
487
488
489 == 2.5 Test Uplink and Change Update Interval ==
490
491
492 By default, Sensor will send uplinks (% style="color:blue" %)**every 2 hours**(%%) & AT+NOUD=8
493
494 User can use below commands to change the (% style="color:blue" %)**uplink interval**.
495
496 (% style="color:#037691" %)**AT+TDC=600 ** (%%) ~/~/ Set Update Interval to 600s
497
498 User can also push the button for more than 1 seconds to activate an uplink.
499
500
501 == 2.6 Multi-Samplings and One uplink ==
502
503 (% style="color:red" %)Notice: The AT+NOUD feature is upgraded to Clock Logging, please refer [[Clock Logging Feature>>||anchor="H2.13Clocklogging28Sincefirmwareversionv1.2.129"]]
504
505 To save battery life, TS01-NB will sample Idc_input & Vdc_input 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:
506
507 * (% 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)
508
509 * (% 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.
510
511 The diagram below explains the relationship between TR, NOUD, and TDC more clearly:
512
513 [[image:1692424376354-959.png]]
514
515
516 == 2.7 Trggier an uplink by external interrupt ==
517
518
519 TS01-NB has an external trigger interrupt function. Users can use the GPIO_EXTI pin to trigger the upload of data packets.
520
521 (% style="color:blue" %)**AT command:**
522
523 * (% style="color:#037691" %)**AT+INTMOD **(%%) ~/~/ Set the trigger interrupt mode
524
525 * (% style="color:#037691" %)**AT+INTMOD=0 **(%%) ~/~/ Disable Interrupt,as a digital input pin
526
527 * (% style="color:#037691" %)**AT+INTMOD=1 **(%%) ~/~/ Trigger by rising and falling edge
528
529 * (% style="color:#037691" %)**AT+INTMOD=2 **(%%) ~/~/ Trigger by falling edge
530
531 * (% style="color:#037691" %)**AT+INTMOD=3  **(%%) ~/~/ Trigger by rising edge
532
533 == 2.8 Set Alarm Interval ==
534
535
536 The shortest time of two Alarm packet. (unit: min)
537
538 (% style="color:blue" %)**AT Command:**
539
540 * (% style="color:#037691" %)**AT+ATDC=30**  
541
542 (% style="color:blue" %)**Downlink Payload:**
543
544 * (% style="color:#037691" %)**0x(0D 00 1E)**(%%)  ~/~/  Set AT+ATDC=0x 00 1E = 30 minutes
545
546 == 2.9 Set Calibration ==
547
548
549 (% style="color:blue" %)**AT Command:**
550
551 * (% style="color:#037691" %)**AT+CAL**
552
553 (% style="color:blue" %)**Downlink Payload:**
554
555 * (% style="color:#037691" %)**0x(F2 00)**
556
557 == 2.10 Set installation direction ==
558
559
560 The shortest time of two Alarm packet. (unit: min)
561
562 (% style="color:blue" %)**AT Command:**
563
564 * (% style="color:#037691" %)**AT+INSTAL=0**
565
566 (% style="color:blue" %)**Downlink Payload:**
567
568 * (% style="color:#037691" %)**0x(F0 00)**(%%)     **~/~/ ** Set AT+INSTAL=0
569
570 == 2.11 Set angle alarm ==
571
572
573 (% style="color:blue" %)**AT Command:**
574
575 * (% style="color:#037691" %)**AT+XALARM=value   **
576
577 * (% style="color:#037691" %)**AT+XALARM=min,max**  
578
579 (% style="color:blue" %)**Downlink Payload:**
580
581 * (% style="color:#037691" %)**0x(F3 00 1E)**          (%%) ~/~/ Set AT+XALARM=30
582
583 * (% style="color:#037691" %)**0x(F3 00 1E 00 50)**    (%%) ~/~/ Set AT+XALARM=30,80
584
585 * (% style="color:#037691" %)**0x(F4 00 1E)**          (%%) ~/~/ Set AT+YALARM=30
586
587 * (% style="color:#037691" %)**0x(F4 00 1E 00 50)**    (%%) ~/~/ Set AT+YALARM=30,80
588
589 == (% data-sider-select-id="1abef3ab-5327-49cb-bd69-c1648a23341a" %)2.12 Set alarm mode(%%) ==
590
591
592 (% style="color:blue" %)**AT Command:**
593
594 * (% style="color:#037691" %)**AT+AMOD=1  **
595
596 (% style="color:blue" %)**Downlink Payload:**
597
598 * (% style="color:#037691" %)**0x(F5 01)**  (%%) ~/~/ Set AT+AMOD=1
599
600 == 2.13 Clock logging (Since firmware version v1.2.1) ==
601
602 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.
603
604 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.
605
606 * (% style="color:blue" %)**AT Command:**(%%)** (% style="color:#037691" %)AT+CLOCKLOG=a,b,c,d(%%)**
607
608 (% style="color:#037691" %)**a: **(%%)**0:** Disable Clock logging.  ** 1: **Enable Clock Logging
609
610 (% 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.
611
612 (% style="color:#037691" %)**c: **(%%)Specify the sampling interval: range **(0 ~~ 255 minutes)**
613
614 (% style="color:#037691" %)**d:**(%%)How many entries should be uplink on every TDC **(max 32)**
615
616 [[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"]]
617
618 **Example:**
619
620 **AT+CLOCKLOG=1,65535,1,5**
621
622 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).
623
624 (% class="wikigeneratedid" %)
625 [[image:image-20240316163501-1.png||height="517" width="1064"]]
626
627 (% class="wikigeneratedid" %)
628 (% 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.**
629
630
631 == 2.14 Example Query saved historical records ==
632
633
634 * (% style="color:blue" %)**AT Command:**(%%)** (% style="color:#037691" %)AT+CDP(%%)**
635
636 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.
637
638 (% class="wikigeneratedid" %)
639 [[image:image-20240316163550-2.png||height="638" width="829"]]
640
641
642 == 2.15 Uplink log query ==
643
644
645 * (% style="color:blue" %)**AT Command:**(%%)** (% style="color:#037691" %)AT+GETLOG(%%)**
646
647 This command can be used to query upstream logs of data packets.
648
649 [[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"]]
650
651
652 == (% data-sider-select-id="2d2445b0-da61-405a-badd-484eb546c390" %)2.16 (%%)Scheduled domain name resolution ==
653
654
655 (% data-sider-select-id="27359b94-e7f5-4ea4-bd74-8e323eb3fc2b" %)
656 This command can be used to resolve domain names regularly.
657
658 (% data-sider-select-id="27359b94-e7f5-4ea4-bd74-8e323eb3fc2b" %)
659 (% data-sider-select-id="50daeb1a-df96-4ffd-8d25-c39f71f1c6bc" style="color:blue" %)**AT Command:**
660
661 * (% data-sider-select-id="810d804c-01b0-4651-acfc-dbed2f0ed9e1" style="color:#037691" %)**AT+DNSTIMER=XX**(%%)** **~/~/ Unit: hour
662
663 After setting this command, domain name resolution will be performed regularly.
664
665
666 = 3. Configure TS01-NB =
667
668 == 3.1 Configure Methods ==
669
670
671 TS01-NB supports below configure method:
672
673 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
674
675 * 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]].
676
677 == 3.2 AT Commands Set ==
678
679
680 AT+<CMD>?        : Help on <CMD>
681
682 AT+<CMD>         : Run <CMD>
683
684 AT+<CMD>=<value> : Set the value
685
686 AT+<CMD>=?       : Get the value
687
688
689 (% style="color:blue" %)**General Commands**      
690
691 AT                    : Attention       
692
693 AT?  : Short Help     
694
695 ATZ  : MCU Reset    
696
697 AT+TDC  : Application Data Transmission Interval
698
699 AT+CFG  : Print all configurations
700
701 AT+MODEL  :Get module information
702
703 AT+SLEEP  :Get or set the sleep status
704
705 AT+DEUI  : Get or set the Device ID
706
707 AT+INTMOD            : Set the trigger interrupt mode
708
709 AT+APN : Get or set the APN 
710
711 AT+5VT           : Set extend the time of 5V power     
712
713 AT+PRO : Get or Set usage agreement (1:COAP,2:UDP,3:MQTT,4:TCP)
714
715 AT+RXDL  : Extend the sending and receiving time
716
717 AT+TR : Get or set SHT record time
718
719 AT+CDP     : Read or Clear cached data
720
721 AT+NOUD  : Get or Set the number of data to be uploaded
722
723 AT+DNSCFG  : Get or Set DNS Server
724
725 AT+CSQTIME : Get or Set the time to join the network
726
727 AT+DNSTIMER : Get or Set the NDS timer
728
729 AT+TLSMOD : Get or Set the TLS mode
730
731 AT+GETSENSORVALUE   : Returns the current sensor measurement
732
733 AT+SERVADDR :  Server Address
734
735
736 (% style="color:blue" %)**MQTT Management**
737
738 AT+CLIENT               : Get or Set MQTT client
739
740 AT+UNAME              : Get or Set MQTT Username
741
742 AT+PWD                  : Get or Set MQTT password
743
744 AT+PUBTOPIC  : Get or Set MQTT publish topic
745
746 AT+SUBTOPIC  : Get or Set MQTT subscription topic
747
748
749 (% style="color:blue" %)**Information**          
750
751 AT+FDR  : Factory Data Reset
752
753 AT+PWORD  : Serial Access Password
754
755 AT+LDATA  : Get the last upload data
756
757 AT+CDP  : Read or Clear cached data
758
759
760 = 4. Battery & Power Consumption =
761
762
763 TS01-NB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
764
765 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
766
767
768 = 5. Firmware update =
769
770
771 User can change device firmware to::
772
773 * Update with new features.
774
775 * Fix bugs.
776
777 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/3483wf9ou9ixvy4/AACbuqPFOx0ebOwYKIEJFhZua?dl=0]]**
778
779 Methods to Update Firmware:
780
781 * (Recommended way) OTA firmware update via BLE: [[**Instruction**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE_Firmware_Update_NB_Sensors_BC660K-GL/]].
782
783 * Update through UART TTL interface : **[[Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/UART_Access_for_NB_ST_BC660K-GL/#H4.2UpdateFirmware28Assumethedevicealreadyhaveabootloader29]]**.
784
785 = 6. FAQ =
786
787 == 6.1 How can I access t BC660K-GL AT Commands? ==
788
789
790 User can access to BC660K-GL directly and send AT Commands.
791
792 [[See BC660K-GL AT Command set>>url:https://www.dropbox.com/sh/5f6ssda5fum8rvs/AABT68l8ZzWOvZ5eg2qwOoFda?dl=0]]
793
794
795 == 6.2 How to configure the certificate? ==
796
797
798 User can can refer to this [[description>>url:http://wiki.dragino.com/xwiki/bin/view/How%20to%20configure%20the%20certificate%3F/]] to configure the certificate.
799
800
801
802 = 7. Order Info =
803
804
805 Part Number: (% style="color:blue" %)**TS01-NB-XX**
806
807 (% style="color:red" %)**XX:**
808
809 * (% style="color:#037691" %)**GE**(%%): General version ( Exclude SIM card)
810
811 * (% style="color:#037691" %)**1D**(%%): with 1NCE* 10 years 500MB SIM card and Pre-configure to DataCake server
812
813 = 8. ​Packing Info =
814
815
816 (% style="color:#037691" %)**Package Includes**:
817
818 * TS01-NB NB-IoT Tilting Sensor x 1
819
820 * External antenna x 1
821
822 (% style="color:#037691" %)**Dimension and weight**:
823
824 * Device Size: cm
825
826 * Device Weight: g
827
828 * Package Size / pcs : cm
829
830 * Weight / pcs : g
831
832 = 9. Support =
833
834
835 * 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.
836
837 * 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]].
838
839 (% style="display:none" %) (%%)
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0