2009年6月9日 星期二

Wireless USB Network Card WIFI-Link WL-USB-RSMA-27 on Arch Linux

when you plug the card into the usb slot, arch linux will modprobe rtl8187 module automatically. the driver is mac80211 based. then you can see interface wlan0 registered. it is pity it doesn't work with WIFI-Link WL-USB-RSMA-27 though aircrack-ng indicates 2.6.27 and newer kernel contain a fully-functional driver for rtl8187b and rtl8187l. so we got to compile the module by ourselves

some errors cause the newest driver rtl8187_linux_26.1025.0328.2007 cannot be compiled on arch linux and modern distributions. fortunately aircrack-ng has a patch for compiling the old driver rtl8187_linux_26.1010.0622.2006

1. unload rtl8187 module

rmmod rtl8187

wlan0 should be disappeared

2. download the old one

wget http://dl.aircrack-ng.org/drivers/rtl8187_linux_26.1010.zip

3. unzip

7z x rtl8187_linux_26.1010.zip

4. change to the extracted directory

cd rtl8187_linux_26.1010.0622.2006

5. download the patch

wget http://patches.aircrack-ng.org/rtl8187_2.6.27.patch

6. extract some components

tar xzf drv.tar.gz
tar xzf stack.tar.g

7. apply patch to source code

patch -Np1 -i rtl8187_2.6.27.patch

8. one more step to pass through compiling

vi beta-8187/r8187.h
--
change
#include <asm/semaphore.h>
to
#include <linux/semaphore.h>

9. compile and install

make && make install

i know the interface name would be wlan0 after new installed module r8187 loaded. so i write wlan0 directly in the following steps

10. if you need to load settings while booting, wlan_<interface>= in rc.conf isn't working. so i pick rc.local for use

vi /etc/rc.local
--

iwconfig wlan0 essid <ESSID> mode Ad-Hoc key 1234567890
ifconfig wlan0 up <IP> netmask <MASK>

remember to install wireless_tools package before iwconfig. and if you need sharing ppp connection with wlan interface, set mode to Ad-Hoc. although iwconfig supports Master, Repeater mode. only Ad-Hoc and Managed modes work on WL-USB-RSMA-27

11. block old rtl8187 and load new r8187 module when booting

vi /etc/rc.conf
--

..
MODULES=(r8187 !rtl8187)
..

12. reboot then done

沒有留言: