Version 19.3 by Xiaoling on 2022/12/21 15:47

Show last authors
1 (% class="wikigeneratedid" %)
2 **Table of Contents:**
3
4 {{toc/}}
5
6
7
8
9 = 1. Operating instructions for BLE indoor positioning =
10
11 == 1.1 open the application ==
12
13
14 (% style="color:blue" %)**Enter the following information:**
15
16 (% style="color:#037691" %)**Subscribe to topics:**(%%)**MQTT Subscription Topic of TTN-V3**
17
18 **Example: **v3/litest@ttn/devices/eui-70b3d57ed0058a17/up
19
20 * v3: Unchanging
21
22 * litest@ttn:'litest' is the ID of the application, '@ttn' unchanging.If you use your own TTN platform, @ ttn doesn't need
23
24 * devices: Unchanging
25
26 * eui-70b3d57ed0058a17: End device ID
27
28 * Up: Unchanging
29
30 (% style="color:#037691" %)**server address:**(%%)**Server address of TTN-V3()**
31
32 (% style="color:#037691" %)**Application ID:**(%%)**Application ID of TTN-V3()**
33
34 (% style="color:#037691" %)**APIKEY:  **(%%)**APIKEY of your own account()**
35
36
37 [[image:image-20221221144423-1.png]]
38
39
40 [[image:image-20221221144423-2.png||height="534" width="1081"]]
41
42
43 [[image:image-20221221144423-3.png]]
44
45
46
47 == 1.2 Click the save button after writing ==
48
49
50 [[image:image-20221221144423-4.png]]
51
52 (% style="background-color:yellow" %)**Warning:**
53
54 When the save button is pressed, it cannot be pressed again to prevent data confusion.
55
56 If you want to modify the subscription topic, you need to restart the application.
57
58
59 == 1.3 Click the location button ==
60
61
62 Just press once
63
64 [[image:image-20221221144423-5.png]]
65
66
67 When the BLE node sends information, the application will display the located base station
68
69
70
71 == 1.4 About how to set the base station point and insert the floor plan ==
72
73
74 Place the floor plan in the same path as the python script
75
76 Change the file name to office_ map(The picture pixel is 800x600)
77
78 [[image:image-20221221144423-7.png]]
79
80
81 (% style="color:blue" %)**Open source code**
82
83 [[image:image-20221221144423-8.png]]
84
85
86 (% style="color:blue" %)**Remove comments**
87
88 [[image:image-20221221144423-9.png]]
89
90
91 (% style="color:blue" %)**Run Script**
92
93 The cursor position is the data pointed by the arrow, x=323 y=503
94
95 [[image:image-20221221144423-10.png]]
96
97 cv. create_ Image is changed to (323,483)~-~-(x y-20 above)
98
99 cv. create_ Image is changed to (323,503)~-~--(x y above)
100
101 [[image:image-20221221144423-11.png]]
102
103
104
105 After clicking Save, a (% style="color:blue" %)**log.txt** (%%)will be generated in the same directory as the script
106
107 [[image:image-20221221144423-12.png]]
108
109
110 [[image:image-20221221144423-13.png||height="176" width="1080"]]
111
112
113 (% style="color:blue" %)**Back to script**
114
115 Modify (% style="display:none" %) (%%)the data obtained in (% style="color:blue" %)**log.txt**(%%) to the script
116
117 (% style="color:#037691" %)**“0” Changed to “10006”**
118
119 (% style="color:#037691" %)**“60245” Changed to “79”**
120
121 [[image:image-20221221144423-14.png]]
122
123
124
125 == 1.5 Package the py file into an exe ==
126
127
128 (% style="color:blue" %)**Step 1:**(%%)Installing the pyinstaller module
129
130 (% style="color:blue" %)**Step 2:**(%%)Open cmd and switch to the directory where the script is located
131
132 [[image:image-20221221144423-15.png]]
133
134
135 (% style="color:blue" %)**Step 3:**(%%)Enter the following command
136
137 [[image:image-20221221144423-16.png]]
138
139
140 See the following certificate packaging completed.
141
142 [[image:image-20221221144423-17.png]]
143
144
145 The following files will be generated in the same directory of the script.
146
147 In addition to dist, the other two files can be deleted.
148
149 [[image:image-20221221144423-18.png]]
150
151 (% style="color:blue" %)**Finally**(%%), put the office_ Map.png and icon.png Put the into the dist folder.
152
153 Just run the program in dist.
154
155