installing the wireless dongle on the pi

After what I can only describe as an epic, xkcd-style battle with wireless drivers on my recently-revived Pi, it finally connects to the network. For my benefit when I inevitably muck it all up and have to reinstall, here are the steps I followed.

The dongle is some Ralink thing I had lying around. Naturally, lsusb doesn’t give a useful chipset or anything like that, so actually finding the driver was mostly blind luck and a bit of Google Image.

  1. Get linux headers, because you need them to compile the drivers. Of course, these aren’t packaged for the default Raspbian kernel – there’s some complex diplomatic situation whereby the Raspberry Pi Foundation branched Debian and then gave the result to Raspbian… anyway, the default kernel doesn’t have packaged headers. This should be solvable by “just” downloading and configuring them, but after failing at that with some cryptic compile errors, I just changed over to a nearly-but-not-quite identical kernel which did have packaged headers.
- sudo apt-get install linux-image-rpi-rpfv
- ls /boot to find out what kernel you got (e.g. 3.10-3 as of 2014-07-02)
- append to /boot/config.txt, mutatis mutandis

    kernel=vmlinuz-3.10-3-rpi
    initramfs initrd.img-3.10-3-rpi followkernel

- reboot
- sudo apt-get install linux-headers-rpi-rpfv
  1. Get driver. If you know your chipset this is easy. Of course, since I didn’t know it, I had to Google wildly and download some random thing off the Internet. I think you can also get them at the Ralink website. The steps for the above link were
- untar
- patch -p0 < $PATH_TO_PATCH_FILE
- make (and wait forever)
- mkdir -p /etc/Wireless/RT2870STA/
- cp RT2870STA.dat /etc/Wireless/RT2870STA/
  1. Connect and install
- sudo /sbin/insmod os/linux/mt7601Usta.ko
- sudo make install
- ifconfig and check that ra0 is there
  1. Bring up ra0
- add the following to /etc/network/interfaces

    auto ra0
    iface ra0 inet dhcp
    wpa-driver wext
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

- sudo ifup ra0
- muck around with the GUI to add the network (or edit wpa_supplicant.conf to do it manually).

And you’re done!

 
2
Kudos
 
2
Kudos

Now read this

user pulseaudio

Michael and I have a home server running spotifyd (which is really a story for another post); each running a user systemd service to keep it up. This seemed to confuse pulseaudio a little. The default ubuntu configuration runs one... Continue →