Design and implementation of a WiFi tracking module where a bracelet can be attached to an object and the user can localize and track the current location of the object in real time through either a mobile application or a website
- Features definition
- Data Acquisition
- Convert to features vector
- Train and export the classifier
- Creating Server Flask App
- Web & Mobile App
- Additional Features
- Notes
1. Features definition 📎
-
The features for this project are going to be the RSSIs (Received signal strength indication) of the known WiFi networks. If a network is out of range, it will have an RSSI equal to 0.
-
Before actually recording the sample data to train our classifier, we need to do some preliminary work. This is because not all networks will be visible all the time: we have to work, however, with a fixed number of features.
-
First of all we need to enumerate all the networks we will encounter during the inference process.
To begin, we take a "reconnaissance tour" of the locations we want to predict and log all the networks we detect. Load the following sketch and take note of all the networks that appear on the Serial monitor.
2. Data Acquisition 📎
- After selecting our stable networks we start by recording the strengths of those SSIDs by walking randomly and lalbeling each raw of data by its specified room
- Grab some recordings just staying in a location for a few seconds and save the serial output to a file; then move to the next location and repeat: 10-15 samples for each location will suffice.
3. Convert to features vector 📎
- The second step is to convert the scan results into a features vector. Each feature will be the RSSI of the given SSID, in the exact order we populated the knownNetworks array.
4. Train and export the classifier 📎
- We have used The KNeighbors Classifier
5. Creating Flask Server App 📎
-
we imported the model.joblib into the server app then the prosess goes as following
- The esp scans the SSIDs and Post their RSSIs values in json format to the server through http Request
- The server recieve the data and starts to predict the label (location) of the esp
6. Web & Mobile Visualization 📎
- We started by connecting the web and mobile Apps to the flask server
- The server after making the prediction it sends the predicted location label to the apps and they localize the pullet with the specified coordinates
- We also added Replay Button which stores the previous locations of the esp and replay them on pressing
- Make sure to replace the IP address in each file with yours
- you can find your ipv4 address by the following in your cmd
>> ipconfig