up

D-Link DWL-500 PCI Wireless Adapter (Ricoh RL5C475)

ultra short summary: PCIC_OPTS="irq_mode=0"

email received:

http://www.raw-io.com/pci_802.11b.html was very useful for me today,
when I was trying to install a Ricoh RL5C475 + Orinoco 802.11b PCMCIA
card in an old Pentium 120 box.  Everything almost worked after
following your advice (2.4 + external pcmcia_cs + i82365 + irq_mode=0),
and I think that saved me hours.  There was one additinal step (adding
pci=biosirq to the kernel command line) without which the i82365 could
not find an IRQ line and orinoco_cs wouldn't load.

I'm not sure how exactly old that PC is (it's got a 1992 Award BIOS),
but initially I was afraid it would not work.  Is there a way to find
out the PCI bus version easily?

Anyway I think this information might be useful to you, and perhaps
others (if you put it on the web page).

Regards,
Marius Gedminas

DWL-500

9/1/2002 update: The content of this page was last updated October 19th, 2001. As far as I know everything is still up to date here but keep in mind some things might have changed.

Short version:

1) compile and install 2.4.x (preferable an alan cox kernel) without PCMCIA support but with Wireless LAN support (just Wireless LAN support, none of the drivers under that option)
2) compile and install latest pcmcia-cs
3) compile and install latest wireless-tools

edit your pcmcia options so that your socket driver is i82365 and your PCIC_OPTS="irq_mode=0" (use only PCI IRQs)
reboot
live long

Long version:

The DWL-500 uses the Ricoh RL5C475 chip to provide a single CardBus PCMCIA slot. I use the slot with a Dell branded Orinoco 802.11b wireless card in a Debian Linux server. At first I tried to get the card working with the kernels internal PCMCIA support using the yenta_socket driver. Unfortunately this failed without much more information. After reading up on PCMCIA for a bit I found that with PCMCIA there are two choices - use the kernels internal support for PCMCIA devices or use the external pcmcia-cs package. Due to the numerous attempts at configuring the system using different versions of debian packages and various tar balls (.tar.gz files) found on the net I cannot provide a step by step description but here is my setup:

Debian unstable (I was running testing but I tried unstable to see if a newer pcmcia-cs package would help, this should all work fine with testing or stable).

pcmcia-cs 3.1.29 (just grab latest release off of pcmcia-cs.sourceforge.net)

linux kernel 2.4.12-ac3 - compile the kernel without support for PCMCIA but do include support for Wireless LAN(Networking device support->Wireless LAN (non-hamradio)->Wireless LAN (non-hamradio)) so you can use the wireless-tools package (see below) - note I only included the Wireless LAN option, not any of the support for various cards. The drivers will come from the pcmcia-cs package.

wireless-tools 21 (is it 0.21?) - I needed to edit the source file iwcommon.h to get it to compile:

    change >>> <<< line:
    #if defined(KLUDGE_HEADERS) || defined(GLIBC_HEADERS)
    #include <linux/if_arp.h>   /* For ARPHRD_ETHER */
    #include <linux/socket.h>   /* For AF_INET & stuct sockaddr */
    >>> #include <linux/in.h>    /* For struct socketaddr_in */ <<<
    #endif /* KLUDGE_HEADERS || GLIBC_HEADERS */
    
    to:
    #include <sys/socket.h>
    (yeah, just that one line with the >>><<< above, not everything)
    

Note that the source does have the options for GLIBC22_HEADERS which are above but I don't know what is going on there and this simply fixes the problem. Also note that I have my /usr/include/linux pointing to /usr/src/linux/include/linux and /usr/include/asm pointing to /usr/src/linux/include/asm - by default debian has these directories going to the original build kernel versions includes which is just funky. I don't know why they do that but they do..

So compile the kernel as noted above, then compile pcmcia-cs with "make all" and it will detect that the compiled kernel doesn't have support for PCMCIA so it will build it, do "make install" on pcmcia-cs, build the wireless tools. I installed the wireless-tools package from debian and then built the wireless-tools tar ball and compied the executables over the packages version in /sbin.

Now edit your pcmcia configuration file (/etc/pcmcia.conf or /etc/defaults/pcmcia or /etc/stand/pcmcia.conf or /etc/init.d/pcmcia if you don't have any other file) so it says:
PCIC=i82365
PCIC_OPTS="irq_mode=0"
everything else blank

Now reboot and see if cardctl status shows any PCMCIA cards in the adapter. cardctl ident will show if it can identify them... Then go ahead and edit /etc/pcmcia/wireless.opts for your card - read the text at the top. I skipped that text and couldn't figure out why it wasn't working for me. Scratched my head for a couple eons until I noticed that you have to comment out a couple lines to get your configuration to take.

I'm not sure if there is anything else... I know this is a horrible writeup but I couldn't find *any* help on this before so I wrote this while it was still fresh in my mind. On the other end of the 802.11b signal I'm using another orinico card in Dell Inspiron 4000 using the kernel's builtin orinoco_cs driver. Everything is working just peachy! Now I can't wait to explore long range antennas and all that...

One final note - feel free to email me if I didn't make something clear. Make sure you read this and then think about what I'm suggesting before actually doing it! For example you can probably use debians or whatever systems packages for wireless-tools and get away with it with only a little warning... Note that with the Alan Cox kernels I'm running the latest wireless extensions are included. If you use a vanilla Linus kernel you might want to get the patch that applies the newer wireless standards (this is if your are compiling wireless- tools from scratch, otherwise use the packaged wireless-tools and the vanilla kernel).

Oh yeah - if you have an older PC this card might not work - it requires PCI bus 2.2 at least. It worked in my Abit BE6 so as long as you have a Celeron, Pentium II, Athlon, or Duron you should be just fine (I don't know anything other than x86, can you tell? hehe).