IMPORTANT
If you have a new kernel that support mac80211 and includes the new rtl8187 driver then you MUST blacklist it otherwise the ieee80211 version of the module below will not work. See blacklisting mac80211 driver version below.

Now reboot your system. If your card is connected then wlan0 should now be listed in iwconfig.

Please note that a copy of the patch is also included with the aircrack-ng tar file in the “patches” subdirectory.

Usage Tips

Power Settings

The transmit power can be adjusted using:

iwconfig wlan0 txpower <value of 0 to 35>

With 0 being the lowest and 35 being the highest transmit power. The default is 5 which is normal. In order to use higher values, you must first “enable” the high power option. See the next section regarding how to do this. WARNING: Enabling high power can damage or destroy your wireless device. Use this feature at your own risk.

It is important to understand that the values are relative power values, not absolute. Meaning that they do not refer to dBm or mW values.

Starting with the rtl8187_2.6.24v3.patch, there is a iwpriv “highpower” setting you need to set to “1” in order to increase the txpower over the default value.

To enable high power:

iwpriv wlan0 highpower 1

To disable high power:

iwpriv wlan0 highpower 0

Using Unpatched Driver

Although it is highly recommended that you patch the driver, it is possible to use the unpatched driver for injection. Simply enter this command first “iwpriv wlan0 rawtx 1”.

Troubleshooting Tips

Blacklisting mac80211 driver version

If you have the file rtl8187.ko in the /lib/modules directory tree then you have two options to blacklist it. Failure to do this will mean that the ieee80211 r8187 module described on this page will fail to work properly. Here are the options:

Move the file to another area on your system as follows then do “depmod -ae”. Move /lib/modules/$(uname -r)/kernel/drivers/net/wireless/mac80211/rtl8187.ko to a safe place. The “$(uname -r)” and/or other parts of the path may be different for your distribution/system. Use “locate 8187.ko” or “find /lib/modules -name *8187*” to find the full path. After moving it, do “depmod -ae”.

Edit /etc/modprobe.d/blacklist and add “blacklist rtl8187” as a new line.

In both cases, reboot your system afterwards.

"sh wlan0up" fails

Running “sh wlan0up” fails.

Solution:
Make sure your ieee80211 stack is built as a module and remove all those modules. If it is integrated in the kernel, rebuild your kernel with a modular ieee80211 stack.

wlan0 device does not exist message

Trying to run “sh wlan0up” gives you an error of wlan0 device not existing. lsusb indicates that the wireless card is connected.

Solution:
You sometimes get this message when another driver, which also creates an wlanX interface is loaded before the r8187 driver. Examples: acx111, hostap and all mac80211 drivers. In such a case the rtl8187 device will be wlan1 or wlan2. Look at iwconfig to see if there is such an interface and use that one instead.

Change “/usr/src/kernels/2.6.18-1.2869.fc6-i686” to where your kernel sources are located and the your specific kernel and directory structure. You can use “uname -r” to help determine your exact kernel.

Solution: This typically occurs after you have upgraded your kernel version. Delete the all the patch files and install a fresh version. You should now be able to compile it successfully. Also ensure that you have matching kernel header files.

Low injection rates

Many people complain that they only get injection rates of about 50 packets per second. Here are few items which are known to cause this:

Using VMware Workstation 5.x or earlier. Be sure to use VMware Workstation 6 or above. The root cause is that older versions (< 6.0) use the old USB standard.

Using VMware Players earlier then version 2. Be sure to use VMware Player 2 or above. The root cause is that older versions (< 2.0) use the old USB standard.

Using pre-2.0 USB standard hardware. Make sure you are using hardware with support for USB 2.0.

Having legacy USB support enabled in your BIOS. Try disabling this option.

Note: VMWare Workstation > 6.0 and VMWare Player > 2.0 use USB 1.1 and when injecting at high speed, injection uses all USB bandwith (so, nearly no packets are received) and you can notice a lot of packets lost in airodump-ng.

Ubuntu 7.10 Info

Pre requirements

sudo -s
apt-get install build-essential
apt-get install libssl-dev

Delete old driverfiles

You have to check the path first, maybe you must replace this “2.6.22-14-generic”. To do this just look what kernel version you use.

sudo -s
uname -r

And then delete the files. Change “2.6.22-14-generic” to your specific kernel version. These should be either blacklisted or moved to backup directory, not destructively deleted, especially ieee80211.ko!

"asm/semaphore.h: No such file or directory" compile error message

Unmodified, you will get the following error :
– output from ' make ' :

...In file included from /usr/src/drivers/rtl8187_linux_26.1010.0622.2006/beta-8187/r8187_core.c:65:
/usr/src/drivers/rtl8187_linux_26.1010.0622.2006/beta-8187/r8187.h:47:27: error: asm/semaphore.h: No such file or directory

SKA is not currently supported with the RTL8187 driver. There is no known workaround.

WPA/WPA2 fails in managed mode

On recent kernels, the patched driver fails to work in normal WPA/WPA2 mode. In this case, use the patched ieee80211 driver for injection and use the mac80211 version for normal WPA/WPA2. In order to do this you will have to blacklist the unwanted module based what you plan to use your system for. IE For injection, blacklist the rtl8187 module. For WPA/WPA2, blacklist the r8187 module.