Ah, memories! These days, setting up hardware on Linux is often easier than it is in Windows. Lots of drivers are built-in and auto-detected, and many are provided through a distribution channel that makes it almost as easy.

Wireless networking, however, is a bit of a throwback to the old days. Half the hardware doesn’t have Linux drivers, and half of the devices that do require you to hunt for the driver — based on the chipset, of course, not on the name or model number on the box — and compile it yourself. (At least these days, you can sometimes run a tool to adapt the Windows drivers if there’s no native Linux option.)

The steps I actually needed to take to set up wifi on my Fedora 13 desktop probably only amounted to about 10 minutes. Unfortunately it took a lot of false starts to get there. I had installed a Zonet ZEW1642 PCI card, which my initial research suggested would be supported by the built-in rt2860 drivers. As it turned out, it wasn’t that simple.

First, what didn’t work:



Built-in drivers.

The rt2860 drivers (or any others) from RPMFusion.

Manually configuring the card with system-config-network (even after I got the right driver installed).

What did work:

Download the driver and firmware from Ralink’s Linux page Mediatek’s Downloads page.

Mediatek’s Downloads page. Build and install the driver.

Start using NetworkManager.

Key Info

lspci reports the card as: Network controller: RaLink Device 3062 It doesn’t use the rt2860 driver. When the driver works, the card will show up as ra0 when you run ifconfig or iwconfig . If you run either of those and don’t see ra0, or if you try to configure ra0 and get a message like “unknown device,” you don’t have the right driver loaded. When the driver works, NetworkManager will automatically recognize it. You don’t need to configure the interface first. (This tripped me up several times.) The NetworkManager and network services conflict with each other. You have to pick one and disable the other.

Most of the information I found on this card…wasn’t actually about this card, but about related ones. What little I did find implied that it uses the same driver as the rt2860. It doesn’t. Well, not exactly. They use the same firmware, and the config file for the rt3062 is called RT2860STA.dat, which confuses the issue.

Howto

Go to Ralink’s Linux page Mediatek’s Downloads page and download the appropriate driver and firmware based on the model number. Unzip the firmware As root, copy rt280.bin to /lib/firmware/rt2860.bin Unzip the driver source file (ex: tar xvf /download/linux/drivers/2010_07_16_RT3062_Linux_STA_v2.4.0.0.tar ) Step into the folder and read the instructions in README_STA You probably won’t need to change the Makefile or set compiler flags, but you will need to set it to work with either NetworkManager or wpa_supplicant. So edit os/linux/config.mk and set HAS_WPA_SUPPLICANT=y and HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y (for NetworkManager). If you don’t change this, it will not work. (Don’t worry about the next coulple of lines about wpa_supplicant. They don’t seem to be necessary from what I can tell.) Build it by typing make in the main folder of the source archive. As root, copy RT2860STA.dat to /etc/Wireless/RT2860STA/RT2860STA.dat At this point, you can diverge from the directions a bit. To install, switch to root and run make install in the main folder of the archive. This should copy rt3562sta.o to the appropriate location for your system. If you haven’t been using NetworkManager, again as root, run service network stop to disable the standard network service (since it conflicts with NetworkManager). Enable the driver: again as root, run modprobe rt3562sta If you have NetworkManager running, it should immediately recognize the card and detect nearby networks. Once you’ve got everything working, as root, run chkconfig --del network to permanently disable the other daemon. (But make a note of this in case you ever switch back.)

One more thing: keep this folder around! Because of the way Linux drivers work, you’ll need to re-install the drivers the next time your system updates to a new kernel. This is a pain, and is the reason I was hoping the built-in drivers or RPMFusion packages would work. More on that in the next section.

Follow-Through

Rebooting: Because I had previously removed NetworkManager from my system, I had to make sure the Gnome desktop would load the NM applet. That was fixed by going to System→Preferences→Startup Applications and enabling Network Manager.

Kernel Updates: I haven’t had to do this yet, but based on experience with other Red Hat-based systems where I’ve had to use third-party drivers, here’s how to reinstall the driver the next time Fedora sends you a kernel update.

After the new kernel is installed, but before you reboot, go back to the driver folder and run the following:

make clean make sudo make install (or just switch to root and run make install ) sudo modprobe rt3562sta (or stay as root and just run modprobe)

That should take care of it. If you forgot to do this first (and are reading this article on another computer), just run modprobe rt3562sta (as root) after you’re done.

Update: I originally suggested rebuilding the module before rebooting, but the Makefile automatically detects the running kernel. You can manually force it to use the source from the newer kernel, but for the sake of these directions, this way is simpler.

This 18-page thread at Fedora Forum was very informative, though it did point me in a few wrong directions.