Introduction:This guide will attempt to fix the wrong channel reporting issue many users face on Ubuntu 13.04 (raring ringtail). Typically airodump-ng will report the following:
fixed channel mon0: -1
The odd thing about the above message is that this issue was fixed since the 3.3 rc1 kernel release. Note that 13.04 ships with a 3.8 kernel. I assume this kernel suffers from a regression.
The fixThe easiest way to fix this is to download and install backported drivers from a kernel release that works.
First, let's make sure we have the required headers and tools to install these drivers:
sudo apt-get install build-essential
Now we have to download and extract a stable backports tarball, I found version 3.10.4 to be working:
mkdir ~/backports
cd ~/backports
wget https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.10.4/backports-3.10.4-1.tar.bz2
tar jxvf backports-3.10.4-1.tar.bz2
cd backports-3.10.4-1
This tarball includes much more than drivers for wireless adapters, but we only need to compile the modules for the wireless subsystem.
make defconfig-wifi
make
If everything went fine, your new modules should be ready to be used. Let's install them:
sudo make install
No worries, your original drivers are still there, the system will simply prefer these new ones.
The easiest way to get your freshly built drivers working is to reboot.
Once rebooted, make sure the system is indeed using the new drivers:
lsmod | grep compat
It should return a line that's similar to:
compat 14155 4 bcma,cfg80211,brcmsmac,mac80211
The above procedure you will have to do once.
Let's add a monitor interface for our device (change wlan0 to the interface name your device has):
sudo airmon-ng start wlan0
This will add an interface usually similar to "mon0".
We still have to stop the network manager service, or the reporting will be wrong:
sudo service network-manager stop
sudo killall wpa_supplicant
You should be all set now, fire up an airodump-ng monitor session on a single channel and see if you still get the annoying -1.
You can restart network-manager with:
sudo service network-manager start
In case you want to return to your original drivers:
cd ~/backports/backports-3.10.4-1
sudo make uninstall
I hope this will be useful, enjoy!