分类: LINUX
2011-02-24 19:50:53
This page describes how to get the rtl8187 wifi-driver working
Note: The rtl8187 driver is in the kernel (thus the driver comes with the kernel26 package)
The rtl8187 chip is made for usb-cards/dongles
It supports 802.11(a)/b/g and the following encryptions: WEP, WPA and WPA2
The driver's source is released under the GPL
Contents []
|
Make sure that you have loaded the rtl8187 module with
modprobe rtl8187Then run
dmesg | grep rtl8187If you see that line everything should be OK
Using the driverIf everything is right, you should have two new interfaces: wlan0 and wmaster0 If you don't see wlan0 just run
ifconfig wlan0 upTo list all available wifi-networks just run
iwlist wlan0 scanFor more information about configuring your wifi-network see here:
What to do if your connection always times out? Method 1: Lowering the transfer rate manuallyThe solution can be found in this thread:
Just set the rate to 5.5
iwconfig wlan0 rate 5.5M autoActually this worked for a while but it would still start revving out, so making the last item "fixed" ensures it does not spin. Btw. If your wireless card has already gone into meltdown issuing this command will get it working again.
iwconfig wlan0 rate 5.5M fixedI have also tried setting this in the IWOPTS, but it does not seem to be taking, so now what I do until I get this sorted out is:
netcfg2 -cAnd then it never times out (at least for me)
Found the $POST_UP option, so appending this to your profile config file, sets the rate correctly when using the netcfg tools.
POST_UP="iwconfig wlan0 rate 5.5M fixed"Actually for my card setting the rate higher still works, so now this line looks like:
POST_UP="iwconfig wlan0 rate 12M fixed"Now calling;
netfcg2 -cor
netcfg-menuand choosing your profile works without extra commands.
Method 2: Aircrack-ng patched driverAnother method that works for some users are the Aircrack-ng patches for the rtl8187 driver. This driver can be installed by the package from .
Method 3: Using NdiswrapperIf everything else fails, then you are left with using Ndiswrapper. Ndiswrapper takes Windows RTL8187 drivers and uses them to enable your card.
Symptoms which suggest you may have better luck with Ndiswrapper:
1. Install ndiswrapper:
pacman -S ndiswrapper2. Download the Windows drivers:
wget3. Extract the drivers:
gzip -dc ndisdrivers.tar.gz | tar xf -4. If you have the rtl8187 module loaded, then do this:
rmmod rtl8187It is suggested that you remove previous ndiswrapper drivers, if you have installed them.
ndiswrapper -lAlso add "ndiswrapper" and "!rtl8187" to /etc/rc.conf under MODULES - this will stop rtl8187 from loading on boot, and will enable ndiswrapper to load on boot.
5. Install the driver: If you have an older kernel(eg. older than 2.6.28.*), do:
cd ./ndisdrivers/Win98-krnl24/If you have a newer kernel (eg. 2.6.28.*), do:
cd ./ndisdrivers/Win98seME-krnl28/Proceed with:
ndiswrapper -i net8187b.inf为了管理已经安装好的无线驱动,并且使无线能正常工作,需要安装一个无线连接管理工具。下面章节将帮助您确定一个最佳管理方法。
过程和需要使用的工具,将依赖于下面几个因素:
The Wired Equivalent Privacy encryption scheme was introduced in 1997. But the discovery of weaknesses in the WEP algorithm in 2001 have made it a poor choice of wireless security protocol. Some tools, such as aircrack, can break the WEP protection in a couple of seconds. Despite this issue, WEP is still popular and the default encryption scheme in many commercial wireless routers.
WPA/WPA2The Wi-Fi Protected Access security protocol was created in response to the WEP weaknesses. WPA and especially WPA2, which uses the AES encryption algorithm, are considered secure. Wi-Fi certified devices must now provide WPA2. Several modes of authentication are supported by WPA/WPA2: a PSK mode (Pre-Shared Key) designed for home and small office use, and an Enterprise (EAP) mode, which requires an authentication server. The following instructions will only cover the PSK method.
管理方法选择This table shows the different methods that can be used to activate and manage a wireless network connection, depending on the encryption and management types, and the various tools that are required. 虽然还有其他办法,但这通常是最常使用的:
管理方法 | No encryption/WEP | WPA/WPA2 PSK |
---|---|---|
手动, 需要每次系统启动重做一次 | ifconfig + iwconfig + dhcpcd/ifconfig | ifconfig + iwconfig + wpa_supplicant + dhcpcd/ifconfig |
自动管理, centralized without network profile support | define interface in /etc/rc.conf | not covered |
自动管理, with network profiles support | Netcfg, wicd, NetworkManager, etc… |
无论选的那个方案,最好先尝试手动方法。这将有助于您了解不同步骤的意义,并在出问题时解决之。 Another tip: if possible
(e.g. if you admin your wifi access point), try connecting with no
encryption, to check everything works. Then try using encryption, either
WEP (simpler to configure) or WPA.
软件包 wireless_tools 提供的程序是建立一个无线连接的基础工具。如果你需要使用WPA/WPA2 encryption, 您还需要软件包wpa_supplicant。 These powerful userspace console tools work extremely well and allow complete, manual control from the shell.
These examples assume your wireless device is wlan0. Replace wlan0 with the appropriate device name.
1. (可选,可能需要) 一些无线网卡在使用wireless_tools前需要激活kernel interface:
# ifconfig wlan0 up2. (可选,可能需要) See what access points are available:
# iwlist wlan0 scanWe assume you want to use the essid named MyEssid.
3. Depending on the encryption, you need to associate your wireless device with the access point to use and pass the encryption key.
using an hexadecimal key:
# iwconfig wlan0 essid "MyEssid" key 1234567890using an ascii key:
# iwconfig wlan0 essid "MyEssid" key s:asciikeyYou need to edit the /etc/wpa_supplicant.conf file as described in . Then, issue this command:
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.confThis is assuming your device uses the wext driver. If this does not work, you may need to adjust these options. Check for more information and troubleshooting.
4. Finally, provide an IP address to the network interface. Simple examples are:
# dhcpcd wlan0for DHCP, or
# ifconfig wlan0 192.168.0.2 # route add default gw 192.168.0.1for static IP.
For example:
# /etc/rc.conf eth0="dhcp" wlan0="dhcp" wlan_wlan0="wlan0 essid MyEssid" # Unencrypted #wlan_wlan0="wlan0 essid MyEssid key 1234567890" # hex WEP key #wlan_wlan0="wlan0 essid MyEssid key s:asciikey" # ascii WEP key INTERFACES=(eth0 wlan0)并不是所有的无线网卡都是wlan0. 你可以用ifconfig -a来查看你的网络接口。举个例子:如果你的无线网络接口是ath0的话,你就应该把wlan_wlan0 改成wlan_ath0:
wlan_ath0="ath0 essid MyEssid key 12345678"把ath0加入INTERFACES= 行,替换wlan0.)
provides a versatile, robust and fast solution to networking on Arch.
It uses a profile based setup and is capable of detection and connection to a wide range of network types. This is no harder than using graphical tools. Following the directions above, you can get a list of wireless networks. Then, as with graphical tools, you will need a password.
Occasionally, you have to properly at first, if you want to use an encrypted wireless connection (eg: wep, wpa, wpa2, etc.) in netcfg, because netcfg package depends on wpa_supplicant.
详细文档: 开发中版本的详细文档: Network Profiles development
下面还有一系列的替代方案:
wireless-tools这些强大的控制台工具十分有效而且能够实现完全的、手工的控制。这些例子假设你的无线设备是wlan0。将wlan0换成你自己的设备名称。 很多网卡需要你的核心接口是打开的,这样你才能使用无线工具:
ifconfig wlan0 up扫描可用接入口:
iwlist wlan0 scan利用扫描结果,告诉你的无线设备去用哪一个接入口。例如:
iwconfig wlan0 essid linksys然后像平时一样设置网络接口。简单的例子如下:
dhcpcd wlan0或者
ifconfig wlan0 192.168.0.2 route add default gw 192.168.0.1 NetworkManager除了能管理有限链接,NetworkManager还提供了一个易于使用的图形界面程序来选择你想要的的无线移动链接。
详情请见 。
WicdWicd 是一个网络管理工具,能够同时管理无线和有线连接。程序是用Python 和 Gtk写的,比NetworkManager对依赖的要求 更少, 非常适合轻量级桌面用户。 Wicd 现在已经被放在extra里面,有适合 i686和x86_64的版本。
想了解更多,请阅读 的wiki.
AutowifiAutowifi is a daemon that configures your wireless network automatically depending on the ESSID. Once configured, no user interaction is necessary and no GUI tools are required.
For more information, see the wiki.
Wifi RadarWiFi Radar是一个Python/PyGTK2的管理无线配置的程序(只有无线的)。它能够扫描可用的网络、为你所选择的网络创建新的配置。
详情请见。
WlassistantWlassistant是一个非常简单直观的图形界面无线网连接管理程序。 安装方法如下:
pacman -S wlassistantWlassistant必须以root权限运行:
sudo wlassistant一种使用wlassistant管理/etc/rc.conf里面有的无线网卡的方法是指出你经常使用的链连接点。开机后你的网卡就会自动连接到这 个essid,但是如果其他的无线网络是需要的/可用的,wlassistant在那时会请求连入它们。通过在名称前加一个@来后台运行/etc /rc.conf中的network守护程序来减少开机等待时间。
其他资源Proceed to connect as you normally would.