PDA

View Full Version : RTL8187 success



davfel
21st March 2007, 11:06 PM
Hi,

well here it is. This is the way that I have gotten the Realtek RTL8187 driver to work.

Step 1 : Add to modprobe.conf

gedit /etc/modprobe.conf

alias wlan0 r8187

Step 2: Remove existing ieee80211 stack modules

find /lib/modules/`uname -r` -name ieee80211

If this returns a result remove these file or copy them to a backup location, I used the rm command

Step 3: Install sourceforge RTL8187 drivers


I put them in a directory under my home directory

su -
Password:

cd /home
mkdir realtek
cd /home/realtek
svn co https://rtl-wifi.svn.sourceforge.net/svnroot/rtl-wifi

(**NOTE** very important- to use the svn command you MUST have subversion installed and I believe you can do that by yum install subverion)

Step 4: edit their Makefile

Step 3 makes a directory called rtl-wifi

cd /home/realtek/rtl-wifi
gedit Makefile

(comment out line 6)

//* obj-m += rtl818x-newstack/ *//

(goto to the end of file and add this line)

install:
$(MAKE) -C $(KSRC) M=$(PWD) modules_install


(then save the file)

the new Makefile will look like this >>>

ifneq ($(KERNELRELEASE),)

# kbuild part of makefile
obj-m += ieee80211/
obj-m += rtl8187-newstack/
//* obj-m += rtl818x-newstack/ *//


else

KVER := $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build

all: modules

clean:
$(MAKE) -C $(KSRC) M=$(PWD) clean

modules:
$(MAKE) -C $(KSRC) M=$(PWD) modules

install:
$(MAKE) -C $(KSRC) M=$(PWD) modules_install

endif


Step 5: compile driver and insert modules

make clean

make

make install

(this should compile and insert modules)

Step 6: Reboot

reboot

Step 7: Add driver to system-config-network

(At the top click on System Administration Network and type your password
(Click on New)
(Select Wireless Connection)
(Click Foward)
(r8187 (wlan0) should be there high light that and click Foward)
(Select Managed mode)
(Select Network (SSID) name specified button and enter you network name)
(Click Foward)
(Select Automatically obtain ip address with DHCP)
(check the box next to Automatically obtain DNS information from provider
(check the MTU box and set to 1500)
(Click Foward)
(Click Apply)
(check box next to wlan0 and click on ACTIVATE)
(go to Wireless settings tab and check your settings)
(go to General tab and check the box next to activate this device when computer starts)
(check other settings on this page they should be what you set them to)

Step 8:Reboot Again

(reboot and your connection should come up)

Hope this helps everyone

Also beware this driver is still some what buggy so it may hang your system

I am sure our friends at sourceforge will help us out with a more stable driver shortly

Good luck,
dave

davfel
21st March 2007, 11:18 PM
HI again,

Also I have this working in both the 2.6.18-1.2798 and 2.6.20-1.2925 kernels.
Please let me know if this works for you

thanks,
dave

davfel
21st March 2007, 11:39 PM
Hi,

One other thing I was getting alot of system freezes when I first installed this driver, I resolved this by removing all of the old driver files (*.ko) including the ieee80211 files

I have not had a freeze since doing that
I guess there are some conflicts going on here.
I would assume that our friends at sourceforge will fix these problems soon :)

Dave

tamathumper
29th March 2007, 03:58 PM
After several days of @#$! I do have partial success, many thanks to your directions, especially on how to update the MAKE file! I don't have any lockups yet, but I also don't have any Link light :D I have the activity light blinking on my CompUsa card which uses the RealTek 8185 chipset. Progress.

I have the activity light when I insmod the drivers manually, and I'm working on how to get that to work at bootup automatically (the alias command doesn't seem to work when added to modprobe.conf, and I don't know if the /etc/rc.d/rc.local will work with MEPISLite, but I'll keep trying.)

I can see the wlan0 interface, but I cannot seem to get a connection to an AP. I have several to choose from, with both simple WEP and also WPA-PSK with TKIP to choose from.

I did follow the instructions and remove the ieee80211 directory from /lib/modules/2.6.12-1-586tsc. Does it matter than the new drivers are under the 'extra' directory as opposed to the 'net' directory? Hopefully not, and apparently not, as my wired connection is still working? The MAKE file tried to add the new drivers under /lib/modules/2.6.12, so I moved them under /lib/modules/2.6.12-1-586tsc as that's the version of the kernel I'm booting.

Sorry, been in the IT biz a long time, but not expert with Linux yet. Any help would be tremendously appreciated!

tamathumper
29th March 2007, 04:26 PM
Just a quick confirmation -

'iwlist wlan0 scanning' returns two access points, with ESSID:"<hidden>" as they should be,

and iwconfig wlan0 returns the config of the wlan0 interface with the ESSID of my WEP network shown correctly, but with Access point: 00:00:00:00:00:00, and Encryption Key:off even though I have specified to enable it...

Any further suggestions?

ColinA
31st March 2007, 05:00 PM
Hi Dave. I followed you original post with kernel 2.6.20-1.2925 and it was ok up to the point when I did "make install" at which it gave the message "No rule to make install". However the various modules had been built so I used a modified version of the "wlan0up" file from the original Realtek driver package. This then iinstalled the modules and evrything worked. It still failed to install the modules at boot so I tried your old idea of copying the modules to /ib/modules and doing depmod -a. This fouled the whole thing up as the modules didn't load at boot and couldn't be loaded using insmod. Removing the modules from /lib/modules did not recoiver the situation. I have now ditched the 2925 kernel and it's dev package and installed 2933 which does work but I still have to run wlan0up manually. Still this is a big step forward, thanks for you persistance. Incidently how did you find the SVN package as I thought I had checked Sourceforge withiut finding anything usefull

ColinA
31st March 2007, 08:19 PM
In case anyone has the same problem as me here is the modified version of wlan0up:


#!/bin/sh

cd ieee80211/
insmod ieee80211_crypt-rtl.ko
insmod ieee80211_crypt_wep-rtl.ko
insmod ieee80211_crypt_tkip-rtl.ko
insmod ieee80211_crypt_ccmp-rtl.ko
insmod ieee80211-rtl.ko

cd ../rtl8187-newstack/
insmod r8187.ko

cd ../

ifconfig wlan0 up


Add this as a text file to rtl-wifi.

Run the shellscript from rtl-wifi with ./wlan0up

At the moment I have to do this at every boot (as su)

Colin

ColinA
1st April 2007, 11:48 AM
Hi all.
Further to my last message I have now got the wireless system to come up at boot time. I added the script shown in my last message to /etc/rc.d/rc.local with the addition of a line at the before the first cd " cd xxxx/rtl-wifi" so that it could find rtl-wifi. xxxx is wherever it is located.
Colin

davfel
3rd April 2007, 11:11 PM
hi all.
sorry for the felayed response I was away.
Glad to hear that you got things going colin but you should not have to run the script file at all.
if the modules are in the right directory the system will load them for you. then using system-config-network and checking the start up at boot time box will bring them up.

try that and let me know
dave

davfel
3rd April 2007, 11:34 PM
hi colin,

by changing the Makefile as shown above it takes away the "No rule to make install" error. then ut will install modules properly and if you put the "alias wlan0 r8187" in modprobe you should be able to get this device to show in the system-config-network.

try that amd let me know please
thanks,
good luck
dave

redger
4th April 2007, 12:22 AM
Hi guys,
Your discussions and instructions have been very helpful ..... I just seem to be technologically challenged :-(
I've installed the software ok on my Fedora 6 X86-64 machine, it all compiles ok and I can bring the service up (ifup wlan0) ok. I can also scan successfully using either iwlist or wifi-radar but i just cannot get it to connect and communicate successfully.
I've tried installing the modules in /lib/modules/'uname -r'/extra and I've tried loading them from the compile directory (using the above wlan0up script ... for which i've also created a mirror image wlan0down script)
I've tried executing the wlan0up script from /etc/rc.d/rc.local and I've tried executing it manually after logon.
Nothing seems to work .... I can successfully scan for networks, but can't connect to them.

Any advice gratefully received :-)

davfel
4th April 2007, 01:21 AM
hi redger,

I have not tried thid on x64 yet but soon I will be doing that. Also, I have tried with encryption but was not successful. I have heard that some are getting this to work but I do not believe the drivers support encryption quite yet. Can you gives us listings of iwscan list?

Thanks,
dave

redger
4th April 2007, 01:36 AM
Hi Dave,
thanks for your response

aha, the encryption may be the reason .... I have set 128 bit WEP encryption on

I'm at work at present and the machine is at home, so I'll send the iwscan info thru when I get home (in about 8 hours or so)
btw I'm using the latest version of the 64 bit FC6 kernel (as of Sunday April 1) ... can't remember the version

Regards
Rob

redger
4th April 2007, 10:53 AM
Success (once I disabled encryption ie. WEP and WAP) !

Running FC6 Kernel 2.6.20-1.2933.fc6 (x86-64) and Netgear WG111 v2 (USB 802.11g adapter)
The software compiles ok, tho I had to create empty file /usr/src/kernels/2.6.20-1.2933.fc6-x86_64/include/linux/config.h to get it to compile cleanly

After creating the network-config entry I updated /etc/sysconfig/networking/devices/ to look like this
# Realtek Semiconductor Co., Ltd. RTL-8187
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
GATEWAY=192.168.0.1
TYPE=Wireless
DEVICE=wlan0
BOOTPROTO=none
BROADCAST=192.168.0.255
#HWADDR=
HWADDR=00:11:3a:9e:a5:bd
NETMASK=255.255.255.0
NETWORK=192.168.0.0
#DHCP_HOSTNAME=192.168.0.1
DHCP_HOSTNAME=
IPADDR=192.168.0.18
DOMAIN=
ONBOOT=no
USERCTL=yes
IPV6INIT=no
PEERDNS=yes
ESSID=my_essid
CHANNEL=7
MODE=Managed
RATE=Auto
MTU=1500


Without WEP it now connects (tho it's a bit slow) and I'm writing this note using the connection

Here's the wlaln0up file
cd ieee80211/
insmod ieee80211_crypt-rtl.ko
insmod ieee80211_crypt_wep-rtl.ko
insmod ieee80211_crypt_tkip-rtl.ko
insmod ieee80211_crypt_ccmp-rtl.ko
insmod ieee80211-rtl.ko
cd ../rtl8187-newstack/
insmod r8187.ko
cd ../
depmod -a
/sbin/ifconfig wlan0 up

And here's the wlan0down file
/sbin/ifconfig wlan0 down
rmmod r8187
rmmod ieee80211-rtl
rmmod ieee80211_crypt_ccmp-rtl
rmmod ieee80211_crypt_tkip-rtl
rmmod ieee80211_crypt_wep-rtl
rmmod ieee80211_crypt-rtl
depmod -a

Both the up and down files are designe d to be executed (eg ./wlan0up) from the base directory from which the software was compiled.

Note sure how I'm going to secure this link and stop the link teenagers linking in ..... sadly my router doesn't support MAC address identification.

Thanks for your help ... it seems to be working ok ... better than using ndiswrapper with win98 drivers (and 32 bit OS). Hopefully the mass of detail will help someone

Regards
Rob

ColinA
4th April 2007, 12:03 PM
Hi Dave. In one of your previous messages you said that changing the makefile as above would allow the makefile to install the modules. I take it that you mean adding the line with make_install at the end. I did do this modification but got the error message I reported when I tried to"make install" The modules are in the directories where they were built. I already had the wireless lan entry set up in system config network as a left over from previously using the original Realtek driver with the old 2.6.18 kernel. The main thing now is that the wireless link is up and running as soon as the desktop comes up! I have now moved on to trying to get this machine to print to my old machines printers via Cups. This is another can(cup) of worms. For the record I am using WEP which was also set up on the old version and seems to have carried over! Thanks for your assistance

Colin

redger
4th April 2007, 01:50 PM
More success

It's now working with WEP

All I had to do was issue the following commend
iwconfig wlan0 key restricted s:YOUR.KEY.HERE

And now it's connecting to my router, using a WEP key, so I added the config command to the wlan0up command

davfel
5th April 2007, 12:52 AM
Hi Collin,

Actually it is 2 lines you have to add

install:
$(MAKE) -C $(KSRC) M=$(PWD) modules_install

and it should install the modules for you.

Sorry if I didn't state that right

Thanks and good luck,
Dave

teethlikelions
19th April 2007, 03:42 AM
i'm curious how your setups would work with aircrack-ng (aircrack-ng.org)?

i've got this dongle on my laptop (not fc) , but the cats on the messageboards there claim it is IMPOSSIBLE to associate with an ap using the rtl8187 drivers! i wonder if this is true in the case of this install, or if the aircrack-ng.org injection patch is what creates this issue.

anybody feel like aircracking their wep encrypted ap to see if this all works?
i'll certainly have to give it a test run when finals are over.... back to the milton book!

CRyN
28th July 2007, 05:26 PM
Thanx Davfel I finally have a working wireless connection! I was about to give up on Fedora and find distro that supported my hardware. I just don't have the time to play with settings at the mo. and your step by step realy saved me a lot of probs.

FlyingIsFun1217
5th September 2007, 01:57 AM
Nice guide!
But... :)

Coming from Ubuntu is hard, because it seemed to just work :P
But I'm willing to suffer :D

Anyway, I've gone through everything you have written, but my only snag is when I try to 'make install'. When I do this, I get a disheartening response telling me:


make: Nothing to be done for `install'.

Any suggestions?

FlyingIsFun1217

FlyingIsFun1217
5th September 2007, 09:27 PM
Nice guide!
But... :)

Coming from Ubuntu is hard, because it seemed to just work :P
But I'm willing to suffer :D

Anyway, I've gone through everything you have written, but my only snag is when I try to 'make install'. When I do this, I get a disheartening response telling me:

Any suggestions?

FlyingIsFun1217

A...aa...anybody?

FlyingIsFun1217

sideways
5th September 2007, 09:48 PM
try this link, the rtl8187 driver is patched for recent 2.6.22 kernels

http://www.aircrack-ng.org/doku.php?id=r8187

FlyingIsFun1217
5th September 2007, 10:34 PM
try this link, the rtl8187 driver is patched for recent 2.6.22 kernels

http://www.aircrack-ng.org/doku.php?id=r8187

Alright. I knew there might be problems because of a new wireless driver stack in the kernel. Didn't know for sure.

I know I tried this before, thought it didn't work. But I'm willing to try ;)

FlyingIsFun1217

FlyingIsFun1217
5th September 2007, 10:50 PM
Yep. Still doesn't work.

Seems that every time I try and connect to a network (mine is wep encrypted, I've tried with open networks though), NetworkManager just keeps asking over and over for the key. And now with the new driver, I don't even get the nice graphics in the signal bars when I click on the icon :P

Could this be anything with NetworkManager? I've tried with the system->administration->networking tool too, but to no avail.

Thanks!
FlyingIsFun1217

sideways
5th September 2007, 11:37 PM
Disable NetworkManager


chkconfig NetworkManager off
service NetworkManager stop

and configure manually using system-config-network (remember to set the adapter to start up on boot)

NetworkManager seems not to work with certain encrypted connections in F7, I had exactly the same problem, and this is how I fixed it.

FlyingIsFun1217
6th September 2007, 12:18 AM
Disable NetworkManager


chkconfig NetworkManager off
service NetworkManager stop

and configure manually using system-config-network (remember to set the adapter to start up on boot)

NetworkManager seems not to work with certain encrypted connections in F7, I had exactly the same problem, and this is how I fixed it.


bash: service: command not found

:(

Any reason why it has so much trouble? Would be great if this kinda stuff just 'worked' for users ;)

FlyingIsFun1217

sideways
6th September 2007, 01:21 AM
you need to be root, type 'su -' to become root.

FlyingIsFun1217
6th September 2007, 01:58 AM
you need to be root, type 'su -' to become root.

using sudo or becoming the root account won't help find the service program ;)

FlyingIsFun1217

sideways
6th September 2007, 03:49 AM
using sudo or becoming the root account won't help find the service program ;)

FlyingIsFun1217

yes it will, the /sbin/service script is installed by the initscripts package, a base package in the fedora install.

FlyingIsFun1217
6th September 2007, 12:18 PM
yes it will, the /sbin/service script is installed by the initscripts package, a base package in the fedora install.

Well, I'm simply stating my results then.
Becoming root doesn't help. I'll try just hard-linking to it.

FlyingIsFun1217

FlyingIsFun1217
6th September 2007, 12:25 PM
Well, it seems that after rebooting using 'chkconfig NetworkManager off', everything is as it should be.
Now when I go in to configure it in system-config-network, everything is set right (except for the disabled radio box for 'automatically assign IP', which I need.

When I go to activate it then, I get this:



Determining IP information for wlan0:1...SIOCSIFFLAGS: Cannot assign requested address
SIOCSIFFLAGS: Cannot assign requested address


I've even tried making a new 'profile' for the wireless card, so that it could automatically assign the IP, but I still get this :(

Thanks again!
FlyingIsFun1217

sideways
6th September 2007, 01:34 PM
Looking at the readme.txt it says to use the wlan0up script to connect. So disable start on boot and put 'sh <path to>/wlan0up' in /etc/rc.local, or run the script manually when you log in.

You can set the ip address manually with 'ifcfg wlan0 xxx.xxx.xxx.xxx'

FlyingIsFun1217
6th September 2007, 10:51 PM
Looking at the readme.txt it says to use the wlan0up script to connect. So disable start on boot and put 'sh <path to>/wlan0up' in /etc/rc.local, or run the script manually when you log in.

You can set the ip address manually with 'ifcfg wlan0 xxx.xxx.xxx.xxx'

I'm hoping this works, but I can't say.

Could you point me in the direction of setting the wireless card to connect to xyz essid with wep key xxxx-xxxx-xx?

Thanks again!
FlyingIsFun1217

sideways
6th September 2007, 11:03 PM
I'm hoping this works, but I can't say.

Could you point me in the direction of setting the wireless card to connect to xyz essid with wep key xxxx-xxxx-xx?

Thanks again!
FlyingIsFun1217

set the ip address, subnet, gateway ip (your router's) essid and wep key from the system-config-network-gui, for wlan0 (but disable auto startup on boot by unchecking the relevant checkbox). Then (as root) run 'sh wlan0up' in the driver directory (There's also a dhcp script if you decide not to use a static ip) it's all in readme.txt

FlyingIsFun1217
6th September 2007, 11:42 PM
Then (as root) run 'sh wlan0up' in the driver directory

:(


sh '/home/tanner/rtl8187_linux_26.1010.0622.2006/wlan0up'
/home/tanner/rtl8187_linux_26.1010.0622.2006/wlan0up: line 3: cd: ieee80211/: No such file or directory
insmod: can't read 'ieee80211_crypt-rtl.ko': No such file or directory
insmod: can't read 'ieee80211_crypt_wep-rtl.ko': No such file or directory
insmod: can't read 'ieee80211_crypt_tkip-rtl.ko': No such file or directory
insmod: can't read 'ieee80211_crypt_ccmp-rtl.ko': No such file or directory
insmod: can't read 'ieee80211-rtl.ko': No such file or directory
/home/tanner/rtl8187_linux_26.1010.0622.2006/wlan0up: line 10: cd: ../beta-8187/: No such file or directory
insmod: can't read 'r8187.ko': No such file or directory

I'm doing this as root too :/

FlyingIsFun1217

sideways
6th September 2007, 11:50 PM
You need to run it in the script's directory, or amend the script to point to absolute paths.

If it still can't find the kernel modules, then the compile must have been unsuccessful. The last time I used this driver in 64bit was with a 2.6.20 kernel, so can't comment on it's reliability now.

FlyingIsFun1217
7th September 2007, 12:24 PM
Ok, going into the directory as root let me use wlan0up.
Now when I go to Activate it using the networking gui, I just get a message saying:


/sbin/ifup: configuration for wlan0 not found.
Usage: ifup <device name>

So... does this mean that it can't find the wlan0dhcp file? I do need to use dhcp.

Thanks for sticking in there :)
FlyingIsFun1217

pmadade
5th June 2008, 08:53 PM
i have been tring to get this wireless card realtek 8187 to work with my f8 install but it is not happening. i know i need help cause i,m thinking about sticking with windows :0
ok heres the situation i've tried ndiswrapper several times and got nothing i came close one time with the tutorial on this page http://forums.fedoraforum.org/archi...p/t-151020.html and i got it to scan but i had to do a reinstall and now. i get to step 3 modify the Makefile then when i try to do the make clean command i get :
make -C /lib/modules/2.6.23.1-42.fc8/build M=/home/realtek/rtl-wifi clean
make: *** /lib/modules/2.6.23.1-42.fc8/build: No such file or directory. Stop.
make: *** [clean] Error 2
any help would be greatly appreciated. been stuck in the mud for a minute.