networking/wifi
python-wifi-survey-heatmap
A Python application for Linux machines to perform WiFi site surveys and present the results as a heatmap overlayed on a floorplan.
Installation
Install python-venv
1 apt install python3-venv python3-pybind11 python3-iperf3 wxpython-tools
Clone from github and build docker image
Use it
Connect to the wifi and get current associated BSSID
1 iw dev wlp5s0 link
2 Connected to 04:f0:21:31:ca:97 (on wlp5s0)
3 SSID: Arches
4 freq: 5580
5 RX: 185634 bytes (1280 packets)
6 TX: 56155 bytes (282 packets)
7 signal: -58 dBm
8 rx bitrate: 866.7 MBit/s VHT-MCS 9 80MHz short GI VHT-NSS 2
9 tx bitrate: 866.7 MBit/s VHT-MCS 9 80MHz short GI VHT-NSS 2
10
11 bss flags: short-slot-time
12 dtim period: 2
13 beacon int: 100
Start an iperf3 server somewhere.
Provide a PNG image of the area to be scanned floorplan.png
Create an environment file
.envrc
Run survey
1 source .envrc
2 docker run \
3 --net="host" \
4 --privileged \
5 --name survey \
6 -it \
7 --rm \
8 -v $(pwd):/pwd \
9 -w /pwd \
10 -e DISPLAY=$DISPLAY \
11 -v "$HOME/.Xauthority:/root/.Xauthority:ro" \
12 jantman/python-wifi-survey-heatmap \
13 wifi-survey -b "$BSSID" -i "$INTERFACE" \
14 -s "$IPERF_SERVER" -p "$FLOORPLAN_PNG" -t "$TITLE"
A file TITLE.json is created and you can later resume your measurements.
Create images
Some images are created.
1 channel_arches_heatmap.json.png
2 channel_bitrate_arches_heatmap.json.png
3 frequency_arches_heatmap.json.png
4 jitter_download_arches_heatmap.json.png
5 jitter_upload_arches_heatmap.json.png
6 signal_quality_arches_heatmap.json.png
7 tcp_download_Mbps_arches_heatmap.json.png
8 tcp_upload_Mbps_arches_heatmap.json.png
9 tx_power_arches_heatmap.json.png
10 udp_download_Mbps_arches_heatmap.json.png
11 udp_upload_Mbps_arches_heatmap.json.png
Some images
attachment:channel_arches_heatmap.json.png
signal_quality_arches_heatmap.json.png
tcp_upload_Mbps_arches_heatmap.json.png