... |
... |
@@ -1,4 +1,4 @@ |
1 |
|
-**~ Contents:** |
|
1 |
+**Contents:** |
2 |
2 |
|
3 |
3 |
{{toc/}} |
4 |
4 |
|
... |
... |
@@ -7,11 +7,10 @@ |
7 |
7 |
|
8 |
8 |
This article shows how to use [[LBT1>>url:http://www.dragino.com/products/lora-lorawan-end-node/item/165-lbt1.html]] to build an Indoor Positioning Solution. |
9 |
9 |
|
10 |
|
-[[image:image-20220526150521-2.png]] |
|
10 |
+[[image:https://wiki.dragino.com/images/thumb/1/1a/LBT1_Mapwize_1.png/600px-LBT1_Mapwize_1.png||height="511" width="600"]] |
11 |
11 |
|
12 |
12 |
LBT1 Indoor Positioning Network Structure |
13 |
13 |
|
14 |
|
- |
15 |
15 |
= 2. Prepare Map = |
16 |
16 |
|
17 |
17 |
== 2.1 Prepare iBeacons == |
... |
... |
@@ -34,7 +34,7 @@ |
34 |
34 |
))) |
35 |
35 |
))) |
36 |
36 |
|
37 |
|
-[[image:image-20220526150651-4.png]] |
|
36 |
+[[image:https://wiki.dragino.com/images/thumb/8/88/Ibeacon1.png/300px-Ibeacon1.png||height="169" width="300"]] |
38 |
38 |
|
39 |
39 |
BCN01 iBeacon |
40 |
40 |
|
... |
... |
@@ -89,7 +89,7 @@ |
89 |
89 |
|
90 |
90 |
4. Upload Floor plan. |
91 |
91 |
|
92 |
|
-[[image:https://wiki.dragino.com/images/thumb/d/d1/Beacon12.png/800px-Beacon12.png||alt="File:Beacon12.png" height="196" width="598"]] |
|
91 |
+[[image:https://wiki.dragino.com/images/thumb/d/d1/Beacon12.png/600px-Beacon12.png||height="197" width="600"]] |
93 |
93 |
|
94 |
94 |
add images |
95 |
95 |
|
... |
... |
@@ -111,7 +111,7 @@ |
111 |
111 |
|
112 |
112 |
== 3.1 Configure LBT1 to Upload data to TTN == |
113 |
113 |
|
114 |
|
-Please refer the instruction in the [[User Manual>>url:http://www.dragino.com/downloads/index.php?dir=accessories/Bluetooth/BCN01]]. Note the (% style="color:#4f81bd" %)**LBT1 need to set to MOD=3**(%%) here. |
|
113 |
+Please refer the instruction in the [[User Manual>>url:http://www.dragino.com/downloads/index.php?dir=accessories/Bluetooth/BCN01]]. Note the LBT1 need to set to MOD=3 here. |
115 |
115 |
|
116 |
116 |
== 3.2 Decoder in TTN == |
117 |
117 |
|
... |
... |
@@ -210,6 +210,7 @@ |
210 |
210 |
))) |
211 |
211 |
|
212 |
212 |
((( |
|
212 |
+ |
213 |
213 |
System: Debian / Ubuntu |
214 |
214 |
))) |
215 |
215 |
|
... |
... |
@@ -216,17 +216,28 @@ |
216 |
216 |
(% class="box" %) |
217 |
217 |
((( |
218 |
218 |
step: |
219 |
|
-\\1. sudo apt install libcurl4-dev |
220 |
|
-\\2. sudo apt install gcc automake autoconf libtool make cmake |
221 |
|
-\\3. git clone -b master https:~/~/github.com/mikayong/location.git |
222 |
|
-\\4. cd location/libmqtt |
223 |
|
-\\5. mkdir build |
224 |
|
-\\6. cd build && cmake ../ |
225 |
|
-\\7. make && sudo make install |
226 |
|
-\\8. cd ../ |
227 |
|
-\\9. make |
228 |
|
-\\10. sudo cp location_conf.json /etc/ |
229 |
|
-\\11. Edit the configuration file, and run the location service in the background: ./location & |
|
219 |
+ |
|
220 |
+~1. sudo apt install libcurl4-dev |
|
221 |
+ |
|
222 |
+2. sudo apt install gcc automake autoconf libtool make cmake |
|
223 |
+ |
|
224 |
+3. git clone -b master https:~/~/github.com/mikayong/location.git |
|
225 |
+ |
|
226 |
+4. cd location/libmqtt |
|
227 |
+ |
|
228 |
+5. mkdir build |
|
229 |
+ |
|
230 |
+6. cd build && cmake ../ |
|
231 |
+ |
|
232 |
+7. make && sudo make install |
|
233 |
+ |
|
234 |
+8. cd ../ |
|
235 |
+ |
|
236 |
+9. make |
|
237 |
+ |
|
238 |
+10. sudo cp location_conf.json /etc/ |
|
239 |
+ |
|
240 |
+~11. Edit the configuration file, and run the location service in the background: ./location & |
230 |
230 |
))) |
231 |
231 |
|
232 |
232 |
((( |
... |
... |
@@ -235,38 +235,29 @@ |
235 |
235 |
|
236 |
236 |
= 5. Configuration file: location_conf.json = |
237 |
237 |
|
238 |
|
-* ((( |
239 |
|
-We use the 120.78.138.177 server as an example. The location service is currently installed on the 120.78.138.177 server, the code is in /root/location, and the configuration file for running location pre-read directly is /etc/location_conf.json. |
240 |
|
-))) |
|
249 |
+* We use the 120.78.138.177 server as an example. The location service is currently installed on the 120.78.138.177 server, the code is in /root/location, and the configuration file for running location pre-read directly is /etc/location_conf.json. |
241 |
241 |
|
242 |
|
-((( |
243 |
243 |
{ "location_conf": { |
244 |
|
-))) |
245 |
245 |
|
246 |
246 |
(% class="box" %) |
247 |
247 |
((( |
248 |
|
-((( |
249 |
249 |
"loctype": "indoor", ~/~/ indoor/outdoor |
250 |
250 |
"locmap": "mapwize" ~/~/ Map interface: mapwize, traccar |
251 |
251 |
))) |
252 |
|
-))) |
253 |
253 |
|
254 |
|
-((( |
255 |
255 |
}, "mqtt_conf": { |
256 |
|
-))) |
257 |
257 |
|
258 |
258 |
(% class="box" %) |
259 |
259 |
((( |
260 |
|
-((( |
261 |
261 |
"servaddr": "[str]", ~/~/ Lorawan server address: Refer to TTN app handler:eu.thethings.network |
262 |
262 |
"servport": [int], ~/~/ Lorawan server port: 1883 |
263 |
|
- "clientid": "[str]", ~/~/ MQTT client identity: Custom |
264 |
|
- "qos":[int], ~/~/ (Optional) MQTT service quality: 0 |
265 |
|
- "username":"[str]", ~/~/ Agent name of mqtt: application ID of TTN |
|
265 |
+ "clientid": "[str]", ~/~/ MQTT client identity: Custom |
|
266 |
+ "qos":[int], ~/~/ (Optional) MQTT service quality: 0 |
|
267 |
+ "username":"[str]", ~/~/ Agent name of mqtt: application ID of TTN |
266 |
266 |
"password":"[str]", ~/~/ The proxy password of mqtt: application access key of TTN |
267 |
|
- "topic":"[str]", ~/~/ The topic of mqtt subscription: TTN is + / devices / + / up |
|
269 |
+ "topic":"[str]", ~/~/ The topic of mqtt subscription: TTN is + / devices / + / up |
268 |
268 |
"connection":"[str]" }, ~/~/(Optional) mqtt is a string used for direct connection, composed of serveraddr and port |
269 |
|
- "mapwize_conf":{ ~/~/Map settings |
|
271 |
+"mapwize_conf":{ ~/~/Map settings |
270 |
270 |
"apikey": "[str]", ~/~/ The apikey of the map user can be found on the Api keys page of wapwize, and read and write permissions need to be set |
271 |
271 |
"venueid":"[str]", ~/~/ (Optional)Indoor map area identification |
272 |
272 |
"orgid":"[str]", ~/~/ The identity of the user organizer |
... |
... |
@@ -276,76 +276,57 @@ |
276 |
276 |
"loracloud":{ |
277 |
277 |
"token": "[str]" ~/~/The password string of loracloud location service, the outdoor map must fill in the account token of loracloud |
278 |
278 |
))) |
279 |
|
-))) |
280 |
280 |
|
281 |
|
-((( |
282 |
282 |
} |
283 |
|
-))) |
284 |
284 |
|
285 |
285 |
(% class="box" %) |
286 |
286 |
((( |
287 |
|
-((( |
288 |
288 |
"rssi_conf": { |
289 |
289 |
"rssirate": [int], ~/~/ (Optional) A basis for rssi calculation distance, the rssi value (absolute value) when the beacon is 1 meter apart |
290 |
290 |
"rssidiv": [float] } ~/~/ (Optional) rssi measures an attenuation value of distance. As the distance to the beacon is farther, the value changes speed |
291 |
291 |
))) |
292 |
|
-))) |
293 |
293 |
|
294 |
|
-((( |
295 |
295 |
} |
296 |
|
-))) |
297 |
297 |
|
298 |
298 |
* Parameter acquisition method of configuration file: |
299 |
299 |
|
300 |
|
-(% class="box" %) |
301 |
|
-((( |
302 |
|
-"username":"[str]" |
303 |
|
-))) |
|
295 |
+{{{"username":"[str]" |
|
296 |
+}}} |
304 |
304 |
|
305 |
305 |
[[image:https://wiki.dragino.com/images/thumb/d/da/Beacon50.png/600px-Beacon50.png||height="185" width="600"]] |
306 |
306 |
|
307 |
307 |
username |
308 |
308 |
|
309 |
|
-(% class="box" %) |
310 |
|
-((( |
311 |
|
-"password":"[str]" |
312 |
|
-))) |
|
302 |
+{{{"password":"[str]" |
|
303 |
+}}} |
313 |
313 |
|
314 |
|
-[[image:https://wiki.dragino.com/images/thumb/b/bd/Beacon51.png/800px-Beacon51.png||alt="File:Beacon51.png" height="259" width="598"]] |
|
305 |
+[[image:https://wiki.dragino.com/images/thumb/b/bd/Beacon51.png/600px-Beacon51.png||height="260" width="600"]] |
315 |
315 |
|
316 |
316 |
password |
317 |
317 |
|
318 |
|
-(% class="box" %) |
319 |
|
-((( |
320 |
|
-"apikey": "[str]" |
321 |
|
-))) |
|
309 |
+{{{"apikey": "[str]" |
|
310 |
+}}} |
322 |
322 |
|
323 |
|
-[[image:https://wiki.dragino.com/images/thumb/5/53/Qwe3.png/800px-Qwe3.png||alt="File:Qwe3.png" height="325" width="606"]] |
|
312 |
+[[image:https://wiki.dragino.com/images/thumb/5/53/Qwe3.png/600px-Qwe3.png||height="321" width="600"]] |
324 |
324 |
|
325 |
325 |
apikey |
326 |
326 |
|
327 |
|
-(% class="box" %) |
328 |
|
-((( |
329 |
|
-"orgid":"[str]" |
330 |
|
-))) |
|
316 |
+{{{"orgid":"[str]" |
|
317 |
+}}} |
331 |
331 |
|
332 |
|
-[[image:https://wiki.dragino.com/images/thumb/f/f4/Qwe4.png/800px-Qwe4.png||alt="File:Qwe4.png" height="304" width="622"]] |
|
319 |
+[[image:https://wiki.dragino.com/images/thumb/f/f4/Qwe4.png/600px-Qwe4.png||height="293" width="600"]] |
333 |
333 |
|
334 |
334 |
orgid |
335 |
335 |
|
336 |
|
-(% class="box" %) |
337 |
|
-((( |
338 |
|
-"universesid":"[str]" |
339 |
|
-))) |
|
323 |
+{{{"universesid":"[str]" |
|
324 |
+}}} |
340 |
340 |
|
341 |
341 |
[[image:https://wiki.dragino.com/images/thumb/9/9a/Qwe5.jpg/600px-Qwe5.jpg||height="424" width="600"]] |
342 |
342 |
|
343 |
343 |
universesid |
344 |
344 |
|
345 |
|
-(% class="box" %) |
346 |
|
-((( |
347 |
|
-"placetype": "[str]" |
348 |
|
-))) |
|
330 |
+{{{"placetype": "[str]" |
|
331 |
+}}} |
349 |
349 |
|
350 |
350 |
[[image:https://wiki.dragino.com/images/thumb/9/93/Qwe6.png/600px-Qwe6.png||height="318" width="600"]] |
351 |
351 |
|
... |
... |
@@ -352,25 +352,24 @@ |
352 |
352 |
placetype |
353 |
353 |
|
354 |
354 |
|
355 |
|
-**Here are two ways to enter the server:** |
|
338 |
+* Here are two ways to enter the server |
|
339 |
+* WinSCP |
356 |
356 |
|
357 |
|
-**~1. WinSCP** |
358 |
|
- |
359 |
359 |
[[image:https://wiki.dragino.com/images/thumb/6/6b/Ibeacon4.jpg/600px-Ibeacon4.jpg||height="385" width="600"]] |
360 |
360 |
|
361 |
361 |
[[image:https://wiki.dragino.com/images/thumb/7/78/Ibeacon5.jpg/600px-Ibeacon5.jpg||height="385" width="600"]] |
362 |
362 |
|
363 |
|
-[[image:https://wiki.dragino.com/images/thumb/c/cd/Ibeacon6.jpg/800px-Ibeacon6.jpg||alt="File:Ibeacon6.jpg" height="362" width="599"]] |
|
345 |
+[[image:https://wiki.dragino.com/images/thumb/c/cd/Ibeacon6.jpg/600px-Ibeacon6.jpg||height="363" width="600"]] |
364 |
364 |
|
365 |
365 |
way1 |
366 |
366 |
|
367 |
|
-**2. secureCRT** |
|
349 |
+* secureCRT |
368 |
368 |
|
369 |
369 |
[[image:https://wiki.dragino.com/images/thumb/7/7b/Ibeacon7.jpg/600px-Ibeacon7.jpg||height="326" width="600"]] |
370 |
370 |
|
371 |
371 |
[[image:https://wiki.dragino.com/images/thumb/6/64/Ibeacon8.jpg/600px-Ibeacon8.jpg||height="326" width="600"]] |
372 |
372 |
|
373 |
|
-[[image:https://wiki.dragino.com/images/thumb/d/de/Ibeacon9.jpg/800px-Ibeacon9.jpg||alt="File:Ibeacon9.jpg" height="327" width="602"]] |
|
355 |
+[[image:https://wiki.dragino.com/images/thumb/d/de/Ibeacon9.jpg/600px-Ibeacon9.jpg||height="326" width="600"]] |
374 |
374 |
|
375 |
375 |
way2 |
376 |
376 |
|