Set up the development environment
This guide assumes that the user has already followed the steps described in the Cell Location package post, specifically the section Set up the development environment.
Download the source code
Download the file wifi-monitor.zip and extract it in the
After having done this, you should already be able to compile the new package. In order to do so, it is needed to update the feeds in the first place and install the package so the OpenWrt build system has it indexed:
cd ~/code/barrier_breaker ./scripts/feeds update hackathon ./scripts/feeds install -a -p hackathon
make menuconfig and select the package to be compiled:
- Scroll down and select MaestroPackages. Press Enter.
- You should see a Hackathon entry now, press Enter again.
- Select wifi-monitor. Type ‘m’.
- Press arrow-right to select Exit and press Enter.
- Repeat the step above until you get a prompt asking you to save the new configuration. Select Yes and press Enter.
Now, OpenWrt’s build system has all the information about your package and it is ready to be compiled. There is a custom script that will compile the package and copy it automatically to the router (provided that you have set up the SSH access). To execute it, run:
Install the package in the router
Once the make-script finishes its executing, the package for wifi-monitor should be present in the router’s filesystem. You can check that easily by executing following command in the router (which should display one result):
ls -l /tmp/wifi-monitor*
In order to install the package, you will need to install first tcpdump as it is listed as a dependency for wifi-monitor:
opkg install /tmp/tcpdump_4.5.1-4_ramips_24kec.ipk
After the dependencies are installed, you can install the package:
opkg install /tmp/wifi-monitor_1.2.0-1_ramips_24kec.ipk
After doing this, leave the router working for a few minutes so it can detect some MAC addresses from nearby devices. The data is logged to the file
/tmp/wifi.txt. You can check its contents with:
The data is presented in the following format (MAC addresses are masked with :XX:XX at the end for privacy reasons):
2018-06-29,08:33:17,80:58:f8:2e:XX:XX,-82 2018-06-29,08:33:36,08:9e:08:41:XX:XX,-66 2018-06-29,08:33:36,08:9e:08:41:XX:XX,-64 2018-06-29,08:33:36,08:9e:08:41:XX:XX,-64 2018-06-29,08:33:36,08:9e:08:41:XX:XX,-64 2018-06-29,08:33:36,08:9e:08:41:XX:XX,-64 2018-06-29,08:33:39,08:9e:08:41:XX:XX,-64 2018-06-29,08:33:39,08:9e:08:41:XX:XX,-66 2018-06-29,08:33:39,08:9e:08:41:XX:XX,-64 2018-06-29,08:34:02,78:7b:8a:95:XX:XX,-94 2018-06-29,08:34:42,08:9e:08:41:XX:XX,-66 2018-06-29,08:34:42,08:9e:08:41:XX:XX,-64
This data can also be checked from the web interface, by going to Services > WiFi Monitor: