10 June 2007

rtl8180 chipset

If you happen to have a wireless card based on the RealTek rtl8180 chipset and want to use it in Linux without using ndiswrapper (there are probably about 4 people on Earth like this), you may find this interesting/useful.

I have a Linksys WPC11v4 PCMCIA wireless card. There's an open-source driver for it at http://sourceforge.net/projects/rtl8180-sa2400, and the driver lets you run it in monitor mode. Monitor mode is what lets you run wireless network detectors like kismet. (ndiswrapper, which lets you run wireless cards in Linux using Windows drivers, doesn't support monitor mode, even for cards which which do). The released versions doesn't work for me (in CentOS 5), but the CVS version does. You can get the CVS code by running the following:

cvs -d:pserver:anonymous@rtl8180-sa2400.cvs.sourceforge.net:/cvsroot/rtl8180-sa2400 login
cvs -z3 -d:pserver:anonymous@rtl8180-sa2400.cvs.sourceforge.net:/cvsroot/rtl8180-sa2400 co -P rtl8180-sa2400-dev


Then you'll need to edit a couple of files. In
rtl8180-sa2400-dev/r8180_core.c, comment out the lines beginning with MODULE_PARM and MODULE_PARM_DESC (there are four of each, found on lines 137-147 of the file). And in rtl8180-sa2400-dev/Makefile, remove the text MODVERDIR=$(PWD) from line 62. (I have a patch file with both of those edits--leave a comment if you'd like me to send a copy).

Then just run 'make', and then you can run the following commands to insert the kernel modules (the order is important):

/sbin/insmod ieee80211_crypt-r8180.ko
/sbin/insmod ieee80211_crypt_wep-r8180.ko
/sbin/insmod ieee80211-r8180.ko
/sbin/insmod r8180.ko

3 comments:

Anonymous said...

Hi,

Ive got also a PCMCIA Card with that realtek chipset and I want to use the GPL driver. The PCI-ID is 10ec:8180.

When I try to use the unpatched drivers from cvs, the make-command delete all files in the current directory. I didnt debug it yet, because Iam not so good in Makefiles.

Ive tried your patch in the hope, you had the same problem, but this didnt worked also. I get the following error:

root@tux:~/dir# patch -p0 --dry-run < yourpatchcode.diff
patching file rtl8180-sa2400-dev/r8180_core.c
Hunk #1 succeeded at 134 with fuzz 1.
patching file rtl8180-sa2400-dev/Makefile
Hunk #1 FAILED at 59.
1 out of 1 hunk FAILED -- saving rejects to file rtl8180-sa2400-dev/Makefile.rej
root@tux:~/dir#

You can reach me under micha_will AT gmx.net, maybe you can sent me the patched sourcecode.
Tia
Micha

Anonymous said...

Its already done. I found this:
http://rtl-wifi.sourceforge.net/wiki/Installing

Micha

mbrisby said...

The second comment was posted before I saw the first, so I wasn't able to help much. Sorry about that. Turns out that copying and pasting the patch file from my blog post into a text file gives exactly the errors you mentioned--the whitespace gets mangled. So I've edited the original post for any future readers. Anyway, glad you were able to get it working another way.