As I’ve mentioned in previous articles (Linux, Ubuntu and Me; Ubuntu, Stage One; and Ubuntu, Stage Two) my network is wireless using a USB dongle that I insist on keeping in the set up.
I have several reasons for this: all my upgrade slots are filled (AGP has video card, PCI has Soundblaster Live! and WinTV cards) and running cables would require a large amount of cat-5 wiring strung across several doorways, ceilings and down a flight of stairs. Ugly, time consuming and annoying to say the least. The current dongle I have works excellent (better than my old PCI card in fact) and came at a decent price.
The catch is that the Linux drivers for the RTL8187 chipset don’t include the B model. It’s functionally compatible, just not recognized by the driver. Lucky for me, someone did some correspondence with RealTek and found out what codes to enter into the driver to correct this. Furthermore they provided him with the source code, allowing him to make the appropriate changes. The source package is freely available for download.
Compiling the drivers was simple – as per RealTek’s README included in the files, the only caveat I encountered was that WPA encryption doesn’t seem to work (WEP 64 and 128 do) and it doesn’t automatically load on startup. I live in the suburbs and can get away with 128 bit encryption, so I can compromise on this point. By adding pre-up /{path to drivers}/wlan0up
to /etc/network/interfaces just before the first wlan0 line (iface wlan0 inet dhcp
on my system) it works perfectly. I reboot, and it just connects. Voila!
As a footnote, I’d like to mention that all my previous posts on this matter where made on my Windows XP laptop (which has to stay that way since it’s used at / owned by work) but this is the first post made with my newly configured Ubuntu system.
This ic cool.
I have been looking for something like this for my a210 laptop.
Unfortunately i get the following error when i ./makedrv
rm -fr *.mod.c *.mod *.o .*.cmd *.mod.* *.ko *.o *~
make -C /lib/modules/2.6.23.1-42.fc8/build M=/root/rtl8187b-modified/ieee80211 CC=gcc modules
make: *** /lib/modules/2.6.23.1-42.fc8/build: No such file or directory. Stop.
make: *** [modules] Error 2
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
make -C /lib/modules/2.6.23.1-42.fc8/build M=/root/rtl8187b-modified/rtl8187 CC=gcc modules
make: *** /lib/modules/2.6.23.1-42.fc8/build: No such file or directory. Stop.
make: *** [modules] Error 2
linux newbie here but i am guessing its because i am running fedora 8 ???
jim
It looks like your kernel version is too old. If you type uname -r on the command prompt it will tell you what version you are using. If you do have a 2.6.x kernel, make sure you have the kernel sources package installed and you may need to have super user access to compile the module.
Hope this helps.
Thanks Brian,
The kernel was a 2.6.x kernel (I have in fact recently updated it to a more recent one)
The issue as you suggested was to do with the kernel source not being installed. A whole headache in itself but know sorted and I have been able to make the the driver.
It would seem the card is now working under linux as iwlist wlan0 scan reveals all the access points in the area, however I cannot connect to the desired network.
I have tried iwconfig wlan0 essid “my ap name” and iwconfig wlan0 ap “ap mac code”
But no joy.
Should i be able to see the card in system>admin>network and set things up from there ?
Cheers
Jim
I’m not at my Linux system at the moment, so I will have to check this evening as to what commands to issue, however something to bear in mind is the encryption. If you can, for testing purposes disable the network protection temporarily to see if you can connect.
Also of note is that I was never able to get it to work with WPA, only WEP.
Thanks Brian I appreciate it.
I use WEP and I have also tried disabling it but no joy.
Did you run sudo ./wlan0up from the command line? The script is located in the folder you extracted.
It is my understanding that if everything is working this should bring up the network interface and from there you can act on it as a standard wireless network from the control panels.
I found that after connecting to my network I had to also run sudo ./wlan0dhcp from the same directory to actually get an IP address from my wireless router.
Hope this helps!
Easiest way is to use ndiswrapper, if you’re not going to use this for security monitoring (Airocrack, etc).
Download the RTL8187B_driver_only from realtek or search google for it. Open up the INF, and look for
;;****************************************************************************
;; IDs for 98SE/ME/2K/XP
;;****************************************************************************
[Realtek]
%RTL8187B.DeviceDesc% = RTL8187B.ndi, USBVID_0BDA&PID_8187&REV_0200
%RTL8187B.DeviceDesc% = RTL8187B.ndi, USBVID_0BDA&PID_8189&REV_0200
CHANGE IT TO
;;****************************************************************************
;; IDs for 98SE/ME/2K/XP
;;****************************************************************************
[Realtek]
%RTL8187B.DeviceDesc% = RTL8187B.ndi, USBVID_0BDA&PID_8187&REV_0200
%RTL8187B.DeviceDesc% = RTL8187B.ndi, USBVID_0BDA&PID_8189&REV_0200
%RTL8187B.DeviceDesc% = RTL8187B.ndi, USBVID_0BDA&PID_8197&REV_0200
insert the new inf/sys file into ndiswrapper (ndiswrapper -i /location/of/driver)
finish installing the driver with ndiswrapper, and you should be good.
hi.. i’ve already put it to work but i have one problem with kismet
“FATAL: No packsources were enabled. Make sure that if you use an enablesource line that you specify the correct sources.”
i’ve already tried to change the source line in kismet.conf but gaves the same error… i hope you can hel me
tks 😉
worked for me but I was wondering if these drivers would enable promiscous mode. I can’t seem to get it working. Any ideas? if promisc doesn’t work than what are the advantages to using this driver over ndiswrapper?
I am stuck trying to run the ./mkdrv file.
I get an error message that says:
rm -fr *.mod.c *.mod *.o .*.cmd *.mod.* *.ko *.o *~
make -C /lib/modules/2.6.24-19-generic/build M=/home/prasanna/Downloaded Packages/rtl8187b-modified/ieee80211 CC=gcc modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-19-generic’
make[1]: *** No rule to make target `Packages/rtl8187b-modified/ieee80211′. Stop.
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-19-generic’
make: *** [modules] Error 2
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
make -C /lib/modules/2.6.24-19-generic/build M=/home/prasanna/Downloaded Packages/rtl8187b-modified/rtl8187 CC=gcc modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-19-generic’
make[1]: *** No rule to make target `Packages/rtl8187b-modified/rtl8187′. Stop.
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-19-generic’
make: *** [modules] Error 2
Any help will be much appreciated.
–prasanna
you could be missing your linux headers,
on debian: apt-get install linux-headers-`uname -r`
Thanks Ben, but no. I have the linux headers installed and they are at the right rev level.
The makefile seems to find the /usr/src/linux-headers… directory. I dont know what “No rules to make target…” means. Where do these rules live?
–p
Hope this helps someone else in my position. I did two things to get the makefile to work
1. I had a space in the directory name of the folder in which the files were. Some web posts indicated that some makefiles have a problem properly “escaping” the space, and therefore break.
2. I made all files in the folder and below, executable (chmod -R +x *).
This allowed the WiFi to connect to my WEP protected AP. However, the connection keeps going down and each time it prompts me again for the WEP key. Any solutions to that problem will be much appreciated. Otherwise, its time to switch to a different brand of WiFi connector 🙁
Thanks for all those who helped get me this far.
–prasanna
Hello I am new to Linux and I just installed SUSE 10.2 on my A215 and wanted to use the wireless adapter but when I open the makedrv it throws me the following error:
/makedrv: line 5: cd: ieee80211: No such file or directory
make: *** No rule to make target `clean’. Stop.
make: *** No targets specified and no makefile found. Stop.
/home/Dragon20119/Documents/rtl8187B_linux_24.6.1024.0822.2007/makedrv: line 8: cd: ../rtl8187: No such file or directory
make: *** No rule to make target `clean’. Stop.
make: *** No targets specified and no makefile found. Stop.
I know something is wrong because I extraced all the files and folders to the same destination and I double cheked for the names… Could you plz help me
Chris
If you are into compiling your own kernels, check out 2.6.27-rc3 at kernel.org, which is supposed to have native support for this adapter.
I will be giving it a shot tomorrow.
I patched the 2.6.26 kernel source with the 2.6.27-rc3 patch. Compiled the kernel. Installed it, and rebooted.
After some mucking around with settings, and adding and removing connections several times (a la windoze), and removing MAC filtering on the wireless, this now works. I am using it now.
Your blog got me pointed in the right direction, and I found a lot of help over at the opensuse forums (my distro).
Good luck to those out there. It DOES work, and will be mainstream when the 2.6.27 kernel is released (maybe 6 weeks).
Good luck!
Hey, I’m a Linux newbie, dual booting Ubuntu 2.6.24-19-generic…well, trying to, anyway. I have the Realtek RTL8187B wireless card. I tried to follow the given directions to install the modified driver, but when I run the Makefile, I get the following error:
make[1]: entering directory ‘/usr/src/linux-headers-2.6.24-19-generic’
scripts/Makefile.build:46: ***CFLAGS was changed in “/wifi/ieee8021/Makefile”. Fix it to use EXTRA_CFLAGS. Stop.
make[1]: *** [_module_/wifi/ieee80211] Error 2
This is followed by another identical error, except its in the RTL8187 makefile instead of the ieee80211 makefile. Any ideas? I’m in college, and being able to run Linux from my room would be much more convenient than running to the computer lab all the time. Also, I already checked the kernel sources and linux headers packages, and (I think) they’re already installed. If you need any more info, let me know. Thanks in advance!
How well does the driver work for you? I’m running 2.6.27-rc5 on a Toshiba Satellite L350D-12M, and I’m getting quite a bit of packet loss – the WiFi signal is much worse than on my old Thinkpad X31.
Sadly my wireless adapter seems to have burnt itself out so I can’t test this any further. I’ve switched to a different wireless platform. Good luck!
I tried to compile the modified driver on my laptop running FC9 latest kernel version 2.6.27.5-41.fc9.i686 but I got this error msg:
[root@phuongnn rtl8187b-modified]# ./makedrv
rm -fr *.mod.c *.mod *.o .*.cmd *.mod.* *.ko *.o *~
make -C /lib/modules/2.6.27.5-41.fc9.i686/build M=/root/rtl8187b-modified/ieee80211 CC=gcc modules
make[1]: Entering directory `/usr/src/kernels/2.6.27.5-41.fc9.i686′
scripts/Makefile.build:46: *** CFLAGS was changed in “/root/rtl8187b-modified/ieee80211/Makefile”. Fix it to use EXTRA_CFLAGS. Stop.
make[1]: *** [_module_/root/rtl8187b-modified/ieee80211] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.27.5-41.fc9.i686′
make: *** [modules] Error 2
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
make -C /lib/modules/2.6.27.5-41.fc9.i686/build M=/root/rtl8187b-modified/rtl8187 CC=gcc modules
make[1]: Entering directory `/usr/src/kernels/2.6.27.5-41.fc9.i686′
scripts/Makefile.build:46: *** CFLAGS was changed in “/root/rtl8187b-modified/rtl8187/Makefile”. Fix it to use EXTRA_CFLAGS. Stop.
make[1]: *** [_module_/root/rtl8187b-modified/rtl8187] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.27.5-41.fc9.i686′
make: *** [modules] Error 2
Could you please help me to solve this.
Thanks,
Tuan
Check your makefile – does it have “CFLAGS +=
$(EXTRA_CFLAGS)” somewhere? Try removing that line and try again.
Hmm, you say that the RTL8187B works with WEP but not WPA? I seem to have it the other way round. I can get it to connect to WPA, but not to WEP under Jaunty
you would not have that source code package saved still would you sir? it does not seem to be available anymore (404s). Thanks.
Hello Mike, sorry, no I do not have this package. I had a hard drive crash a long time back and lost it then, and the wireless device I had that I needed it for has also died so I have had no way to test this solution further. Good luck!