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
504 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:
505
506 * (% 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)
507
508 * (% 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.
509
510 The diagram below explains the relationship between TR, NOUD, and TDC more clearly:
511
512 [[image:1692424376354-959.png]]
513
514
515 == 2.7 Trggier an uplink by external interrupt ==
516
517
518 TS01-NB has an external trigger interrupt function. Users can use the GPIO_EXTI pin to trigger the upload of data packets.
519
520 (% style="color:blue" %)**AT command:**
521
522 * (% style="color:#037691" %)**AT+INTMOD **(%%) ~/~/ Set the trigger interrupt mode
523
524 * (% style="color:#037691" %)**AT+INTMOD=0 **(%%) ~/~/ Disable Interrupt,as a digital input pin
525
526 * (% style="color:#037691" %)**AT+INTMOD=1 **(%%) ~/~/ Trigger by rising and falling edge
527
528 * (% style="color:#037691" %)**AT+INTMOD=2 **(%%) ~/~/ Trigger by falling edge
529
530 * (% style="color:#037691" %)**AT+INTMOD=3  **(%%) ~/~/ Trigger by rising edge
531
532 == 2.8 Set Alarm Interval ==
533
534
535 The shortest time of two Alarm packet. (unit: min)
536
537 (% style="color:blue" %)**AT Command:**
538
539 * (% style="color:#037691" %)**AT+ATDC=30**  
540
541 (% style="color:blue" %)**Downlink Payload:**
542
543 * (% style="color:#037691" %)**0x(0D 00 1E)**(%%)  ~/~/  Set AT+ATDC=0x 00 1E = 30 minutes
544
545 == 2.9 Set Calibration ==
546
547
548 (% style="color:blue" %)**AT Command:**
549
550 * (% style="color:#037691" %)**AT+CAL**
551
552 (% style="color:blue" %)**Downlink Payload:**
553
554 * (% style="color:#037691" %)**0x(F2 00)**
555
556 == 2.10 Set installation direction ==
557
558
559 The shortest time of two Alarm packet. (unit: min)
560
561 (% style="color:blue" %)**AT Command:**
562
563 * (% style="color:#037691" %)**AT+INSTAL=0**
564
565 (% style="color:blue" %)**Downlink Payload:**
566
567 * (% style="color:#037691" %)**0x(F0 00)**(%%)     **~/~/ ** Set AT+INSTAL=0
568
569 == 2.11 Set angle alarm ==
570
571
572 (% style="color:blue" %)**AT Command:**
573
574 * (% style="color:#037691" %)**AT+XALARM=value   **
575
576 * (% style="color:#037691" %)**AT+XALARM=min,max**  
577
578 (% style="color:blue" %)**Downlink Payload:**
579
580 * (% style="color:#037691" %)**0x(F3 00 1E)**          (%%) ~/~/ Set AT+XALARM=30
581
582 * (% style="color:#037691" %)**0x(F3 00 1E 00 50)**    (%%) ~/~/ Set AT+XALARM=30,80
583
584 * (% style="color:#037691" %)**0x(F4 00 1E)**          (%%) ~/~/ Set AT+YALARM=30
585
586 * (% style="color:#037691" %)**0x(F4 00 1E 00 50)**    (%%) ~/~/ Set AT+YALARM=30,80
587
588 == 2.12 Set alarm mode ==
589
590
591 (% style="color:blue" %)**AT Command:**
592
593 * (% style="color:#037691" %)**AT+AMOD=1  **
594
595 (% style="color:blue" %)**Downlink Payload:**
596
597 * (% style="color:#037691" %)**0x(F5 01)**  (%%) ~/~/ Set AT+AMOD=1
598
599 = 3. Configure TS01-NB =
600
601 == 3.1 Configure Methods ==
602
603
604 TS01-NB supports below configure method:
605
606 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
607
608 * 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]].
609
610 == 3.2 AT Commands Set ==
611
612
613 AT+<CMD>?        : Help on <CMD>
614
615 AT+<CMD>         : Run <CMD>
616
617 AT+<CMD>=<value> : Set the value
618
619 AT+<CMD>=?       : Get the value
620
621
622 (% style="color:blue" %)**General Commands**      
623
624 AT                    : Attention       
625
626 AT?  : Short Help     
627
628 ATZ  : MCU Reset    
629
630 AT+TDC  : Application Data Transmission Interval
631
632 AT+CFG  : Print all configurations
633
634 AT+MODEL  :Get module information
635
636 AT+SLEEP  :Get or set the sleep status
637
638 AT+DEUI  : Get or set the Device ID
639
640 AT+INTMOD            : Set the trigger interrupt mode
641
642 AT+APN : Get or set the APN 
643
644 AT+5VT           : Set extend the time of 5V power     
645
646 AT+PRO : Get or Set usage agreement (1:COAP,2:UDP,3:MQTT,4:TCP)
647
648 AT+RXDL  : Extend the sending and receiving time
649
650 AT+TR : Get or set SHT record time
651
652 AT+CDP     : Read or Clear cached data
653
654 AT+NOUD  : Get or Set the number of data to be uploaded
655
656 AT+DNSCFG  : Get or Set DNS Server
657
658 AT+CSQTIME : Get or Set the time to join the network
659
660 AT+DNSTIMER : Get or Set the NDS timer
661
662 AT+TLSMOD : Get or Set the TLS mode
663
664 AT+GETSENSORVALUE   : Returns the current sensor measurement
665
666 AT+SERVADDR :  Server Address
667
668
669 (% style="color:blue" %)**UDP Management**
670
671 AT+CFM  :  Upload confirmation mode (only valid for UDP)
672
673
674 (% style="color:blue" %)**MQTT Management**
675
676 AT+CLIENT               : Get or Set MQTT client
677
678 AT+UNAME              : Get or Set MQTT Username
679
680 AT+PWD                  : Get or Set MQTT password
681
682 AT+PUBTOPIC  : Get or Set MQTT publish topic
683
684 AT+SUBTOPIC  : Get or Set MQTT subscription topic
685
686
687 (% style="color:blue" %)**Information**          
688
689 AT+FDR  : Factory Data Reset
690
691 AT+PWORD  : Serial Access Password
692
693 AT+LDATA  : Get the last upload data
694
695 AT+CDP  : Read or Clear cached data
696
697
698 = 4. Battery & Power Consumption =
699
700
701 TS01-NB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
702
703 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
704
705
706 = 5. Firmware update =
707
708
709 User can change device firmware to::
710
711 * Update with new features.
712
713 * Fix bugs.
714
715 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/3483wf9ou9ixvy4/AACbuqPFOx0ebOwYKIEJFhZua?dl=0]]**
716
717 Methods to Update Firmware:
718
719 * (Recommended way) OTA firmware update via BLE: [[**Instruction**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE_Firmware_Update_NB_Sensors_BC660K-GL/]].
720
721 * Update through UART TTL interface : **[[Instruction>>http://8.211.40.43/xwiki/bin/view/Main/Firmware%20Upgrade%20Instruction%20for%20STM32%20base%20products/#H4.2.FirmwareupgradeusingSTM32Cubeprogramer]]**.
722
723 = 6. FAQ =
724
725 == 6.1 How can I access t BC660K-GL AT Commands? ==
726
727
728 User can access to BC660K-GL directly and send AT Commands.
729
730 [[See BC660K-GL AT Command set>>url:https://www.dropbox.com/sh/5f6ssda5fum8rvs/AABT68l8ZzWOvZ5eg2qwOoFda?dl=0]]
731
732
733 = 7. Order Info =
734
735
736 Part Number: (% style="color:blue" %)**TS01-NB-XX**
737
738 (% style="color:red" %)**XX:**
739
740 * (% style="color:#037691" %)**GE**(%%): General version ( Exclude SIM card)
741
742 * (% style="color:#037691" %)**1D**(%%): with 1NCE* 10 years 500MB SIM card and Pre-configure to DataCake server
743
744 = 8. ​Packing Info =
745
746
747 (% style="color:#037691" %)**Package Includes**:
748
749 * TS01-NB NB-IoT Tilting Sensor x 1
750
751 * External antenna x 1
752
753 (% style="color:#037691" %)**Dimension and weight**:
754
755 * Device Size: cm
756
757 * Device Weight: g
758
759 * Package Size / pcs : cm
760
761 * Weight / pcs : g
762
763 = 9. Support =
764
765
766 * 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.
767
768 * 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]].
769
770 (% style="display:none" %) (%%)
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0