Difference between revisions of "Rtl8187 wireless"

From ArchWiki
Jump to: navigation, search
(What to do if your connection always times out?)
Line 4: Line 4:
 
This page describes how to get the '''rtl8187''' wifi-driver working
 
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)
+
Note: The rtl8187 driver is in the kernel (thus the driver comes with the linux package)
  
  
Line 33: Line 33:
 
For more information about configuring your wifi-network see here: [http://wiki.archlinux.org/index.php/Wireless_Setup#Setup_and_Boot http://wiki.archlinux.org/index.php/Wireless_Setup#Setup_and_Boot]
 
For more information about configuring your wifi-network see here: [http://wiki.archlinux.org/index.php/Wireless_Setup#Setup_and_Boot http://wiki.archlinux.org/index.php/Wireless_Setup#Setup_and_Boot]
  
== What to do if your connection always times out? ==
+
= What to do if your connection always times out? =
  
 
The open source driver suffers from a lot of tx excessive retries and invalid misc errors for some unknown reason, resulting in a lot of packet loss and it keeps disconnecting, some times instantly.
 
The open source driver suffers from a lot of tx excessive retries and invalid misc errors for some unknown reason, resulting in a lot of packet loss and it keeps disconnecting, some times instantly.
  
=== Method 1: Lowering the transfer rate manually ===
+
==Adjusting with iwconfig options==
 +
 
 +
=== Lowering the rate ===
  
 
The solution can be found in this thread: http://bbs.archlinux.org/viewtopic.php?pid=299642
 
The solution can be found in this thread: http://bbs.archlinux.org/viewtopic.php?pid=299642
Line 44: Line 46:
 
  iwconfig wlan0 rate 5.5M auto
 
  iwconfig wlan0 rate 5.5M auto
  
Fixed option should ensure, however, it doesn't change the rate on its own making the connection a bit more stable:
+
Fixed option should ensure, however, it doesn't change the rate on its own, thus making the connection a bit more stable:
  
 
  iwconfig wlan0 rate 5.5M fixed  
 
  iwconfig wlan0 rate 5.5M fixed  
 
I 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 -c <your wireless profile>
 
  iwconfig wlan0 rate 5.5M fixed
 
  
 
Alternativelly find the $POST_UP option and append the above options to your profile config file:
 
Alternativelly find the $POST_UP option and append the above options to your profile config file:
Line 67: Line 65:
 
and choosing your profile works without extra commands.
 
and choosing your profile works without extra commands.
  
 
+
=== Lowering the txpower ===
 
+
=== Method 2: Lowering the txpower ===
+
  
 
You can try lowering the transmit power as well. This may save power as well:
 
You can try lowering the transmit power as well. This may save power as well:
Line 77: Line 73:
 
or even as low as 0. Valid settings are from 0 to 20, auto and off for the stock kernel driver.
 
or even as low as 0. Valid settings are from 0 to 20, auto and off for the stock kernel driver.
  
 +
=== Setting rts and fragmentation thresholds ===
  
 +
Default iwconfig options have rts and fragmentation thresholds off. These options are particularly useful when there are many adjacent APs or in a noisy environment.
  
=== Method 3: Aircrack-ng patched driver ===
+
The minimum value for fragmentation value is 256 and maximum is 2346. In many windows drivers the maximum is the default value:
 +
 
 +
iwconfig wlan0 frag 2346
 +
 
 +
For rts minimum is 0, maximum is 2347. Once again windows drivers use maximum as the default:
 +
 
 +
iwconfig wlan0 rts 2347
 +
 
 +
== The aircrack-ng patched driver ==
  
 
{{Note|Note that this driver only works on kernel26}}
 
{{Note|Note that this driver only works on kernel26}}
Line 87: Line 93:
 
Since the above package is outdated as of 11/08/11 you can try installing the [https://aur.archlinux.org/packages.php?ID=51272 linux-aircrack] patched kernel instead from [[AUR]] or the precompiled package from the [https://wiki.archlinux.org/index.php/Unofficial_User_Repositories adslgr32] unofficial repository
 
Since the above package is outdated as of 11/08/11 you can try installing the [https://aur.archlinux.org/packages.php?ID=51272 linux-aircrack] patched kernel instead from [[AUR]] or the precompiled package from the [https://wiki.archlinux.org/index.php/Unofficial_User_Repositories adslgr32] unofficial repository
  
 
+
== Using Ndiswrapper ==
 
+
=== Method 4: Using Ndiswrapper ===
+
  
 
If everything else fails, then you are left with using Ndiswrapper. Ndiswrapper takes Windows RTL8187 drivers and uses them to enable your card.
 
If everything else fails, then you are left with using Ndiswrapper. Ndiswrapper takes Windows RTL8187 drivers and uses them to enable your card.
  
1. Install ndiswrapper:
+
'''Install ndiswrapper'''
 
  pacman -S ndiswrapper
 
  pacman -S ndiswrapper
  
2. Download the Windows drivers:
+
'''Download the Windows drivers'''
 
  wget [http://db.tt/4NB0HbF6 http://db.tt/4NB0HbF6]
 
  wget [http://db.tt/4NB0HbF6 http://db.tt/4NB0HbF6]
  
3. Extract the drivers:
+
'''Extract the drivers'''
 
  unzip ndiswrapper.zip
 
  unzip ndiswrapper.zip
  
4. If you have the rtl8187 module loaded, then do this:
+
'''Unload the rtl8187 module'''
 
  modprobe -r rtl8187
 
  modprobe -r rtl8187
  
5. Install the driver:
+
'''Remove any previously installed drivers (if any)'''
 
+
If you have any previous drivers installed that may or may not have failed remove them:
+
  
 
  ndiswrapper -r net8187b
 
  ndiswrapper -r net8187b
  
Install the new drivers:
+
'''Install the new drivers'''
  
 
  ndiswrapper -i ./ndiswrapper/net8187b.inf
 
  ndiswrapper -i ./ndiswrapper/net8187b.inf
Line 117: Line 119:
 
  ndiswrapper -m
 
  ndiswrapper -m
  
Make sure that it is installed:
+
'''Make sure that it is installed'''
  
 
  ndiswrapper -l
 
  ndiswrapper -l
  
Try now loading the module
+
'''Try now loading the module'''
  
 
  modprobe ndiswrapper
 
  modprobe ndiswrapper
  
Kernel log shouldn't indicate any errors:
+
'''Kernel log shouldn't indicate any errors'''
  
 
  dmesg | tail
 
  dmesg | tail
  
If all steps are successful it should be now visible in the iwconfig interfaces list:
+
'''If all steps are successful it should be visible now in the iwconfig interfaces list'''
  
 
  iwconfig
 
  iwconfig
  
6. Add ndiswrapper to the MODULES array in /etc/rc.conf  
+
'''Add ndiswrapper to the MODULES array in /etc/rc.conf'''
  
 
  MODULES=(... powernow-k7 ndiswrapper ...)
 
  MODULES=(... powernow-k7 ndiswrapper ...)
  
7. Blacklist '''rtl8187''' in /etc/modprobe.conf.d/rtl8187.conf
+
'''Blacklist ''rtl8187'' in /etc/modprobe.conf.d/rtl8187.conf'''
  
 
  blacklist rtl8187
 
  blacklist rtl8187
  
 
Proceed to connect as you normally would.
 
Proceed to connect as you normally would.
 +
 +
{{Note|You may still have issues with disconnections, but in this case setting rates, rts and fragmentation thresholds actually work}}
  
 
=Misc Links=
 
=Misc Links=
 
*[http://rtl-wifi.sourceforge.net/ Project-page of the rtl-wifi driver project]
 
*[http://rtl-wifi.sourceforge.net/ Project-page of the rtl-wifi driver project]
 
*[http://aircrack-ng.org/doku.php?id=r8187 Aircrack-ng information and tweaks for rtl8187 chips]
 
*[http://aircrack-ng.org/doku.php?id=r8187 Aircrack-ng information and tweaks for rtl8187 chips]

Revision as of 09:29, 10 November 2011

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

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 linux 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

Using and testing the driver/Troubleshooting

Make sure that you have loaded the rtl8187 module with

modprobe rtl8187

Then run

dmesg | grep rtl8187
You should see some output like this
 usbcore: registered new interface driver rtl8187 

If you see that line everything should be OK

Using the driver

If everything is right, you should have two new interfaces: wlan0 and wmaster0 If you do not see wlan0 just run

ifconfig wlan0 up

To list all available wifi-networks just run

iwlist wlan0 scan

For more information about configuring your wifi-network see here: http://wiki.archlinux.org/index.php/Wireless_Setup#Setup_and_Boot

What to do if your connection always times out?

The open source driver suffers from a lot of tx excessive retries and invalid misc errors for some unknown reason, resulting in a lot of packet loss and it keeps disconnecting, some times instantly.

Adjusting with iwconfig options

Lowering the rate

The solution can be found in this thread: http://bbs.archlinux.org/viewtopic.php?pid=299642

Just set the rate to 5.5

iwconfig wlan0 rate 5.5M auto

Fixed option should ensure, however, it doesn't change the rate on its own, thus making the connection a bit more stable:

iwconfig wlan0 rate 5.5M fixed 

Alternativelly find the $POST_UP option and append the above options to your profile config file:

   POST_UP="iwconfig wlan0 rate 5.5M fixed"

Try various rates until you get the optimal setting, with no disconnection. In this case 12Mbits, as shown bellow:

   POST_UP="iwconfig wlan0 rate 12M fixed"

Now calling;

   netfcg2 -c <wireless profile>

or

  netcfg-menu 

and choosing your profile works without extra commands.

Lowering the txpower

You can try lowering the transmit power as well. This may save power as well:

iwconfig wlan0 txpower 5

or even as low as 0. Valid settings are from 0 to 20, auto and off for the stock kernel driver.

Setting rts and fragmentation thresholds

Default iwconfig options have rts and fragmentation thresholds off. These options are particularly useful when there are many adjacent APs or in a noisy environment.

The minimum value for fragmentation value is 256 and maximum is 2346. In many windows drivers the maximum is the default value:

iwconfig wlan0 frag 2346

For rts minimum is 0, maximum is 2347. Once again windows drivers use maximum as the default:

iwconfig wlan0 rts 2347

The aircrack-ng patched driver

Note: Note that this driver only works on kernel26

Another method that works for some users are the Aircrack-ng patches for the rtl8187 driver. This driver can be installed by the rtl8187-ng package from AUR.


Since the above package is outdated as of 11/08/11 you can try installing the linux-aircrack patched kernel instead from AUR or the precompiled package from the adslgr32 unofficial repository

Using Ndiswrapper

If everything else fails, then you are left with using Ndiswrapper. Ndiswrapper takes Windows RTL8187 drivers and uses them to enable your card.

Install ndiswrapper

pacman -S ndiswrapper

Download the Windows drivers

wget http://db.tt/4NB0HbF6

Extract the drivers

unzip ndiswrapper.zip

Unload the rtl8187 module

modprobe -r rtl8187

Remove any previously installed drivers (if any)

ndiswrapper -r net8187b

Install the new drivers

ndiswrapper -i ./ndiswrapper/net8187b.inf
ndiswrapper -m

Make sure that it is installed

ndiswrapper -l

Try now loading the module

modprobe ndiswrapper

Kernel log shouldn't indicate any errors

dmesg | tail

If all steps are successful it should be visible now in the iwconfig interfaces list

iwconfig

Add ndiswrapper to the MODULES array in /etc/rc.conf

MODULES=(... powernow-k7 ndiswrapper ...)

Blacklist rtl8187 in /etc/modprobe.conf.d/rtl8187.conf

blacklist rtl8187

Proceed to connect as you normally would.

Note: You may still have issues with disconnections, but in this case setting rates, rts and fragmentation thresholds actually work

Misc Links