Version 194.1 by Bei Jinggeng on 2023/03/02 14:57

Show last authors
1 (% style="text-align:center" %)
2 [[image:1664505654417-133.png||_mstalt="293696"]]
3
4
5
6
7 (% class="wikigeneratedid" %)
8 **Table of Contents:**
9
10 {{toc/}}
11
12
13
14
15
16 = 1.  Introduction =
17
18 == 1.1  What is TrackerD ==
19
20
21 (((
22 TrackerD is an (% style="color:blue" %)**Open Source LoRaWAN Tracker**(%%) based on (% style="color:blue" %)**ESP32 MCU**(%%) and (% style="color:blue" %)**Semtech LoRa Wireless Chip**.
23 )))
24
25 (((
26 In TrackerD, there are various sensors such as GPS, WiFi, BLE, Temperature, Humidity, Motion Detection, and Buzzer. User can use TrackerD for different tracking scenario.
27
28 (((
29 TrackerD is program friendly. Developers can use Arduino IDE to customize the software of TrackerD to fit their IoT solution.
30 )))
31
32 (((
33 The LoRa wireless technology used in TrackerD allows the user to send data and reach extremely long ranges at low data-rates. It provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption. It targets professional tracking services.
34 )))
35
36 (((
37 TrackerD is equipped with a (% style="color:blue" %)**1000mAh Li-on rechargeable battery**(%%). Each TrackerD has a worldwide unique OTAA keys to join the LoRaWAN network.
38 )))
39
40 [[image:image-20230213110119-1.png||height="382" width="834"]]
41
42
43 (% style="color:red" %)**Note: LoRaWAN server can be a general LoRaWAN server other than TTN.**
44
45
46 == 1.2 Specifications ==
47
48
49 (% style="color:blue" %)**Micro Controller:**
50
51 * Espressif ESP32 PICO D4
52 * MCU: ESP32 PICO D4
53 * Bluetooth: Bluetooth V4.2 BR/EDR and Bluetooth LE
54 * WiFi : 802.11 b/g/n (802.11n up to 150 Mbps)
55 * Integrated SPI flash : 4 MB
56 * RAM: 448 KB
57 * EEPROM: 520 KB
58 * Clock Speed: 32Mhz
59
60 (% style="color:blue" %)**Common DC Characteristics:**
61
62 * Supply Voltage: 5V via USB port or Internal li-on battery
63 * Operating Temperature: -40 ~~ 60°C
64
65 (% style="color:blue" %)**LoRa Spec:**
66
67 * Frequency Range,
68 ** Band 1 (HF): 862 ~~ 1020 Mhz
69 * 168 dB maximum link budget.
70 * +20 dBm - 100 mW constant RF output vs.
71 * +14 dBm high efficiency PA.
72 * Programmable bit rate up to 300 kbps.
73 * High sensitivity: down to -148 dBm.
74 * Bullet-proof front end: IIP3 = -12.5 dBm.
75 * Excellent blocking immunity.
76 * Low RX current of 10.3 mA, 200 nA register retention.
77 * Fully integrated synthesizer with a resolution of 61 Hz.
78 * FSK, GFSK, MSK, GMSK, LoRaTM and OOK modulation.
79 * Built-in bit synchronizer for clock recovery.
80 * Preamble detection.
81 * 127 dB Dynamic Range RSSI.
82 * Automatic RF Sense and CAD with ultra-fast AFC.
83 * Packet engine up to 256 bytes with CRC.
84 * LoRaWAN 1.0.3 Specification
85
86 (% style="color:blue" %)**Battery:**
87
88 * 1000mA Li-on Battery power (for model TrackerD)
89
90 (% style="color:blue" %)**Power Consumption**
91
92 * Sleeping Mode: 200uA
93 * LoRa Transmit Mode: 125mA @ 20dBm 44mA @ 14dBm
94 * Tracking: max: 38mA
95
96
97 == 1.3  Features ==
98
99
100 * LoRaWAN 1.0.3 Class A
101 * ESP32 PICO D4
102 * SX1276/78 Wireless Chip
103 * Arduino IDE Compatible
104 * Open source hardware / software
105 * Regular/ Real-time GPS,BLE,WIFI tracking
106 * Built-in3 axis accelerometer (LIS3DH)
107 * Humidity / temperature sensor : GXCAS Technology GXHT3X
108 * Motion sensing capability
109 * Power Monitoring
110 * Charging circuit via USB port
111 * 1000mA Li-on Battery power
112 * Tri-color LED, Alarm button
113 * Datalog
114
115
116 == 1.4  Applications ==
117
118
119 * Logistics and Supply Chain Management
120 * Human tracking
121
122
123 = 2.  Use TrackerD =
124
125 == 2.1 How it works? ==
126
127
128 TrackerD is configured as LoRaWAN OTAA Class A GPS tracker by default. It has OTAA keys to join LoRaWAN network. To connect a LoRaWAN network, user need to input the OTAA keys in the LoRaWAN IoT server and push reset button of TrackerD (next to USB port). TrackerD will wake up and auto join the network via OTAA.
129
130
131 == 2.2 Quick guide to connect to LoRaWAN server ==
132
133
134 Here is an example for how to join the [[TTNv3 LoRaWAN Network>>url:https://eu1.cloud.thethings.network]]. Below is the network structure, we use LPS8N as LoRaWAN gateway in this example. 
135
136
137 [[image:image-20230213110214-2.png||height="388" width="847"]]
138
139
140
141 The LPS8N is already set to connect to [[TTN V3 network >>url:https://eu1.cloud.thethings.network/]]. What the rest need to is register this device in TTN V3:
142
143
144 (% style="color:blue" %)**Step 1**:(%%) Create a device in TTN V3 with the OTAA keys from TrackerD.
145
146 Each TrackerD is shipped with a sticker with the default device EUI as below:
147
148
149 [[image:1664501677253-891.png||_mstalt="296569"]]
150
151
152 Input these keys to their LoRaWAN Server portal. Below is TTN V3 screen shot:
153
154
155 **__Add APP EUI in the application:__**
156
157
158 [[image:1664501711466-918.png||_mstalt="295828"]]
159
160
161
162 [[image:1664501721248-725.png||_mstalt="294450"]]
163
164
165 [[image:1664501734705-405.png||_mstalt="293306"]]
166
167
168
169 **__Add APP KEY and DEV EUI:__**
170
171
172 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS02%20-%20LoRaWAN%20Door%20Sensor%20User%20Manual/WebHome/1654671889112-678.png?rev=1.1||_mstalt="298233" alt="1654671889112-678.png"]]
173
174
175
176 (% style="color:blue" %)**Step 2**:(%%) Push this button will activate this device.
177
178 (% id="cke_bm_7709S" style="display:none" %) [[image:1664502835802-546.png||_mstalt="295061"]]
179
180 [[image:1664502835802-546.png||_mstalt="295061"]]
181
182
183 (% style="color:blue" %)**Step 3:**(%%) TrackerD will auto join to the LoRaWAN network. After join success, TrackerD will start to upload message to IoT server.
184
185
186 == 2.3  Positioning Mode(SMOD) ==
187
188
189 Users can set TrackerD to different Positioning Mode for different applications. Below mod are supported.
190
191 * (% style="color:#037691" %)**GPS ONLY(Factory Settings):    **(%%)Only get and uplink GPS location info.
192 * (% style="color:#037691" %)**BLE or WiFi ONLY:            **(%%)** **Only obtain iBeacon info via BLE and uplink  or obtain wifi ssid info via WiFi and uplink. Design for Indoor tracking.
193 * (% style="color:#037691" %)**GPS/BLE Hybrid:                        **(%%)Combination for Indoor and Outdoor tracking. Devices will try to search BLE iBeacon first. If device can't find the iBeacon, it will use GPS for positioning.
194
195 Users can switch modes by [[changing SMOD>>||anchor="H3.2.7SetPositioningMode"]].
196
197
198 == 2.4  Uplink Payload ==
199
200 === 2.4.1 Uplink FPORT~=5, Device Status ===
201
202
203 Uplink the device configures with FPORT=5. Once TrackerD Joined the network, it will uplink this message to the server. After the first uplink, TrackerD will uplink Device Status every 12 hours.
204
205 Use can also get the Device Status uplink through the downlink command: **Downlink:  0x2301**
206
207
208 (% border="1.5" style="background-color:#ffffcc; color:green; width:440px" %)
209 |=(% style="width: 60px;" %)**Size(bytes)**|=(% style="width: 70px;" %)**1**|=(% style="width: 70px;" %)**2**|=(% style="width: 70px;" %)**1**|=(% style="width: 50px;" %)**1**|=(% style="width: 30px;" %)2|=(% style="width: 40px;" %)1|=(% style="width: 40px;" %)1
210 |=(% style="width: 108px;" %)**Value**|(% style="width:82px" %)Sensor Model|(% style="width:83px" %)Firmware Version|(% style="width:94px" %)Frequency Band|(% style="width:84px" %)Sub-band|(% style="width:44px" %)BAT|(% style="width:63px" %)SMOD|(% style="width:60px" %)Status
211
212 [[image:1665301570342-765.png||_mstalt="294580"]]
213
214
215 (% style="color:#037691" %)**Example of Device Status:**(%%) 13014001FF0FA24002
216
217 (% style="color:#037691" %)**Sensor Model:** (%%) For TrackerD,this value is 0x13
218
219 (% style="color:#037691" %)**Firmware Version: **(%%) 0x0140,Means:v1.4.0 version
220
221 (% style="color:#037691" %)**Frequency Band**:
222
223 *0x01: EU868
224
225 *0x02: US915
226
227 *0x03: IN865
228
229 *0x04: AU915
230
231 *0x05: KZ865
232
233 *0x06: RU864
234
235 *0x07: AS923
236
237 *0x08: AS923-1
238
239 *0x09: AS923-2
240
241 *0x0a: AS923-3
242
243 Sub- Band:value 0x00~~0x08(only forAU915,US915,Others are 0xFF)
244
245 (% style="color:#037691" %)**BAT:**(%%) shows the battery voltage for TrackerD.
246
247
248 (% style="color:#037691" %)**Ex1:**(%%) 0x0FA2 = 4002mV
249
250 Use can also get the Device Status uplink through the downlink command:
251
252
253 (% style="color:#037691" %)**SMOD Field (total 1 byte)**(%%):0x40
254
255 (% border="1.5" style="background-color:#ffffcc; color:green; width:270px" %)
256 |=(% scope="row" style="width: 60px;" %)**Size(bit)**|(% style="width:50px" %)1bits|(% style="width:80px" %)2bit|(% style="width:80px" %)4bit
257 |=(% style="width: 75px;" %)**Value**|(% style="width:64px" %)SMOD|(% style="width:104px" %)GPS_Settings|(% style="width:103px" %)BLE_Settings
258
259 (% style="color:blue" %)** SMOD:**
260
261 (% style="color:red" %)** 1 :** (%%) GPS ONLY
262
263 (% style="color:red" %)** 2 :** (%%) BLE ONLY
264
265 (% style="color:red" %)** 3 :**  (%%) GPS/BLE Hybrid
266
267
268 (% style="color:blue" %)** GPS_MOD: Define how to send GPS payload**
269
270 (% style="color:red" %)** 0 : ** (%%) Enable uploading on-board Temperature and humidity values
271
272 (% style="color:red" %)** 1 :** (%%) Disable uploading on-board Temperature and humidity values
273
274
275 (% style="color:blue" %)** BLE_Settings:**
276
277 (% style="color:red" %)** 1: ** (%%) BLE Positioning with Strongest iBeacon
278
279 (% _mstmutation="1" style="color:red" %)** 2:**  (%%)WiFi Positioning with Strongest WiFi SSID(% _mstmutation="1" style="color:blue" %)(V1.4.1 Version support this function later)(%%)  
280
281
282 (% style="color:#037691" %)**Status Field (total 1 byte)**(%%):  0x02
283
284 (% border="1.5" style="background-color:#ffffcc; color:green; width:412.222px" %)
285 |=(% scope="row" style="width: 75px;" %)**Size(bit)**|(% style="width:68px" %)5 Bits|(% style="width:87px" %)1 Bit|(% style="width:49px" %)1 Bit|(% style="width:126px" %)1 Bit
286 |=(% style="width: 75px;" %)**Value**|(% style="width:68px" %)Reserve|(% style="width:87px" %)[[PNACKMD>>||anchor="H2.4.4A0UplinkFPORT3D42CHistoryGNSSPositioning"]]|(% style="width:49px" %)[[LON>>||anchor="H3.2.5Disable2FEnableLEDflash"]]|(% style="width:126px" %)[[Transport Mode>>||anchor="H2.9TransportMode"]]
287
288
289 === 2.4.2 Uplink FPORT~=2, Realtime GNSS Positioning + Temperature & Humidity ===
290
291
292 Users can use **AT+SMOD=1,0,0** to enable uploading on-board Temperature and humidity values, and the total payload will be 15 bytes,
293
294
295 (% border="1.2" cellspacing="3" style="background-color:#ffffcc; color:green; width:320px" %)
296 |=(% scope="row" style="width: 60px;" %)(((
297 **Size(bytes)**
298 )))|(% style="width:50px" %)4|(% style="width:50px" %)4|(% style="width:70px" %)2|(% style="width:30px" %)1|(% style="width:30px" %)(((
299 2
300 )))|(% style="width:30px" %)(((
301 2
302 )))
303 |=(% style="width: 69px;" %)**Value**|(% style="width:76px" %)[[Latitude>>||anchor="HLocationinfo:"]]|(% style="width:87px" %)[[Longitude>>||anchor="HLocationinfo:"]]|(% style="width:76px" %)(((
304 [[Alarm & BAT>>||anchor="HAlarm26BAT:"]]
305 )))|(% style="width:73px" %)[[FLAG>>||anchor="HFLAG:"]]|(% style="width:40px" %)[[Hum>>||anchor="HHum:"]]|(% style="width:87px" %)[[Tem>>||anchor="HTem:"]]
306
307 [[image:1665301636888-168.png||_mstalt="298012"]]
308
309
310 ==== (% style="color:blue" %)**Alarm & BAT:**(%%) ====
311
312 (% border="1.2" cellspacing="3" style="background-color:#ffffcc; color:green; width:279.222px" %)
313 |=(% scope="row" style="width: 50px;" %)**Size(bit)**|(% style="width:50px" %)1 bit|(% style="width:69px" %)1 bit|(% style="width:63px" %)14 bits
314 |=(% style="width: 72px;" %)**Value**|(% style="width:67px" %)reserve|(% style="width:69px" %)Alarm Indicate|(% style="width:63px" %)[[BAT>>||anchor="HBAT:"]] 
315
316 ==== (% style="color:blue" %)**FLAG:**(%%) ====
317
318 (% border="1.2" cellspacing="3" style="background-color:#ffffcc; color:green; width:183.222px" %)
319 |=(% scope="row" style="width: 50px;" %)**Size(bit)**|(% style="width:30px" %)2 bits|(% style="width:52px" %)1 bit
320 |=(% style="width: 79px;" %)**Value**|(% style="width:55px" %)[[MOD>>||anchor="H3.2.7SetPositioningMode"]]|(% style="width:52px" %)[[LON>>||anchor="HLON:"]]
321
322 **Example:** Payload: 0x02863D68 FAC29BAF 4B45 60 0202 011A 
323
324
325 ==== (% style="color:blue" %)**Location info:**(%%) ====
326
327 * Latitude: 02863D68  ⇒  //if (0x//02863D68//& 0x80000000 = 0 )~://  //value = 02863D68 /1000000 = 42.351976//
328 * Longitude: FAC29BAF  ⇒ //if (0x//FAC29BAF// & 0x80000000 = 1 )~://  //value = (0x//FAC29BAF// – 0x 100000000)/1000000 =//-87.9094//57//
329
330 (% style="color:red" %)**Important note:**
331
332 1.  When power is low (<2.84v), GPS won't be able to get location info and GPS feature will be disabled and the location field will be filled with 0x0FFFFFFF, 0x0FFFFFFF.
333
334 2.  In this mode, the total payload will be 15 bytes, while US915/AU915 DR0 accepts only 11 bytes payload. In this case, the payload on server will be ignore and shows as below:
335
336
337 [[image:1664502116362-706.png||_mstalt="293306"]]
338
339
340 3.  While GPS can't get location info after timeout(FTIME Parameter), the latitude and longitude will be filled with all 0x00:
341
342 [[image:1664502166010-515.png||_mstalt="291395"]]
343
344
345
346 ==== (% style="color:blue" %)**Alarm:**(%%) ====
347
348 **Example: ** 0x4B & 0x40 >> 6 = 0x01
349
350
351 ==== (% style="color:blue" %)**BAT:**(%%) ====
352
353 **Example: ** 0x4B45 & 0x3FFF ⇒ 2885 (mV).
354
355 (((
356 The battery info shows the battery voltage, User can use the below mapping to indicate the battery in percentage: \
357 )))
358
359 * > 4.0v :  80% ~~ 100%
360 * 3.85v ~~3.99v:  60% ~~ 80%
361 * 3.70v ~~ 3.84v:  40% ~~ 60%
362 * 3.40v ~~ 3.69v:  20% ~~ 40%
363 * < 3.39v:  0~~20%
364
365 (% style="display:none" %) (%%)
366
367
368 ==== (% style="color:blue" %)**MOD:**(%%) ====
369
370 **Example: ** (0x60>>6) & 0x3f =1
371
372 **Set the format of GPS data uplink link:**
373
374 (% style="color:#037691" %)**0x00:** (%%) Enable uploading on-board Temperature and humidity values
375 (% style="color:#037691" %)**0x01: ** (%%) Disable uploading on-board Temperature and humidity values
376
377
378 **Set the format of BLE data uplink link:**
379
380 (% style="color:#037691" %)**0x01: ** (%%) BLE Positioning with Strongest iBeacon
381
382
383 ==== (% style="color:blue" %)**LON:**(%%) ====
384
385 **Example:** (0x60>>5) & 0x01=1.
386
387 Enable/Disable LED activity for uplink
388
389 (((
390 (% style="color:#037691" %)**0x00:**  (%%) Disable LED indicator.
391 )))
392
393 (((
394 (% style="color:#037691" %)**0x01:**  (%%) Enable LED indicator (Default Value)
395 )))
396
397
398 ==== (% style="color:blue" %)**Hum:**(%%) ====
399
400 0202 = //if (0x0202 & 0x8000 = 0 ):  value =// 0x0202 / 100 = +514 ⇒ 51.4 degree
401
402
403 ==== (% style="color:blue" %)**Tem:**(%%) ====
404
405 011A =if (0x011A & 0x8000 = 1 ):  value =( 0x011A - 0x10000)/10(dec) ⇒ -//28.2 degree//
406
407
408 === 2.4.3  Uplink FPORT~=3, Realtime GNSS Positioning (Default Mode) ===
409
410
411 The default uplink payload includes total 11 bytes (**AT+SMOD=1,1,0**). The payload is the first 11 bytes of Uplink FPORT=2, real-time GNSS positioning, (remove the temp and humidity)
412
413
414 (% border="1.2" cellspacing="3" style="background-color:#ffffcc; color:green; width:300px" %)
415 |=(% scope="row" style="width: 60px;" %)(((
416 **Size(bytes)**
417 )))|(% style="width:60px" %)4|(% style="width:60px" %)4|(% style="width:60px" %)2|(% style="width:50px" %)1
418 |=(% style="width: 69px;" %)**Value**|(% style="width:76px" %)[[Latitude>>||anchor="HLocationinfo:"]]|(% style="width:87px" %)[[Longitude>>||anchor="HLocationinfo:"]]|(% style="width:76px" %)(((
419 [[Alarm & BAT>>||anchor="HAlarm26BAT:"]]
420 )))|(% style="width:73px" %)[[FLAG>>||anchor="HFLAG:"]]
421
422 (% class="wikigeneratedid" %)
423 [[image:1665301687277-443.png||_mstalt="296140"]]
424
425
426 === 2.4.4  Uplink FPORT~=4, History GNSS Positioning ===
427
428
429 Set [[PNACKMD=1>>||anchor="H3.2.11A0AutoSendNone-ACKmessages"]], and TrackerD will wait for ACK for every uplink, when there is no LoRaWAN network, TrackerD will mark these records with non-ack messages and store the sensor data, and it will send all messages (10s interval) after the network recovery.
430
431
432 (% style="color:red" %)**Note for this mode:**
433
434 * a) TrackerD will do an ACK check for data records sending to make sure every data arrive server.
435 * b) TrackerD will send data in CONFIRMED Mode when PNACKMD=1 and CFM=1, but TrackerD won't re-transmit the packet if it doesn't get ACK, it will just mark it as a NONE-ACK message. In a future uplink, if TrackerD gets an ACK, TrackerD will consider there is a network connection and resend all NONE-ACK Messages.
436 * c) the total payload will be 15 bytes, while US915/AU915 DR0 accepts only 11 bytes of payload. In this case (DR0 of US915/AU915), the payload on server will show NULL
437
438 The payload is 15 bytes, as below.
439
440 (% border="1.5" style="background-color:#ffffcc; color:green; width:500px" %)
441 |=(% scope="row" %)(((
442 **Size(bytes)**
443 )))|4|4|2|1|1|1|1|1
444 |=**Value**|Latitude|Longitude|Year|Month|Day|Hous|Min|Sen
445
446 [[image:image-20221009160309-2.png||_mstalt="429312"]]
447
448
449 === 2.4.5  Uplink FPORT~=6, BLE Positioning with Strongest iBeacon ===
450
451
452 TrackerD supports BLE scans for indoor positioning. User can set [[**SMOD**>>||anchor="H3.2.7SetPositioningMode"]] to **BLE pure** or **GPS/BLE hybrid** so TrackerD will scan BLE iBeacon and find the strongest iBeacon info and uplink.
453
454 User can set **[[BLEMASK>>||anchor="H3.2.11A0SetBLEMASKtofilterBLEiBeacon"]]** so TrackerD will only search the iBeacons which have UUID that match the BLEMASK settings.
455
456
457 (% border="1.5" cellspacing="3" style="background-color:#ffffcc; color:green; width:450px" %)
458 |=(% scope="row" style="width: 60px;" %)(((
459 **Size(bytes)**
460 )))|(% style="width:30px" %)16|(% style="width:50px" %)4|(% style="width:50px" %)4|(% style="width:120px" %)2|(% style="width:50px" %)4|(% style="width:50px" %)2|(% style="width:30px" %)1
461 |=(% style="width: 50px;" %)**Value**|(% style="width:44px" %)[[UUID>>||anchor="HLocationinfo:"]]|(% style="width:61px" %)(((
462 iBeacon MAJOR
463 )))|(% style="width:63px" %)(((
464 iBeacon MINOR
465 )))|(% style="width:71px" %)(((
466 iBeacon Measured Power
467 )))|(% style="width:50px" %)(((
468 iBeacon RSSI
469 )))|(% style="width:47px" %)(((
470 [[Alarm & BAT>>||anchor="HAlarm26BAT:"]]
471 )))|(% style="width:15px" %)[[FLAG>>||anchor="HFLAG:"]]
472
473 [[image:1664502425687-834.png||_mstalt="296738"]]
474
475
476 * (% style="color:#037691" %)**BAT: ** (%%) Ex1:0x4B45 & 0x3FFF ⇒ 3901 (mV).
477 * (% style="color:#037691" %)**MODE:   **(%%)Define the payload format.
478 * (% style="color:#037691" %)**UUID:     **(%%)The uuid from the strongest iBeacon.
479 * (% style="color:#037691" %)**MAJOR:** (%%) The MAJOR from the strongest iBeacon.
480 * (% style="color:#037691" %)**MINOR:**  (%%)The MINOR from the strongest iBeacon.
481 * (% style="color:#037691" %)**Measured Power: ** (%%) The Measured Power from the strongest iBeacon.
482 * (% style="color:#037691" %)**RSSI:  ** (%%) The RSSI from the strongest iBeacon.
483
484 (% style="display:none" %) (%%)
485
486 === 2.4.6  Uplink FPORT~=7, Alarm information status(Since firmware 1.4.4) ===
487
488 The upward link device is configured to FPORT = 7. Once Trackerd alarm, it will upload the news to the server.
489
490 (% border="1.5" cellspacing="3" style="background-color:#ffffcc; color:green; width:450px" %)
491 |**Size(bytes)**|2|1
492 |**Value**|[[Alarm & BAT>>path:#HAlarm26BAT:]]|Mod+lon
493
494  [[image:image-20230302145315-1.png]]
495
496 alarm=(bytes[0] & 0x40) ~/~/Alarm status
497
498 batV=~(~(~(bytes[0] & 0x3f) <<8) | bytes[1])/1000;~/~/Battery,units:V
499
500 mod = bytes[2] & 0xC0;
501
502 Lon=(bytes[2] & 0x20)
503
504
505 === 2.4.7  Uplink FPORT~=8, WiFi Positioning with Strongest WiFi SSID(Since firmware 1.4.1) ===
506
507
508 TrackerD supports WiFi scans for indoor positioning. User can set [[**SMOD**>>||anchor="H3.2.7SetPositioningMode"]] to **WiFi** so TrackerD will scan WiFi and find the strongest WiFi info and uplink.
509
510
511 (% border="1.2" cellspacing="3" style="background-color:#ffffcc; color:green; width:371.222px" %)
512 |=(% scope="row" style="width: 60px;" %)(((
513 **Size(bytes)**
514 )))|(% style="width:60px" %)6|(% style="width:60px" %)4|(% style="width:79px" %)2|(% style="width:66px" %)1
515 |=(% style="width: 69px;" %)**Value**|(% style="width:76px" %)SSID|(% style="width:87px" %)RSSI|(% style="width:79px" %)(((
516 [[Alarm & BAT>>||anchor="HAlarm26BAT:"]]
517 )))|(% style="width:66px" %)[[FLAG>>||anchor="HFLAG:"]]
518
519 (% class="wikigeneratedid" %)
520 [[image:1667288597595-714.png||_mstalt="299598" height="212" width="1151"]]
521
522
523 * (% style="color:#037691" %)**BAT: ** (%%) Ex1:0x4B45 & 0x3FFF ⇒ 3901 (mV).
524 * (% style="color:#037691" %)**SSID:      **(%%)WiFi name.
525 * (% style="color:#037691" %)**RSSI:      **(%%)The RSSI from the strongest WiFi.
526
527 (% style="display:none" %) (%%)
528
529
530 === 2.4.8  Add Payload format in TTN V3 ===
531
532
533 In TTN V3, user can add a custom payload so it shows friendly.
534
535 In the page (% style="color:#037691" %)**Applications ~-~-> Payload Formats ~-~-> Custom ~-~-> decoder**
536
537
538 [[image:1664502649601-895.png||_mstalt="296985"]]
539
540
541
542 Add the decoder from this link: 
543
544 [[https:~~/~~/github.com/dragino/dragino-end-node-decoder/tree/main/TrackerD>>https://github.com/dragino/dragino-end-node-decoder/tree/main/TrackerD]]
545
546 Save the change the uplink message will be parsed. As below:
547
548 [[image:1664502676891-606.png||_mstalt="296673"]]
549
550
551 == 2.5 Integrate with Datacake ==
552
553
554 After TrackerD sends data to LoRaWAN server such as TTN, use can pass the data to Datacake and plot out, currently only support GPS plot.
555
556 Instruction is here:  [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/Notes%20for%20Data%20Cake/#H7.Example~~-~~-AddTrackerDGPSTrackingInDataCake>>url:http://wiki.dragino.com/xwiki/bin/view/Main/Notes%20for%20Data%20Cake/#H7.Example--AddTrackerDGPSTrackingInDataCake]]
557
558
559 [[image:1664502695771-538.png||_mstalt="297349"]]
560
561
562 == 2.6 Integrate with Tago ==
563
564
565 After TrackerD sends data to LoRaWAN server such as TTN, user can pass the data to Datacake and plot out, currently only support GPS plot.
566
567 Instruction is here: [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/Tago.IO/#H3.A0Example-CreateTrackerD2FLGT92positioningwidget>>url:http://wiki.dragino.com/xwiki/bin/view/Main/Tago.IO/#H3.A0Example-CreateTrackerD2FLGT92positioningwidget]]
568
569
570 [[image:1664502715371-321.png||_mstalt="292162"]]
571
572
573 == 2.7  Datalog Feature ==
574
575
576 total 273 entries,by default,
577
578 User can set [[PNACKMD=1>>||anchor="H3.2.11A0AutoSendNone-ACKmessages"]], to enable Datalog feature.
579
580 Example use case.
581
582 [[image:image-20221009234703-2.png||_mstalt="429143" height="328" width="899"]]
583
584
585 [[image:image-20221009234629-1.png||_mstalt="431145" height="390" width="577"]]
586
587
588 == 2.8 Alarm Mode ==
589
590
591 (((
592 User can push the (% style="color:red" %)**RED button**(%%) by more than 5 seconds to enter Alarm Mode.
593 )))
594
595
596 (((
597 Once enter Alarm mode, the (% style="color:green" %)**GREEN LED**(%%) will flash 3 times, the buzzer will alarm for 5 seconds, then TrackerD will immediately send a packet without location info and then send a data packet with GPS positioning information. After that, the device will send 60 packets at 1-minute intervals. The Alarm flag in the payload will be set for the next 60 packets unless exits alert mode.
598 )))
599
600
601 (((
602 **Two ways to exit alarm mode:**
603 )))
604
605 * Server sends a downlink command to exit.
606 * User fast press the RED button 10 times.
607
608 (((
609 When exit alarm mode, (% style="color:red" %)**RED LED**(%%) will light up for 5 seconds, indicating that the alarm mode is exited. And the alert flag will be set to false.
610 )))
611
612
613 == 2.9 Transport Mode ==
614
615
616 In Transport Mode, TrackerD will check if there is motion. If there is no motion, device will send uplinks every 20 minutes. If there is motion, device will send uplink every 5 minutes.
617
618 * **[[MTDC>>||anchor="H3.2.3SetTransportModePackettransmissioninterval"]]** defines the Uplink Interval during transportation.
619 * **[[TDC>>||anchor="H3.2.1SetTransmitInterval"]]** defines the uplink interval when TrackerD is stactic.
620 * **[[PT>>||anchor="H3.2.16GetorSetThresholdformotiondetectFF08Sincefirmware1.4.3FF09"]]** defines the threldhold to detect a motion.
621
622 (% style="display:none" %) (%%)
623
624
625 == 2.10 LED Status ==
626
627
628 (% border="1.5" style="background-color:#ffffcc; width:500px" %)
629 |=(% style="width: 150px;" %)**Event**|=(% style="width: 200px;" %)**Action**|=(% style="width: 150px;" %)**AT+LON to control on/off**
630 |(% style="width:157px" %)**Power On**|(% style="width:271px" %)(% style="color:blue" %)**BLUE, **(% style="color:red" %)**RED , **(% style="color:green" %)**Green** flash once|(% style="width:202px" %)N/A
631 |(% style="width:157px" %)**Join request**|(% style="width:271px" %)(% style="color:green" %)**Green** (%%)led fast blink once (200ms)|(% style="width:202px" %)Yes
632 |(% style="width:157px" %)**Join Success**|(% style="width:271px" %)(% style="color:green" %)**Green**(%%) led on 5 second|(% style="width:202px" %)N/A
633 |(% style="width:157px" %)**Fixing Location**|(% style="width:271px" %)(% style="color:blue" %)**BLUE **(%%)blinks 200ms per second|(% style="width:202px" %)Yes
634 |(% style="width:157px" %)**Fixed and uplink**|(% style="width:271px" %)(% style="color:green" %)**GREEN **(%%)blinks twice (200ms per blink)|(% style="width:202px" %)Yes
635 |(% style="width:157px" %)**Fail Fix and uplink**|(% style="width:271px" %)(% style="color:red" %)**RED **(%%)blinks twice (200ms per blink)|(% style="width:202px" %)Yes
636 |(% style="width:157px" %)**Enter Alarm mode**|(% style="width:271px" %)(% style="color:red" %)**RED **(%%)on for 3 seconds|(% style="width:202px" %)Yes
637 |(% style="width:157px" %)**Uplink under Alarm**|(% style="width:271px" %)(% style="color:red" %)**RED **(%%)on for 1 second|(% style="width:202px" %)Yes
638 |(% style="width:157px" %)**Exit Alarm**|(% style="width:271px" %)(% style="color:blue" %)**BLUE **(%%)led on 5 second|(% style="width:202px" %)Yes
639 |(% style="width:157px" %)**Get Downlink**|(% style="width:271px" %)(% style="color:green" %)**GREEN**(%%) led on 1 second|(% style="width:202px" %)Yes
640 |(% style="width:157px" %)**Movement Detect**|(% style="width:271px" %)(% style="color:red" %)**RED **(%%)led on 500ms|(% style="width:202px" %)N/A
641
642 (% style="display:none" %) (%%)
643
644
645 == 2.11 Button Function ==
646
647
648 (% style="color:blue" %)**RESET button:**
649
650 [[image:1664502835802-546.png||_mstalt="295061"]]
651
652 Push this button will reboot the device. Device will exit alarm mode and re-join to LoRaWAN server.
653
654
655 (% style="color:red" %)**RED button:**
656
657 [[image:image-20230213110506-3.png]](% style="display:none" %)
658
659 (% style="display:none" %) (%%)
660
661 (% border="1" style="background-color:#ffffcc; width:510px" %)
662 |=(% style="width: 100px;" %)**Function**|=(% style="width: 205px;" %)**Action**|=(% style="width: 205px;" %)**Description**
663 |(% style="width:135px" %)Send Alarm|(% style="width:220px" %)Keep Pressing (% style="color:red" %)**RED**(%%) button for more than 5 seconds|(% style="width:265px" %)Enter Alarm Mode.  See [[Alarm Mode>>||anchor="H2.8AlarmMode"]]
664 |(% style="width:135px" %)Exit Alarm Mode|(% style="width:220px" %)Fast press the (% style="color:red" %)**RED** (%%)button 10 times|(% style="width:265px" %)Exit Alarm Mode
665 |(% style="width:135px" %)Enter Deep Sleep Mode|(% style="width:220px" %)Press and hold the button for 10 seconds, then quickly press the device 3 times to enter deep sleep|(% style="width:265px" %)This is the mode ship out from factory. CPU will be complete in sleep mode and no LoRa activity, only use before deploy.
666
667 (% style="display:none" %) (%%)
668
669
670 == 2.12 USB Port Function ==
671
672
673 The USB interface of TrackerD has below functions:
674
675 * Power on the device
676 * Recharge the battery
677 * [[Configure Device>>||anchor="H3.ConfigureTrackerDviaATcommandorLoRaWANdownlink"]]
678 * [[Upgrade Firmware>>||anchor="H5.UploadFirmware"]]
679
680 (% style="display:none" %) (%%)
681
682
683 = 3. Configure TrackerD via AT command or LoRaWAN downlink =
684
685
686 User can configure TrackerD via AT Command or LoRaWAN Downlink.
687
688 LoRaWAN Downlink instruction for different platforms:  [[IoT LoRaWAN Server>>doc:Main.WebHome]]
689
690
691 == 3.1 Access AT Command ==
692
693
694 TrackerD supports the AT command set in stock firmware. User can connect to TrackerD with TYPE-C cable to use AT commands as shown below.
695
696
697 [[image:1664502999401-486.png||_mstalt="296985"]]
698
699
700 In PC, User needs to set serial tool baud rate to (% style="color:green" %)**115200**(%%) to access serial console for TrackerD. TrackerD will output system info once power on and user will be able to send AT commands:
701
702
703 [[image:1664503022490-662.png||_mstalt="293332"]]
704
705
706 [[image:1664503035713-500.png||_mstalt="291096"]]
707
708
709 [[image:1664503047675-651.png||_mstalt="295386"]]
710
711 (% style="display:none" %) (%%)
712
713 == 3.2 Command Set ==
714
715 === 3.2.1 Set Transmit Interval ===
716
717
718 Set device uplink interval.
719
720 * (% style="color:blue" %)**AT Command:**
721
722 (% style="color:#037691" %)**AT+TDC=xxx **
723
724 Example:  AT+TDC=300000. Means set interval to 5 minutes(300 seconds)
725
726
727 * (% style="color:blue" %)**Downlink Payload (prefix 0x01):**
728
729 (% style="color:#037691" %)**0x01 00 01 2C**  (%%) ~/~/  Same as AT+TDC=300000
730
731
732 === 3.2.2 Set Alarm Packet transmission interval ===
733
734
735 Set alarm packet transmit interval
736
737 * (% style="color:blue" %)**AT Command:**
738
739 (% style="color:#037691" %)**AT+ATDC=xx. **
740
741 Example:  AT+ATDC=60000  **~-~->    ** Set Alarm Packet Interval to 60 seconds. TrackerD will send every 60 seconds in Alarm mode, Default Value: 60000
742
743
744 * (% style="color:blue" %)**Downlink Payload (prefix 0xB1):**
745
746 (% style="color:#037691" %)**0xB1 00 00 3C ** (%%) ~/~/  Same as AT+ATDC=60000
747
748
749 === 3.2.3 Set Transport Mode Packet transmission interval ===
750
751
752 Set Transport Mode packet transmit interval
753
754 * (% style="color:blue" %)**AT Command:**
755
756 (% style="color:#037691" %)**AT+MTDC=xx. **
757
758 Example:  AT+MTDC=300000  **~-~->    ** Set Transport Mode Packet Interval to 300 seconds. TrackerD will send every 300 seconds in Transport mode, Default Value: 300000
759
760
761 * (% style="color:blue" %)**Downlink Payload (prefix 0x03):**
762
763 (% style="color:#037691" %)**0x03 00 01 2C**  (%%) ~/~/  Same as AT+MTDC=3000000
764
765
766 === 3.2.4 Exit Alarm ===
767
768
769 Server send downlink command to exit Alarm mode
770
771 * (% style="color:blue" %)**AT Command: No AT Command**
772
773 * (% style="color:blue" %)**Downlink Payload (prefix 0x02):**
774
775 (% style="color:#037691" %)**0x02 01**    (%%) ~/~/  Exit Alarm Mode
776
777
778 === 3.2.5 Disable/Enable LED flash and buzzer ===
779
780
781 Disable/Enable LED for position, downlink and uplink
782
783 * (% style="color:blue" %)**AT Command:**
784
785 (% style="color:#037691" %)**AT+LON=xx.  (Disable (0), Enable (1), default:1)**
786
787 Example: AT+LON=0  **~-~-> ** Disable LED for position, downlink and uplink.
788
789
790 * (% style="color:blue" %)**Downlink Payload (prefix 0xAE):**
791
792 (% style="color:#037691" %)**0xAE 00 ** (%%) ~/~/  Same as AT+LON=0
793
794
795 === 3.2.6 Disable/Enable Transport Mode ===
796
797
798 Users can use this feature to enable/disable Transport Mode.
799
800 * (% style="color:blue" %)**AT Command:**
801
802 (% style="color:#037691" %)**AT+INTWK=xx.  (Disable (0), Enable (1), default:0)**
803
804 Example:  AT+INTWK=1  **~-~->   ** Enable Transport Mode.
805
806
807 * (% style="color:blue" %)**Downlink Payload (prefix 0xAF):**
808
809 (% style="color:#037691" %)**0xAF 01 ** (%%) ~/~/  Same as AT+INTWK=1
810
811
812 === 3.2.7 Set Positioning Mode ===
813
814
815 SMOD define how TrackerD scan and uplink data:
816
817
818 * (% style="color:blue" %)**AT Command:**
819
820 (% style="color:#037691" %)**AT+SMOD=aa,bb,cc**
821
822 (% style="color:#037691" %)** aa:**
823
824 * (% style="color:red" %)**1: GPS ONLY(Factory Settings):    **(%%)Only get and uplink GPS location info.
825
826 * (% style="color:red" %)**2: BLE or WiFi ONLY:                     **(%%)Only obtain iBeacon info via BLE and uplink  or obtain WiFi ssid info via WiFi and uplink. Design for Indoor tracking.
827
828 * (% style="color:red" %)**3: GPS/BLE Hybrid:                       **(%%)Combination for Indoor and Outdoor tracking.Devices will try to search BLE iBeacon first. If device can't find the iBeacon, it will use GPS for positioning.
829
830 (% style="color:#037691" %)**bb:**
831
832 * (% style="color:red" %)**0 :  **(%%)GPS+ BAT+ State+Tem&Hum
833
834 * (% style="color:red" %)**1 :**(%%)  GPS +BAT State
835
836 (% style="color:#037691" %)**cc:   **
837
838 * (% _mstmutation="1" style="color:red" %)**1 : **(%%) (iBeacon)UUID+ Major + Minor+Power+Rssi+BAT+State 
839
840 * (% _mstmutation="1" style="color:red" %)**2 : **(%%) (WiFi)SSID+Rssi+BAT+State ((% _mstmutation="1" style="color:#037691" %)V1.4.1 Version support this function later(%%))  
841
842 (% style="color:blue" %)**Example:**
843
844 AT+SMOD=1,0,0 ~-~->  GPS+ BAT+ State+Tem&Hum
845
846 AT+SMOD=1,1,0 ~-~->  GPS +BAT State
847
848 AT+SMOD=2,0,1 ~-~->  (iBeacon)UUID+ Major + Minor+Power+Rssi+BAT+State
849
850 AT+SMOD=2,0,2 ~-~->  (WiFi)SSID+Rssi+BAT+State
851
852
853 * (% style="color:blue" %)**Downlink Payload (prefix 0xA5):**
854
855 (% style="color:#037691" %)**0xA5 01 00 00**    (%%) ~/~/  Same as AT+SMOD=1,0,0
856
857
858 === 3.2.8 Set MAX GPS position time ===
859
860
861 Set max positioning time, default is 150 seconds. TrackerD will try to get location info within this period. If fail to get position data within this time, TrackerD will use 000000 for latitude and longitude.
862
863
864 If **AT+FTIME=0**. The GPS module will be always powered and positioning. This will highly increase the power consumption (up to 50mA). When AT+FTIME=0, it will improve fix accuracy and shorten the acquire time for next uplink.
865
866
867 * (% style="color:blue" %)**AT Command:**
868
869 (% style="color:#037691" %)**AT+FTIME=xx**  (%%) **~-~-> ** Set to use xx as max fix time.
870
871 **Example:**  AT+FTIME=150
872
873
874 * (% style="color:blue" %)**Downlink Payload (prefix 0xAA):**
875
876 (% style="color:#037691" %)**0xAA 00 96 ** (%%) ~/~/  Set AT+FTIME=150
877
878
879 === 3.2.9 Set PDOP value for GPS fix accuracy ===
880
881
882 PDOP(Position Dilution of Precision) filter, TrackerD will only accept GPS data with a lower PDOP value than pre-configure PDOP value. If device can't get a valid GPS packet within FTIME timeout, it will use the GPS data with lowest PDOP value to server.
883
884
885 A GPS packet with lower PDOP has higher accuracy. PDOP default value is 2.0
886
887
888 * (% style="color:blue" %)**AT Command:**
889
890 (% style="color:#037691" %)**AT+PDOP=2.5 ** (%%) **~-~->  ** Set PDOP to 2.5
891
892
893 * (% style="color:blue" %)**Downlink Payload (prefix 0xAD):**
894
895 (% style="color:#037691" %)**0xAD 00 0A**   (%%) ~/~/  Set AT+PDOP=1  (0x0A / 10 =1)
896
897 (% style="color:#037691" %)**0xAD 00 19**   (%%) ~/~/  Set AT+PDOP=2.5    (0x19 / 10 =2.5)
898
899 (% style="color:#037691" %)**0xAD 00 46**    (%%) ~/~/  Set AT+PDOP=7  (0x46 / 10 =7)
900
901
902 === 3.2.10 Disable/Enable the confirmation mode ===
903
904
905 * (% style="color:blue" %)**AT Command:**
906
907 (% style="color:#037691" %)**AT+CFM=xx**
908
909
910 **~ Example:**
911
912 AT+CFM=0    **~-~->   ** Disable confirmation
913
914 AT+CFM=1    **~-~->  ** Enable confirmation
915
916
917 * (% style="color:blue" %)**Downlink Payload (prefix 0x05):**
918
919 (% style="color:#037691" %)**0x05 01 **(%%) ~/~/  Same as AT+CFM=1
920
921
922 === 3.2.11  Auto Send None-ACK messages ===
923
924
925 TrackerD will wait for ACK for each uplink, If TrackerD doesn't get ACK from the IoT server, it will consider the message doesn't arrive server and store it. TrackerD keeps sending messages in normal periodically. Once TrackerD gets ACK from a server, it will consider the network is ok and start to send the not-arrive message.
926
927
928 * (% style="color:blue" %)**AT Command: AT+PNACKMD**
929
930 The default factory setting is 0.
931
932
933 **Command Example Function Response:**
934
935 (% style="color:#037691" %)**AT+PNACKMD=1**  (%%) ~/~/  Poll None-ACK message OK
936
937
938 * (% style="color:blue" %)**Downlink Command: 0x34**
939
940 Example: 0x34 01  ~/~/  Same as AT+PNACKMD=1
941
942
943 === 3.2.12  Set BLEMASK to filter BLE iBeacon ===
944
945
946 BLEMASK is to filter the unwanted BLE iBeacons during scan. For example, if BLEMASK is 123456. TrackerD will only uplink UUID info which includes 123456. It will ignore all other iBeacons which doesn’t contact 123456 in the UUID.
947
948 (% style="color:red" %)**Note: BLEMASK range is 6 ~~ 10 bytes. If AT+BLEMASK < 6 bytes, BLEMASK will be disabled.**
949
950 (% style="color:blue" %)**AT Command:**
951
952 (% _mstmutation="1" style="color:#037691" %)**AT+BLEMASK=123456**   (%%) ~/~/ Set BLEMASK = 123456
953
954 (% _mstmutation="1" style="color:#037691" %)**AT+BLEMASK=0**  (%%) ~/~/ disable BLEMASK
955
956 (% style="color:blue" %)**Downlink Payload: (Prefix : 0xB2)(Since firmware 1.4.1)**
957
958 Example: 0xB2 01 02 03 04 05 06    ~/~/ Set BLEMASK to 123456
959
960
961 === 3.2.13  Set WiFIMASK to filter WiFi SSID(Since firmware 1.4.1) ===
962
963
964 WiFiMASK is to filter the unwanted WiFi SSID during scan. For example, if WiFiMASK is 123456. TrackerD will only uplink SSID info which includes 123456 as prefix. It will ignore all other WiFi which doesn’t contact 123456 in the SSID.
965
966 (% style="color:red" %)**Note: WiFiMASK range is 6 ~~ 10 bytes. If AT+ WiFiMASK < 6 bytes, WiFiMASK will be disabled.**
967
968 (% style="color:blue" %)**AT Command:**
969
970 (% _mstmutation="1" style="color:#037691" %)**AT+WiFiMASK=123456**    (%%) ~/~/ Set WiFiMASK = 123456
971
972 (% _mstmutation="1" style="color:#037691" %)**AT+WiFiMASK=0**       (%%) ~/~/ disable WiFiMASK
973
974 (% style="color:blue" %)**Downlink Payload: (Prefix : 0xB3)(Since firmware 1.4.1)**
975
976 Example: 0xB3 01 02 03 04 05 06    ~/~/ Set WiFiMASK to 123456
977
978
979 === 3.2.14  Disable/Enable Information printing(Since firmware 1.4.1) ===
980
981
982 Users can use this feature to enable/disable Information printing.
983
984 (% style="color:blue" %)**AT Command:**
985
986 (% style="color:#037691" %)**AT+SHOWID=XX         **(%%) ~/~/  (Disable (0), Enable (1), default:0)
987 \\Example: AT+SHOWID=1 ~-~-> Enable Information printing.
988
989
990 === 3.2.15  Get or Set Eight Channels Mode, only for us915, AU915(Since firmware 1.4.1) ===
991
992
993 The Channels Mode in the LORAWAN LMIC library is from 0 ~~ 7. When CHE = 8, 72 channels will be accessible to the network.
994
995 (% style="color:blue" %)**AT Command:**
996
997 (% style="color:#037691" %)**AT+CHE=1      **(%%) ~/~/ set one channels mode
998
999
1000 (% style="color:blue" %)**Downlink Payload:0X24**
1001
1002 Example: 0x24 01  ~/~/ Same as AT+CHE=1
1003
1004
1005 === 3.2.16  Get or Set Threshold for motion detect(Since firmware 1.4.3) ===
1006
1007
1008 User can set the motion detect thredhold for transportation mode. The smaller the value, the more sensitivity to trigger a motion event.
1009
1010 (% style="color:blue" %)**AT Command:**
1011
1012 (% style="color:#037691" %)**AT+PT=xx**
1013
1014 Example:
1015
1016 AT+PT=14    ~-~->    Set to detect car motion.
1017
1018 AT+PT=41  ~-~->    set to detect walk motion.
1019
1020
1021 (% style="color:blue" %)**Downlink Payload:0xB4**(%%)
1022 0xB4 14          ~/~/  Same as AT+PT=14
1023
1024
1025 = 4. Setting for Different Scenarios =
1026
1027
1028
1029 = 5. Upload Firmware =
1030
1031 == 5.1 Firmware Change Log ==
1032
1033
1034 **[[See this link>>url:https://github.com/dragino/TrackerD]]**
1035
1036
1037 == 5.2 How to upgrade firmware ==
1038
1039
1040 User can use the TrackerD's USB port to upgrade firmware into it. The hardware connection for upgrade firmware is as below:
1041
1042
1043 (% style="color:blue" %)**Step1:  **(%%)Connect TrackerD and PC via USB cable shipped with TrackerD.
1044
1045
1046 (% style="color:blue" %)**Step2:** (%%) Install CH9102 driver in the PC.
1047
1048 After installation of the driver and plug in TrackerD, user should be able to see com port in PC's device manager.
1049
1050
1051 (% style="color:blue" %)**Step3:  **(%%)Download and Install Flash Tool:  [[https:~~/~~/www.espressif.com.cn/en/support/download/other-tools?keys=Flash%2BDownload%2BTools>>url:https://www.espressif.com.cn/en/support/download/other-tools?keys=Flash%2BDownload%2BTools]]
1052
1053
1054 (% style="color:blue" %)**Step4:** (%%) Run Flash Download Tool and configure chip type to ESP32
1055
1056
1057 [[image:1664503563660-578.png||_mstalt="296777"]]
1058
1059
1060 [[image:1664503574618-659.png||_mstalt="297986"]]
1061
1062
1063
1064 (% style="color:blue" %)**Step5:** (%%) Select the firmware file (.bin format), com port and proper SPI configure. Clink Start. Bin file location:
1065
1066 [[https:~~/~~/github.com/dragino/TrackerD/releases>>https://github.com/dragino/TrackerD/releases]]
1067
1068
1069 **Users need to use below files:**
1070
1071 boot_app0.bin @0e000
1072
1073 US915.bin @ 0x10000(Select the bin file of the frequency band you need)
1074
1075
1076 [[image:image-20221207120501-1.png]]
1077
1078
1079
1080 After upgrade finish, it will show finish as below:
1081
1082 [[image:image-20221207133911-7.png]]
1083
1084
1085 = 6. Developer Guide =
1086
1087 == 6.1 Compile Source Code ==
1088
1089 === 6.1.1 Set up ARDUINO compile environment ===
1090
1091
1092 * **Download the latest Arduino software (IDE) from the Arduino official website:  [[https:~~/~~/www.arduino.cc/en/Main/Software>>url:https://www.arduino.cc/en/Main/Software]]**
1093
1094 Install IDE on PC, open and click (% style="color:#037691" %)**File ~-~-> Preference**,(%%) add the following URL:  [[https:~~/~~/dl.espressif.com/dl/package_esp32_index.json>>url:https://links.jianshu.com/go?to=https%3A%2F%2Fdl.espressif.com%2Fdl%2Fpackage_esp32_index.json]]
1095
1096
1097 [[image:1664503635019-941.png||_mstalt="294658"]]
1098
1099
1100
1101 * (% style="color:#037691" %)**Go to tools ~-~-> Boards ~-~-> Boards Manager**,(%%) **find the esp32 information and install it.**
1102
1103 [[image:1664503715811-892.png||_mstalt="295698"]]
1104
1105
1106 === 6.1.2  Build the development environment ===
1107
1108
1109 **~1. Download and install arduino IDE**
1110
1111 [[https:~~/~~/www.arduino.cn/thread-5838-1-1.html>>url:https://links.jianshu.com/go?to=https%3A%2F%2Fwww.arduino.cn%2Fthread-5838-1-1.html]]
1112
1113
1114 **2. Download the ESP32 development package in the arduino IDE**
1115
1116 [[image:image-20221213100007-1.png]]
1117
1118
1119 Input: [[https:~~/~~/dl.espressif.com/dl/package_esp32_index.json>>https://dl.espressif.com/dl/package_esp32_index.json]]
1120
1121 [[image:image-20221213100626-2.png]]
1122
1123
1124 Restart the IDE after the addition is complete, then:
1125
1126 [[image:image-20221213100808-3.png||height="679" width="649"]]
1127
1128
1129 [[image:image-20221213101040-4.png]]
1130
1131
1132 (% style="color:red" %)**Note: Currently version 1.04 is almost impossible to download, you can choose version 1.03.
1133 Don't quit halfway.~~! If you quit halfway, there is a high probability that it will freeze, and you will need to download again next time. (If you click to continue downloading, an error will be reported after completion)**
1134
1135
1136 Then enter a long waiting process. If you don't want to wait, you can go to the Internet to download directly, and then import:
1137
1138 (% style="color:blue" %)**Methods as below:**
1139
1140 ~1. Download: [[https:~~/~~/github.com/dragino/TrackerD/releases/tag/v1.4.4>>https://github.com/dragino/TrackerD/releases/tag/v1.4.4]]
1141
1142 2. Find the arduino installation path, hardware → create a new espressif folder → create a new esp32 folder, unzip the compressed package here.
1143
1144 (% id="cke_bm_4554S" style="display:none" %) (%%)Find the path of SP32 installation, find the file as shown in Figure 1, and change the SPI pin to the shown in Figure 2.
1145
1146 [[image:image-20221213102311-5.png||height="582" width="711"]]
1147
1148
1149 **3. Find tools→get.exe in the decompressed file and run it (it will close automatically after completion)**
1150
1151 [[image:image-20221213102334-6.png]]
1152
1153 (% style="color:red" %)**Note: This step requires a python environment**
1154
1155
1156 Either way, in the end:
1157
1158 The final effect is to open the arduino and you can see the esp32
1159
1160 [[image:image-20221213110952-8.png||height="866" width="711"]]
1161
1162
1163
1164 [[image:image-20221024105643-1.png||_mstalt="428129"]]
1165
1166 **~ Figure1**
1167
1168
1169
1170 [[image:image-20221024105643-2.png||_mstalt="428493"]]
1171
1172 **Figure2**
1173
1174
1175 * **Download the latest TrackerD from the dragino github: [[https:~~/~~/github.com/dragino/TrackerD>>url:https://github.com/dragino/TrackerD]]**
1176
1177 Put the Library in the TrackerD directory into the libraries file in the Arduino directory:
1178
1179
1180 [[image:1664503752288-974.png||_mstalt="298194"]]
1181
1182
1183 == 6.2 Source Code ==
1184
1185
1186 * (% style="color:blue" %)**Open the example in the TrackerD file, please select the correct port in the IDE, as shown below:**
1187
1188 [[image:1664503794261-827.png||_mstalt="296387"]]
1189
1190
1191
1192 * (% style="color:blue" %)**Click to upload**
1193
1194 [[image:1664503808294-336.png||_mstalt="295711"]]
1195
1196
1197
1198 * (% style="color:blue" %)**Check the result, if the upload is successful, as shown below, open the serial port to view the data**
1199
1200 [[image:1664503824081-592.png||_mstalt="294918"]] [[image:1664503831430-500.png||_mstalt="290784"]]
1201
1202
1203 = 7.  FAQ =
1204
1205 == 7.1 How to change the LoRa Frequency Bands/Region? ==
1206
1207
1208 User can follow the introduction for [[how to upgrade image>>||anchor="H5.UploadFirmware"]]. When download the images, choose the required image file for download.
1209
1210
1211 == 7.2 What is the pin mapping for the USB program cable? ==
1212
1213
1214 [[image:1664499635206-262.png||_mstalt="295360"]]
1215
1216
1217
1218 (% border="1.5" cellspacing="3" style="background-color:#ffffcc; color:green; width:314px" %)
1219 |=(% style="width: 118px;" %)**Pin**|=(% style="width: 67px;" %)**Color**|=(% style="width: 123px;" %)**USB Pin**
1220 |(% style="width:118px" %)A4,B4,A9,B9|(% style="width:67px" %)Red|(% style="width:123px" %)VCC
1221 |(% style="width:118px" %)A7,B7|(% style="width:67px" %)White|(% style="width:123px" %)D- (N/A)
1222 |(% style="width:118px" %)A6,B6|(% style="width:67px" %)Green|(% style="width:123px" %)D+(N/A)
1223 |(% style="width:118px" %)A1,B1,A12,B12|(% style="width:67px" %)Black|(% style="width:123px" %)GND
1224 |(% style="width:118px" %)A5|(% style="width:67px" %)Purple|(% style="width:123px" %)MTDC/GOIO13
1225 |(% style="width:118px" %)B5|(% style="width:67px" %)Blue|(% style="width:123px" %)MTDC/GPIO12
1226 |(% style="width:118px" %)A8|(% style="width:67px" %)Yellow|(% style="width:123px" %)MTMS/GPIO14
1227 |(% style="width:118px" %)B8|(% style="width:67px" %)Grey|(% style="width:123px" %)MTDO/GPIO15
1228
1229 (% style="display:none" %) (%%)
1230
1231
1232 == 7.3 Notes on using different serial port tools for TrackerD ==
1233
1234 === 7.3.1  Serial port utility ===
1235
1236
1237 Serial port utility requires you to automatically add data streams.
1238
1239 Need to adjust the data stream to RTS/CTS on physical restart.
1240
1241 (% class="wikigeneratedid" %)
1242 [[image:image-20221102140621-1.png||_mstalt="425672"]]
1243
1244
1245
1246 When using AT commands, the data flow needs to be adjusted to XON/XOFF
1247
1248 [[image:image-20221102140638-2.png||_mstalt="428727"]]
1249
1250
1251 === 7.3.2  SecureCRT ===
1252
1253
1254 The default command window of SecureCRT is not displayed. Entering a command requires a complete input of the entire command. You can open the command window in the view.
1255
1256
1257 [[image:image-20221102140704-3.png||_mstalt="427076"]]
1258
1259
1260 [[image:image-20221102140712-4.png||_mstalt="427089"]]
1261
1262
1263 === 7.3.3  PUTTY ===
1264
1265
1266 [[image:image-20221102140748-5.png||_mstalt="430456"]]
1267
1268
1269 Since putty does not have a command window, you need to fill in the complete command externally, and then copy it to putty.The information copied outside can be pasted by right-clicking the mouse in putty.
1270
1271
1272 [[image:image-20221102140801-6.png||_mstalt="427466"]]
1273
1274
1275 == 7.4 How to modify source code to compile different frequency band bin file? ==
1276
1277
1278 (% class="box infomessage" %)
1279 (((
1280 (% style="color:red" %)**Important**(%%): Developer **MUST** follow the Arduino Environment Instruction exactly include change the SPI pin mappings.
1281 See : [[**Set Up Arduino Compile Environment for TrackerD**. >>||anchor="H6.1.1SetupARDUINOcompileenvironment"]]
1282 )))
1283
1284 **~1. When compiling the frequency band, you need to find LMIC_PROJECT_CONFIG.H file.**
1285
1286
1287 [[image:image-20221116111844-1.png||_mstalt="428688" height="227" width="782"]]
1288
1289
1290
1291 **2. Open LMIC_PROJECT_CONFIG.H, find the corresponding macro definition and open it(AS923_2,AS923_3,AS923_4 except).**
1292
1293
1294 [[image:image-20221116111844-2.png||_mstalt="429052" height="262" width="781"]]
1295
1296
1297
1298 **3. Compile the AS923_JP band, please refer to the intention shown**
1299
1300
1301 [[image:image-20221116111844-3.png||_mstalt="429416" height="338" width="746"]]
1302
1303
1304
1305 **4. In other frequency bands in AS923, you need to find Lorabase_as923.H, path arduino-lmic \ src \ lmic, as shown in the figure below.**
1306
1307
1308 [[image:image-20221116111844-4.png||_mstalt="429780" height="641" width="739"]]
1309
1310
1311 [[image:image-20221116111844-5.png||_mstalt="430144" height="551" width="708"]]
1312
1313
1314 == 7.5 Are there example python example for BLE Indoor Positioning? ==
1315
1316
1317 [[Operating instructions for BLE indoor positioning>>doc:.Example of BLE indoor positioning python.WebHome]]
1318
1319
1320 = 8  Trouble Shooting =
1321
1322 == 8.1  TDC is changed to 4294947296 and cause no uplink. ==
1323
1324
1325 (((
1326 Before firmware v1.4.0: When the Transport Mode is enabled ((% style="color:blue" %)**AT+INTWK=1**(%%)), the **TDC** needs to be greater than **MTDC**, otherwise, TDC setting will because 4294947296 after wakre up from motion. This bug is fixed in firmware v1.4.1
1327 )))
1328
1329
1330 == 8.2  Device not able get AT Command or show output after wake up from deep sleep mode ==
1331
1332
1333 (((
1334 ESP32 is not able to accept the Interrupt from UART after wake up from deep sleep mode. User need to press the button (one click) and trackerD will be able to accept UART command, it there is no action in UART for 15 seconds. it will go to deep sleep mode.
1335 )))
1336
1337
1338 == 8.3  Problem after Upgrading Firmware ==
1339
1340 === 8.3.1 "rst: (0x3 SW_RESET)" and Continue Restart after upgrading ===
1341
1342
1343 **Error Output**
1344
1345
1346 [[image:image-20221122100004-4.png||_mstalt="424606"]]
1347
1348
1349 (((
1350 Some partition is missed during upgrade, please upgrade below four files as example:
1351
1352 [[image:image-20221207120524-2.png]]
1353 )))
1354
1355
1356 === 8.3.2 TrackerD's led light is always GREEN on after upgrading ===
1357
1358
1359 It is because the partitions are different when upgrading versions above 1.4.1, and a new partition file needs to be added. Please refer to the operation steps in chapter 8.3.1
1360
1361
1362 === 8.3.3 "flash read err" after upgrade firmware ===
1363
1364
1365 Error shows below, user might erase the entire flash include u-boot partition which cause this issue.
1366
1367
1368 [[image:image-20221122100004-1.png||_mstalt="423514" height="497" width="534"]]
1369
1370
1371 User need to upgrade again with below four files to solve this issue.
1372
1373 [[image:image-20221207120530-3.png]]
1374
1375 **Figure 2**
1376
1377
1378 === 8.3.4  "Device Key become ff ff ff ff ff ff ff ff " after upgrade firmware ===
1379
1380
1381 User might erase the entire flash include keys and default settings which cause this issue.
1382
1383 After the upgrade is completed, enter **AT+CFG** as shown in the figure below.
1384
1385
1386 [[image:image-20221122100004-3.png||_mstalt="424242"]]
1387
1388
1389 Please (% style="color:blue" %)**AT+FDR**(%%) which will reset all settings to factory settings. , and then input the following keys by the information on the label.
1390
1391 After AT+FDR. please set
1392
1393 * (% _mstmutation="1" style="color:blue" %)**AT+PDOP=7**
1394
1395 * (% _mstmutation="1" style="color:blue" %)**AT+FTIME=180000**
1396
1397 **Example:**
1398
1399 AT+PDOP=7.00
1400
1401 AT+FTIME=180
1402
1403 AT+DEUI=70B3D57ED0053981  
1404
1405 AT+APPEUI=D23345667BCBCCAF
1406
1407 AT+APPKEY=F402A1A7A350445A7CD2DEA95511BFA1
1408
1409 AT+DADDR=260b4dce    ( no need for OTAA)
1410
1411 AT+NWKSKEY=71cb7672441f573a53d4f34d307fc61d  ( no need for OTAA)
1412
1413 AT+APPSKEY=dacce2299ecd97a73ee3f80b5a46a559   ( no need for OTAA)
1414
1415
1416 == 8.4  When positioning, it will restart or the PDOP setting is unsuccessful ==
1417
1418
1419 Please download version 1.4.2 again
1420
1421
1422 == 8.5  How to deal with unsuccessful GPS positioning? ==
1423
1424
1425 1) Make Sure the device is in Open Area where can see the sky.
1426
1427 2)  Set PDOP to a higher value.
1428
1429 * (% _mstmutation="1" style="color:blue" %)**AT+PDOP=2 **(%%)(can be positioned precisely.)
1430
1431 * (% _mstmutation="1" style="color:blue" %)**AT+PDOP=7 **(%%)(Quickly locate in open spaces)
1432
1433 * (% _mstmutation="1" style="color:blue" %)**AT+PDOP=14.7** (%%)(Positioning can be acquired in complex environments)
1434
1435 Please refer to this [[link>>http://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/TrackerD/#H3.2.9SetPDOPvalueforGPSfixaccuracy]] on how to set up PDOP
1436
1437
1438 == 8.6  When upgrading the firmware, the data is not completely erased, and the information does not return to normal after multiple resets ==
1439
1440
1441 When upgrading, use the erase button to upgrade
1442
1443 [[image:image-20221207120536-4.png]]
1444
1445
1446 The parameters are displayed abnormally and cannot be fixed using AT+FDR
1447
1448 [[image:image-20221128103040-2.png||height="431" width="525"]]
1449
1450
1451 Please upgrade these four files,link(The boot_app0 file is in the version folder you need)
1452
1453 [[image:image-20221207134028-8.png]]
1454
1455
1456 Reboot information after upgrade
1457
1458 [[image:image-20221128111443-4.png||height="432" width="546"]]
1459
1460
1461 Use **AT+FDR** command to reset and then use **AT+CFG** to check whether the configuration is back to normal
1462
1463 [[image:image-20221128111850-5.png]]
1464
1465
1466 After the parameters return to normal, upgrade to the version you need again
1467
1468 [[image:image-20221207120601-5.png]]
1469
1470
1471 At this point, the parameters return to normal after running AT+FDR again
1472
1473 [[image:image-20221128112035-7.png]]
1474
1475
1476 == 8.7  If you encounter the following problems, please upgrade to the latest version ==
1477
1478
1479 ~1. Press and hold the red button (more than 5 seconds), and the device and server do not respond.
1480
1481 2. Send some commands through the serial port to prompt an error (Example:AT+SMOD=1,0,1)
1482
1483
1484 = 9.  Order Info =
1485
1486
1487 Part Number: (% style="color:blue" %)**TrackerD-XXX**
1488
1489 (% style="color:blue" %)**XXX**(%%): The default frequency band
1490
1491 * (% style="color:red" %)**EU433**(%%): Default frequency band EU433
1492
1493 * (% style="color:red" %)**EU868**(%%): Default frequency band EU868
1494
1495 * (% style="color:red" %)**IN865**(%%): Default frequency band IN865
1496
1497 * (% style="color:red" %)**KR920**(%%): Default frequency band KR920
1498
1499 * (% style="color:red" %)**AS923**(%%): Default frequency band AS923
1500
1501 * (% style="color:red" %)**AU915**(%%): Default frequency band AU915
1502
1503 * (% style="color:red" %)**US915**(%%): Default frequency band US915
1504
1505 (% style="display:none" %) (%%)
1506
1507
1508 = 10.  Packing Info =
1509
1510
1511 (% style="color:#037691" %)**Package Includes**:
1512
1513 * TrackerD LoRaWAN GPS/BLE Tracker x 1
1514
1515 * USB recharge & program cable x 1
1516
1517 (% style="color:#037691" %)**Dimensions and Weight**:
1518
1519 * Device Size: 85 x 48 x 15 mm
1520
1521 * Weight: 50g
1522
1523 (% style="display:none" %) (%%)
1524
1525
1526 = 11. Support =
1527
1528
1529 * 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.
1530
1531 * 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.com>>url:file:///D:/市场资料/说明书/LoRa/LT系列/support@dragino.com]].
1532
1533 (% style="display:none" %) (%%)
1534
1535
1536 = 12.  Reference =
1537
1538
1539 * [[**Firmware in Bin format**>>https://www.dropbox.com/sh/733s8xlwahhqg1d/AABxDz80lBVX_to8zNuUQWFja?dl=0]]
1540
1541 * **[[Source Code>>https://github.com/dragino/TrackerD]] **
1542
1543 * [[**Hardware Source**>>https://www.dropbox.com/sh/orwoy6cecb89m4e/AAD37sRuUrvKsHgAJxuVTkB5a?dl=0]]
1544
1545
1546 )))