Home Articles HowTo Guides HowTo: Build & Install The Legacy r8180 Module On Hardy
HowTo: Build & Install The Legacy r8180 Module On Hardy PDF Print E-mail
Written by Will Daniels   
Wednesday, 30 April 2008 01:14

Note: There is a new and improved version of this driver that you can use with Hardy instead

A few days ago I posted a patch for the Realtek 8185 driver (r8180), updating it for 2.6.24 kernels. I expected at the time that somebody would fix it properly before the final release of Hardy and that any people coming here for the patch would be running the development branch, so they would probably already know what to do with it.

But I hadn't realised quite how close the Hardy release date was, and as it turns out Hardy was released without this driver completely. Consequently, quite a lot of people have ended up here looking for a solution, so this is an attempt to provide more complete instructions on what to do.

I've already written a brief guide on using this driver with wpa_supplicant, but for getting it compiled and installed in the first place, this is what you need to do...

Note: French speakers may also refer to the guide here

I'll go ahead and assume that you do have a working internet connection of some form since you've managed to get to this site, but note that you do have to compile the driver on the same machine you intend to use it on, or at least one running the exact same kernel version and architecture.

  1. Make sure you have the necessary tools installed for compiling stuff:
    sudo apt-get install build-essential linux-headers-generic patch
  2. Download the driver sources:
    wget http://willdaniels.co.uk/attachments/rtl8185.zip
  3. Extract the archive and change into the extracted folder:
    unzip rtl8185.zip
    cd rtl8185
  4. Compile the driver (don't worry about the warnings, so long as there are no fatal errors):
    ./makedrv
  5. Test that the modules load correctly using:
    sudo ./wlan0up
  6. If everything is working, copy the compiled kernel modules to a better location:
    sudo cp rtl8185/*.ko /lib/modules/`uname -r`/kernel/net/wireless
    sudo cp ieee80211/*.ko /lib/modules/`uname -r`/kernel/net/wireless
  7. Update the module dependencies file:
    sudo depmod -a

There is one final step required to ensure that the driver gets loaded on boot. If you only plan to use WEP security (or none) then probably the easiest way to achieve this is as follows:

sudo -i
echo ieee80211_crypt_rtl >> /etc/modules
echo ieee80211_crypt_wep_rtl >> /etc/modules
echo ieee80211_crypt_tkip_rtl >> /etc/modules
echo ieee80211_crypt_ccmp_rtl >> /etc/modules
echo ieee80211_rtl >> /etc/modules
echo r8180 >> /etc/modules
exit

Alternatively, if you intend to automate the configuration for WPA(2) you might as well configure /etc/network/interfaces to load and unload the modules as required instead (since WPA is not supported by the standard graphical tools for this driver anyway) in which case refer to the separate WPA article here.

Comments
Add New RSS
+/-
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
Please input the anti-spam code that you can read in the image.
V. B. Cranford   |2008-05-08 23:39:45
Thank you very much for providing this fix. It works GREAT!
jlauio  - Great job   |2008-05-12 10:35:16
Hi
I am JOse from Ecuador, tank you very much for you help.
Petr  - GREAT!!!!!!!!!!!   |2008-05-17 18:27:39
WHAT A GREAT PATCH!!!! My wireless card is finaly working. Thanks for a great
job (and hope, it will be fixed in next version of ubuntu by default :-)
kdnewton  - Enter title here     |2008-05-20 23:56:57
Thanks for the easy-to-do. You know, I had the TEW-423pi working with Gutsy
with the stock realtek rtl8185l drivers http://www.realtek.com.tw/downloads/downloadsVi....

Hardy comes along and I couldn't for the life of me compile them. I
don't know what you did but I'm swimming through the net with wlan0.
Thanks.
kdnewton  - Enter title here~     |2008-06-05 00:01:05
Thanks again. I was regretting the purchase of this wifi card but now two kernel
updates later and your patch is still working (after two subsequent recompiles).
Much appreciated.
kdnewton  - wifi at boot     |2008-08-07 07:44:25
Some people may have noticed that the wifi doesn't establish until the user has
logged in to the desktop. That can be fixed by adding a few lines to a system
startup script.

Edit /etc/rc.local or /etc/rc3.d/S99rc.local and add the
following lines to the very bottom:

ifconfig wlan0 up
iwconfig wlan0 essid
WhateverTheAPIsCalled
iwconfig wlan0 key WhateverTheKeyIs
dhclient

Note, wlan0
can be substituted with whatever "ifconfig" calls it.

Now whenever the
PC turns on so is the wifi before logging in.
Will   |2008-08-08 03:39:32
Alternatively, if you're using Gnome with NetworkManager, you should be able to
just disable the roaming mode and enter the necessary connection parameters
directly in the Network administration dialog (unless you also need
wpa_supplicant, in which case modify the init script as suggested here or use
the new driver).
Chris  - Wireless Card doesn't work   |2008-05-28 19:49:19
I followed your directions to the letter, but when I go to the network
configuration panel my wireless card isn't detected. any idea?

Thanks!
Ban  - Thank you     |2008-05-28 21:56:32
Thank you very much for you help.
From Thailand.
Michael   |2008-06-08 15:05:21
Great howto & patch, thanks!!
jesus   |2008-06-08 18:45:08
thanks, it works after 3 days of being trying other ways. thanks a lot you are
the king of linux
Trevor  - Thank you!     |2008-06-14 20:40:49
This fix works fantastically! I hope it gets included in the core soon.
angeluz  - Thank you, very much!!!   |2008-06-15 11:06:22
Finally solve my problem with a card of the mark with encore rtl8185L chipset.
Thanks again, and I hope that in a future release of our friends ubuntu take
into account this driver ... You write a Peruvian ubuntero.
Nathan Salwen   |2008-06-20 17:50:15
Hi and thanks for the patch. I wonder whether I need to compile my own kernel
to use it. When I try to run the patch, I get an error that the
/lib/modules/2.6.24-1-686/build directory does not exist.

Thanks,
Nathan
Clay M  - Works Great   |2008-06-21 01:50:50
I just wanted to thank you for providing this patch. it works great! Thanks!
Pete Martin  - Brilliant   |2008-06-21 16:43:30
Thanks so much for the solution to this problem - it works great. I used it on a
F5D7000 PCI card which isn't supported in your code but with modification to
include it it works brilliantly.

:D
Steve Daltrey  - Strange signal and noise levels     |2008-06-22 14:35:54
I installed your driver and it worked great... for a while. Now I get a signal
level of +100dBm and noise of +8dBm. And sometimes I get a signal of -156dBm and
noice of +15dBm. Before using this driver I used ndiswrapper which also worked
for only a short period untill going very slow and cutting off. It´s just that
these values seem very strange and I wonder if ndiswrapper is interferring with
this new linux driver. I uninstalled it via synaptics but when I look under
"lsmod" it´s still there. Is there something I can check to see if
there is a conflict or something?
Will   |2008-06-22 17:30:38
Steve, you probably only removed the ndiswrapper userspace utilities since the
kernel module itself is part of the core linux-ubuntu-modules package. I would
suggest you reinstall the utilities (sudo apt-get install ndiswrapper-common)
then use "ndiswrapper -l" to list the installed Windows drivers,
followed by "sudo ndiswrapper -r " to remove it.
Will  - New Driver   |2008-06-22 17:37:41
Note to all subscribers and new visitors: You may wish to test the new
version of this driver, which was ported to use the mac80211 stack of
newer kernels. Refer to post from Tim Gardner on the launchpad bug here - it's been working perfectly for me for a while now and can do WPA
through nm-applet!
Tilden  - THANKS!   |2008-07-05 22:18:55
Said before here, but wanted to add my thanks for this!
Greg Lewis-Paley  - Problems with this driver   |2008-07-16 01:32:59
So I tried this method and it results in simply no internet connection, despite
being able to get an IP address. With Ubuntu 8.04 and kernel 2.6.24-20, whenever
this driver is enabled, the entire computer slows to a crawl, and most
noticeably, typing lags. What would be the cleanest way to uninstall this
driver?

By the way, neither ndiswrapping or the newer improved method worked at
all. I'm running a Gateway MT3418 with a mini pci RTL8185L and it's always been
giving me great difficulty.
Erik Owan  - Works great     |2008-07-20 13:39:02
The patch works great on 8.04. Thanks for the nice work
Chris  - Gentoo AMD64 User   |2008-08-01 02:23:31
Thank you for the code and bug fix.

I wanted to let you know that this code
works in x86_64 Gentoo Kernel 2.6.24

Pretty much directly according to your
Readme.

54 Mb/s WPA2-PSK AES using wpasupplicant-0.5.10

Actual card is
"TRENDnet" Model #TEW-423PI

Your utilities, scripts, and webpage are
primo examples of fine open source work.

THANK YOU!
thecham   |2008-08-04 20:46:14
Oh man! I think I'm in love with you!!
Luis   |2008-08-10 08:04:44
Thanks so much you have saved me days of troubleshooting!!!!I really aprecciate
this solution. It rocks!
Raphael Barros  - Help with ./makedrv   |2008-08-13 13:07:43
Do this solutions works in kernel linux-headers-2.6.24-19-generic?

I had this
error:

make[1]: Entrando no diretório
`/usr/src/linux-headers-2.6.24-19-generic'
make[1] : *** Sem regra para
processar o alvo `de'. Pare.
make[1]: Saindo do diretório
`/usr/src/linux-headers-2.6.24-19-generic'
make: ** [modules] Erro 2
rm -f
*.mod.c *.mod *.o .*.cmd *.ko *~
rm -rf /home/livre/Área de
Trabalho/rtl8185/rtl8185/tmp

Translation:

Sem regra para processar o alvo
`de'. Pare = No rule to process target 'de'

Saindo do diretório = Leaving
Directory

Entrando no diretório = Entering Directory.

Thanks for the Help!
Will   |2008-08-13 13:21:43
It seems the problem is that you have a space in the path "Área de
Trabalho". Try building it in a different directory that has no
spaces.

Though the make rules ought to handle this properly, they obviously
don't in this source package, which is not uncommon actually. Since this source
package should be redundant soon, rather than try to fix the build scripts let's
just make a note of the problem here and leave it at that :D
daniel tygel  - Confirmed: Patched doesn't work if in folder with     |2008-09-27 17:56:08
Will is correct!

You should put the rtl8185.zip file in a folder that doesn't
have spaces in its name. Then it works flawlessly!

thanks a lot for this
patch!

daniel, from Brasil

3.22 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated on Friday, 15 August 2008 10:43
 
 

Sponsorship

Visitors are kindly requested to give the advertisements at least a cursory glance.