Setting the wireless regulatory domain

Different regions around the world use slightly different frequencies for the various wireless interfaces available on your average Linux portable device such as WiFi, Bluetooth and other such interfaces. Overall they fit into larger categories such as 2.4Ghz, 5Ghz etc, but within each of these larger buckets countries have a subset of the frequencies, generally referred to as channels available. For example the 2.4Ghz range used by most WiFi and Bluetooth interfaces has potentially up to 14 channels available, the default is a generic “world” region which uses 11 channels that are available in all regions, but a lot of regions have 13 available for use, and some even have 14. The situation is similar on the 5Ghz range, and no doubt on the higher frequencies now becoming available too.

So to make best use of these while operating in the legal ranges for a country the regulatory domain needs to be set for the device. Linux handles this with three components, the kernel CRDA interface, a signed regulatory DB, which in Fedora is a package called wireless-regdb, but may also be called crda, and the iw tool. In some cases if an access point is using channels outside of the default “world” range you may not even be able to see/connect to the network.

There’s a two ways you can fix this. Firstly straight on the command line with the following command line options. The first shows you the current settings, the next sets the domain for the UK, but setting it this way isn’t persistent, but it’s useful for testing:

iw reg get
iw reg set GB

To make the setting persistent on every boot you just need to set a country in the /etc/sysconfig/regdomain file with a line that looks like this:

COUNTRY=GB

Of course use the code for your country of location based on the standard two letter country codes.