installing a linksys WNP54G wireless pci card in debian (etch)

EDIT: try this way first! It is a hell of a lot simpler

I bought this card to avoid cables allover my house, and when looking at cards (it was quite cheap on dabs) did a quick search for linux support. Satisfied I bought the card.

Well, it turned up today and the reality was that installing the driver was a little harder than i thought…

At first i thought i was going to have use ndiswrapper and use the windows driver, but I didn’t like that idea, so kept searching. I eventually found that there is a real driver from ralink
Getting it working though was not as simple as installing a package.

  • I download the driver, extracted the tar and went into the module directory. Following the readme there to build the kernel module (I needed kernel sources and headers (apt-get can help you with that if you are on a standard kernel) as well as make, gcc etc.)
  • That was fine, and insmod rt61.ko worked so next step was going to be getting my WPA encyption working.
  • I installed wpa_supplicant, but found that I needed to patch it to make it support this driver.
  • apt-get source wpa_supplicant; apt-get build-dep wpa_supplicant will get you the source and build dependencies.
  • Following the patching instructions in the WPA_supplicant directory of the driver I downloaded, I patched wpa_supplicant (It would have been nice if they just gave a .patch or .diff file though)
  • make worked fine, but I could not get dpkg-buildpackage to work as the patching failed. That is a shame, and I really should submit a patch to the wpa supplicant team for this driver so that this step won’t be required again.
  • To get it working system wide I had to copy the three binary files from my wpa_supplicant build dir (wpa_supplicant, wpa_passphrase, wpa_cli) to /usr/local/sbin (that is where which wpa_supplicant said they should be)
  • I had to edit my wpa_supplicant.conf (the default was fine, but I did have to copy out a lot of other definitions as it complained about them, and adding the wpa key was easy)
  • Loading by hand now worked, and I could now disconnect my network cable
  • insmod ra61.ko; wpasupplicant -c /etc/wpa_supplicant.conf -i ra0 -D ralink; ifup ra0 inet up
  • To make it work on boot I edited /etc/network/interfaces to add wpa_options so that ifup knows about them
  • iface ra0 inet static
    wpa-driver ralink
    wpa-conf /etc/wpa_supplicant.conf
    • I also needed to copy my rt61.ko from my driver build dir to my current kernel’s modules dir
    • cp rt61.ko /lib/modules/`uname -r`/kernel/drivers/net
  • I also needed to add “alias ra0 rt61” to the end of my /etc/modutils/aliases file so that the system knows that ra0 is a rt61 device (make sure you don’t edit /etc/modules.conf as it is created by modutils and will just be overwritten on the next boot)
  • I thought this should work, but instead /etc/init.d/networking restart complained that the ralink driver was unsupported. Turns out it uses a copy of wpa_supplicant in /sbin/
  • After copying wpa_supplicant to /sbin/ it now works
  • So what I really want is a debian package for the kernel module that will build and install the driver for me, and a copy of wpa_supplicant that supports this driver. I guess it is time to start investigating licences and emailing debian package maintainers and wpa supplicant developers…

    Hope this helps somebody else, but drop me an email if you think I can help you

    About Anton Piatek

    Professional bit herder, amateur photographer. Linux and tech geek
    This entry was posted in Debian, Linux, Misc. Bookmark the permalink.

    2 Responses to installing a linksys WNP54G wireless pci card in debian (etch)

    1. Pingback: Strangeparty » Blog Archive » wpa wireless on a IBM Thinkpad T43p (running Debian Etch)

    2. Pingback: Strangeparty » Blog Archive » Getting a WMP56G pci wifi card working under debian etch

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.