ideascube / ansiblecube

Ansible playbook to quickly deploy an ideascube server and much more !
MIT License
5 stars 9 forks source link

Find the best wifi canal #42

Open fheslouin opened 7 years ago

fheslouin commented 7 years ago

In some crowded spot, the wifi canal is full and unusable.

We should try to checkout for a spectrum analyzer, find out the best canal and start hostapd with this canal. Of course this will increase the time for the AP to get ready.

letompouce commented 7 years ago

iwlist wlan0 scan | awk ' /Frequency:2.*Channel/ { print $4 }' | tr -d ')' | sort -n | uniq -c | sort -r | tail -n 1 | awk '{ print $2 }'

bochecha commented 7 years ago

I'd say don't spend too much time on this. @letompouce 's one liner is simple enough that if it improves things it is worth it.

But long term we're going to integrate the hotspot management into Ideascube (probably through Cockpit and NetworkManager), so it's probably not worth going much further than that.

(also, at home, the current hardcoded canal was the less crowded one, so my anecdata clearly shows conclusively that the status quo is perfect :stuck_out_tongue_winking_eye: )

letompouce commented 7 years ago

See comments around channel and acs_num_scans in /usr/share/doc/hostapd/examples/hostapd.conf.gz...

fheslouin commented 7 years ago

@letompouce I think your suggestion are quite interesting !

I'm willing to make some tests and adopt it if it work. I think it is better to let hostapd doing this job !

fheslouin commented 7 years ago

After a bit of research, ACS (Automatic Channel Selection) is not available for our driver.

Here is the list of supported driver :

CONFIG_ACS=y has to be enable during compilation as well, see https://wireless.wiki.kernel.org/en/users/Documentation/acs#hostapd_setup for more details