Rtl8187 vs r8187

From BackTrack Linux
Jump to: navigation, search

RTL8187 (new mac80211 driver)

This driver is considered stable and working with most aircrack-ng attacks and is loaded by default.

  • To manually load the driver
root@bt:~# modprobe rtl8187
  • To manually unload the driver
root@bt:~# rmmod rtl8187
  • To manually unload all the mac80211 stack:
root@bt:~# rmmod mac80211
root@bt:~# rmmod cfg80211
root@bt:~# rmmod rfkill

SIOCSIFFLAGS Unknown error 132

In VMware environments, this driver has a tendency to switch itself off, often resulting in errors such as "rtl8187: wireless radio switch turned off", "ioctl(SIOCSIFFLAGS) failed: Unknown error 132" and "rtl8187 - [phy0]SIOCSIFFLAGS: Unknown error 132" (for the benefit of Google).

  • Plug in your USB wireless card into BackTrack.
  • Wait for a few seconds, and type: dmesg| tail -20
root@bt:~# dmesg |tail -20
lo: Disabled Privacy Extensions
eth0: no IPv6 routers present
usb 1-1: new high speed USB device using ehci_hcd and address 2
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: World regulatory domain updated:
   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
phy0: Selected rate control algorithm 'minstrel'
phy0: hwaddr 00:c0:ca:38:ab:9d, RTL8187vB (default) V1 + rtl8225z2, rfkill mask 2
rtl8187: Customer ID is 0xFF
Registered led device: rtl8187-phy0::radio
Registered led device: rtl8187-phy0::tx
Registered led device: rtl8187-phy0::rx
rtl8187: wireless switch is on
usbcore: registered new interface driver rtl8187
rtl8187: wireless radio switch turned off
root@bt:~#
  • Notice that rfkill has disabled the wireless card. That's the problem.
  • Use the following commands to force the card into an enabled state:
root@bt:~# rmmod rtl8187
root@bt:~# rfkill block all
root@bt:~# rfkill unblock all
root@bt:~# modprobe rtl8187
root@bt:~# rfkill unblock all
root@bt:~# ifconfig wlan0 up
  • Hopefully, the card should be working normally now. You will need to do this every time you plug in your card.

R8187 (old IEEE driver)

If for some reason the rtl8187 drivers fail to work, you can use the IEEE r8187 legacy driver.

  • Unload the new mac80211 rtl8187 driver and stack if loaded
root@bt:~# rmmod rtl8187
root@bt:~# rmmod mac80211
root@bt:~# rmmod cfg80211
Loot@bt:~# rmmod rfkill
  • load the IEEE r8187 driver
root@bt:~# modprobe r8187

Problems with the r8187 legacy driver

In some cases, the r8187 driver fails to load with a following dmesg error

Linux kernel driver for RTL8187 based WLAN cards
Copyright (c) 2004-2005, Andrea Merello
rtl8187: Initializing module
rtl8187: Wireless extensions version 22
rtl8187: Initializing proc filesystem
rtl8187: Enabling 14 channels.
rtl8187: MAC chip version: 00
rtl8187: Card type: F1
rtl8187: Reported EEPROM chip is a 93c56 (2Kbit)
rtl8187: Card MAC address is 00:68:04:1e:04:1e
rtl8187: RF Chip ID: 2C
rtl8187: WW:Unknown RF module 2c
rtl8187: WW:Exiting...
rtl8187: Initialization failed
rtl8187: wlan driver load failed
usbcore: registered new interface driver rtl8187
root@bt:~# 

If you get this, VMware hates you, and you're screwed.