jantman / 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
GNU Affero General Public License v3.0
375 stars 88 forks source link

Error when using --scan option #8

Closed erik-overdahl closed 2 years ago

erik-overdahl commented 3 years ago

Bug Report

An error occurs during scan_all_access_points when calling with the --scan/-S option, as so:

sudo ./.venv/bin/python -m wifi_survey_heatmap.ui -v -v -i wlp3s0 -p floorplan.png -s 192.168.1.24:5201 -t test -S

The node gets stuck at 80%, and the JSON file has only an empty array.

Version

Most recent commit

Installation Method

git clone https://github.com/jantman/python-wifi-survey-heatmap.git
virtuelenv --system-site-packages --prompt "(wifi-heatmap)" .venv
source ./.venv/bin/activate
python setup.py develop

Supporting Software Versions

$ neofetch
          /:-------------:\          francis@francis-remote 
       :-------------------::        ---------------------- 
     :-----------/shhOHbmp---:\      OS: Fedora release 32 (Thirty Two) x86_64 
   /-----------omMMMNNNMMD  ---:     Host: P2540UA 1.0 
  :-----------sMMMMNMNMP.    ---:    Kernel: 5.10.11-100.fc32.x86_64 
 :-----------:MMMdP-------    ---\   Uptime: 2 days, 10 hours, 14 mins 
,------------:MMMd--------    ---:   Packages: 2814 (rpm) 
:------------:MMMd-------    .---:   Shell: bash 5.0.17 
:----    oNMMMMMMMMMNho     .----:   Resolution: 1920x1080, 1920x1080 
:--     .+shhhMMMmhhy++   .------/   WM: i3 
:-    -------:MMMd--------------:    Theme: Adwaita [GTK2] 
:-   --------/MMMd-------------;     Icons: Adwaita [GTK2] 
:-    ------/hMMMy------------:      Terminal: gnome-terminal 
:-- :dMNdhhdNMMNo------------;       CPU: Intel i5-7200U (4) @ 3.100GHz 
:---:sdNMMMMNds:------------:        GPU: Intel HD Graphics 620 
:------:://:-------------::          Memory: 1879MiB / 31988MiB 
:---------------------://

$ python --version
Python 3.8.7

$ virtualenv --version
virtualenv 20.4.2 from /home/francis/.local/lib/python3.8/site-packages/virtualenv/__init__.py

Actual Output

...
2021-02-12 23:54:49,590 [DEBUG collector.py:102 - wifi_survey_heatmap.collector.scan_all_access_points() ] Scanning...

----------------------------------------------------------------------------------------------------------
ui.py 295 onLeftUp
self._do_measurement(pos)

ui.py 411 _do_measurement
res['scan_results'] = self.collector.scan_all_access_points()

collector.py 103 scan_all_access_points
res = self.scanner.scan_all_access_points()

libnl.py 299 scan_all_access_points
pack = struct.pack('16sI', self.interface_name.encode('ascii'), 0)

AttributeError:
'NoneType' object has no attribute 'encode'
...

Expected Output

An iperf result

Testing Assistance

Yes

jantman commented 2 years ago

This should be fixed with 1.0.0 which was just released. Please feel free to re-open if it hasn't been.