HARDWARE rtl8187
From Gentoo Linux Wiki
| Laptops • TV Tuner Cards • Wireless • Servers • Storage • Other Hardware • Motherboards • Related |
Contents |
[edit] Notes:
The RTL8187 driver is now in the 2.6.23 kernel. The following instructions refers to using the native kernel driver. Ndiswrapper is now useless.
This configuration is for the people who want to use WEP encryption. I have not tried WPA encryption.
NOTE: RTL8187B isnt the same like RTL8187L, this How To is designed for using the RTL8187L chip!
if need a native linux driver for your RTL8187B chip take a look here:
http://www.datanorth.net/~cuervo/rtl8187b/
there are three versions: rtl8187b-modified-jadams-2-1-2008.tar.gz works well with kernel-2.6.24
rtl8187b-modified-dist.tar.gz works only up to kernel-2.6.22
the unpatched version isnt tested by me, but seems only to work with older kernel!
[edit] Kernel configuration for native kernel method:
Before beginning, settings must be applied to the kernel configuration. For information on this see Configuring, compiling and installing the new kernel of http://www.gentoo.org/doc/en/kernel-upgrade.xml
- To configure it in kernel:
- Don't select Generic IEEE 802.11 Networking Stack (select the mac80211 version instead)
- Enable EEPROM 93CX6 support
- Choose Realtek 8187 USB support in Wireless LAN drivers
| Linux Kernel Configuration: Wifi |
General setup --->
[*] Prompt for development and/or incomplete code/drivers
Networking --->
[*] Networking support
Wireless --->
<*> Generic IEEE 802.11 Networking Stack (mac80211)
Device Drivers --->
[*] Misc Devices --->
<M> EEPROM 93CX6 support
Network device support --->
Wireless LAN --->
[*] Wireless LAN (IEEE 802.11)
<M> Realtek 8187 USB support
Cryptographic options --->
[*]Cryptographic API
<*>ARC4 cipher algorithm
Library routines
---CRC32 functions
|
[edit] Using and testing the driver
Now you can save your kernel config and start compiling. Don't forget to modify your /boot/grub/grub.conf if necessary. After reboot the module rtl8187 should be available. You can load it like this:
| Code: Inserting the module |
# modprobe rtl8187 |
In order to check if it has worked, run:
| Code: Checking... |
# 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
[edit] Configuring your wireless access
If everything is right, you should have two new interfaces: wlan0 and wmaster0 If you don't see wlan0 just run
ifconfig wlan0 up
To list all available wifi-networks just run
iwlist wlan0 scan
[edit] WEP Encryption
You can manually connect to a WEP encrypted acces point with the following commands:
| Code: Connecting to a WEP AP |
# iwconfig wlan0 mode managed # iwconfig wlan0 essid <your ESSID> # iwconfig wlan0 channel <ESSID channel> # iwconfig wlan0 enc s:<WEP key> open # dhcpcd wlan0 |
To automate things at startup , you can configure your wireless access at /etc/conf.d/net. /etc/conf.d/wireless can also be used but it is considered deprecated, so it is recommended to use /etc/conf.d/net.
The following example configures a WEP enabled access-point called "home" on channel 3 which password is "xxx". The file is also set to use DHCP to retrieve an IP address.
First of all, do this to make your wireless work when you boot up your Gentoo box, update the modules database and make "lo" interface works with wlan0
- ln -s /etc/init.d/net.lo /etc/init.d/net.wlan0
- rc-update add net.wlan0 default
- update-modules
| Code: /etc/conf.d/net |
essid_wlan0=( "home" ) channel_wlan0=( "3" ) key_home=( "s:xxx enc open" ) config_wlan0=( "dhcp" ) dhcpcd_wlan0="-I ''" |
Note: If you are using an hexadecimal WEP key (containing only 0 to 9 digits and A to F letters) instead, the key argument must be passed without s:
| Code: hexadecimal WEP key |
key_home=( "<hexa WEP key> enc open" ) |
[edit] WPA Encryption
To be completed!
[edit] Adding modules to boot:
At this point you should need to add these modules (or whatever you see fit) to /etc/modules.autoload.d/kernel-2.6:
rtl8187
Now reboot and hope that it works! It should talk about connecting using net.wlan0 during boot.
[edit] Troubleshooting and Tips:
[edit] Connection times out every time
According to Archlinux Wiki, if the connection always times out, you should set the rate of the card to 5.5M:
| Code: Setting the rate to 5.5M |
iwconfig wlan0 rate 5.5M auto |
In Gentoo, this can be automated at startup by adding the following line to your /etc/conf.d/net:
| Code: /etc/conf.d/net |
rate_wlan0=( "5.5M auto" ) |
[edit] Failed to initialize wep
If your card cannot be initialized due to an -12 error and you have error lines saying something like this:
| Code: dmesg |
wmaster0: Failed to initialize wep |
Be sure you compiled Generic IEEE 802.11 Networking Stack into kernel (and not as a module!)
| Linux Kernel Configuration: Wifi |
Networking --->
[*] Networking support
Wireless --->
<*> Generic IEEE 802.11 Networking Stack (mac80211)
|
