Nischay-Pro / wifi-heat-mapper

whm also known as wifi-heat-mapper is a Python library for benchmarking Wi-Fi networks and gather useful metrics that can be converted into meaningful easy-to-understand heatmaps.
GNU General Public License v3.0
213 stars 21 forks source link

1. pip missing distribution files; 2. whm bootstrap issues: librespeed-cli config.py setup dialog missing; 3. Example files: config.json missing; 4. Librespeed-CLI broken due to STRING Format? #16

Open 6xthFNGR opened 1 month ago

6xthFNGR commented 1 month ago

Hey,

1.) pip install whm==0.2.5 doesnt work, because there are not Distribution Files but only Build files. I would appreciate if you want to change that for more convinient installation. Exp. since .eggs are depreciated and the only option right now is to git clone and "pip install .".

2.) whm bootstrap recognize iperf3, Ookla Speedtest and librespeed-cli, but only asks to use librespeed-cli instead of Speedtest if BOTH are available! If only iperf3 and librespeed-cli are available, he wont ask to use librespeed. Instead, he asks for the wlan adapter, SSID/IP, benchmark repeats, and suggests 17 different graph options. The config.json output is than set to "speedtest": -1 (UNKNOWN) instead of 2 (Librespeed)!

The whm bootstrap script needs to be updated accordingly.

3.) You mention in github readme that there are example files and them containing a config.json that is setup for librespeed-cli, but unfortunatly neither github nor pypi does have the example .json config.

After inspecting main.py I found

class SpeedTestMode(IntEnum): UNKNOWN = -1 OOKLA = 0 SIVEL = 1 LIBRESPEED = 2

And therefor was able to alter my config.json manually.

A benchmark config with Ookla Speedtest, and Iperf3, worked for me with Linux Kernel 6.8.0.45, Python 3.9 (and 3.11), whm 0.2.5 (and 0.2.4), numpy 1.26.4 (and 1.24.4), scipy 1.14.1 (and 1.13.1), Ookla Speedtest 1.2.0.84.

4.) Now comes my real issue: Librespeed-CLI (Version 1.0.11, did not test >=1.0.9 to <=1.0.10) is not dialed for properly by whm benchmark. I didnt went far for debugging. Heres where we are at:

whm -V 0.2.5+7.g95bc515

config.json

{ "configuration": { "graphs": [ "signal_quality", "signal_quality_percent", "signal_strength", "download_bits_tcp", "download_bytes_tcp", "upload_bits_tcp", "upload_bytes_tcp", "download_bits_udp", "download_bytes_udp", "upload_bits_udp", "upload_bytes_udp", "download_jitter_udp", "upload_jitter_udp", "speedtest_latency", "speedtest_jitter", "speedtest_download_bandwidth", "speedtest_upload_bandwidth" ], "modes": [ "tcp_r", "base", "udp_r", "tcp", "udp", "speedtest" ], "backends": [ "iperf3", "speedtest-ookla", "librespeed-cli", "base" ], "version": "0.2.5+7.g95bc515", "target_interface": "wlp2s0", "target_ip": "192.168.XXX.XXX", "ssid": "NAME", "speedtest": 2, "libre-speed-list": "", "benchmark_iterations": 1 }, "results": { } }

Error (the error is the same in Phyton 3.09 and 3.11, just happens that 3.10 gave detailed feedback, maybe because I was running whm 0.2.4 in that instance, but the error lines do not change with whm0.2.5) 4/5 [00:41<00:10, 10.21s/it]Traceback (most recent call last): File "/home/XXX/PyVENV/310/bin/whm", line 8, in sys.exit(driver()) File "/home/XXX/PyVENV/310/lib/python3.10/site-packages/wifi_heat_mapper/main.py", line 84, in driver start_gui(args.floor_map, args.iperf_server, args.config_file) File "/home/XXX/PyVENV/310/lib/python3.10/site-packages/wifi_heat_mapper/debugger.py", line 12, in new_func return func(*args, **kwargs) File "/home/XXX/PyVENV/310/lib/python3.10/site-packages/wifi_heat_mapper/gui.py", line 213, in start_gui results = run_benchmarks(benchmark_modes, benchmark_iterations, iperf_ip, iperf_port, File "/home/XXX/PyVENV/310/lib/python3.10/site-packages/wifi_heat_mapper/gui.py", line 530, in run_benchmarks results["speedtest_jitter"] += speedtest_download["jitter"] TypeError: list indices must be integers or slices, not str 80%|

Could you please check whats wrong here? If its due to JSON Format, STRINGS instead of integers or slices I may find out when using librespeed 1.0.9 version, lets see.

Thank you alot!