The list of available wifi channels is slightly different from country to country. To ensure access to the right channels and transmit power settings, one needs to set the right regulatory domain in the wifi stack.
Linux
For most Linux-based computers, you can look and change the current regulatory domain using these commands:
iw reg get
iw reg set CA
where CA
is the two-letter country code
when the device is located.
On Debian and Ubuntu, you can make this setting permanent by putting the
country code in /etc/default/crda
.
Finally, to see the list of channels that are available in the current config, use:
iwlist wlan0 frequency
OpenWRT
On OpenWRT-based routers (including derivatives like
Gargoyle), looking and setting the
regulatory domain temporarily works the same way (i.e. the iw
commands
above).
In order to persist your changes though, you need to use the uci command:
uci set wireless.radio0.country=CA
uci set wireless.radio1.country=CA
uci commit wireless
where wireless.radio0
and wireless.radio1
are the wireless devices
specific to your router. You can look them up using:
uci show wireless
To test that it worked, simply reboot the router and then look at the selected regulatory domain:
iw reg get
Scanning the local wifi environment
Once your devices are set to the right country, you should scan the local environment to pick the least congested wifi channel. You can use the Kismet spectools if you have the hardware, otherwise WiFi Analyzer is a good choice on Android.
"Once your devices are set to the right country, you should scan the local environment to pick the least congested wifi channel."
But beware -- the least congested channel may be unused for a reason. In my office I can see the usual mess of overlapping wifi's but nobody uses 5/6/7.
And if you try you soon find out why -- something nearby emits huge amounts of noise at those frequencies and those channels just don't work at that location.
(Makes the "auto select" feature of many AP's useless).
How about WiGLE Wifi Wardriving as a Free app for seeing local channel use?
In the UK, there's one generation of BT Home Hub which uses only three channels... and you can't colour a map with three colours so if there are too many in an area, welcome to WiFi interference hell.