Wireless Networking with Raspberry Pi

These notes record my experience in getting a wifi adapter (“dongle”) working with a Raspberry Pi (RPi) Model B (first generation). I started with the official instructions provided at RaspberryPi.org, without success. I then consulted various documentation and online help forums (this was helpful), and had tried various configuration options — mostly trial and error. At this point, I have a successful setup, though I’m tentative in that conclusion since this result feels more like luck, rather than actually understanding how the configuration works. For now, this document is a work-in-progress.

I connected to the RPi, nicknamed “opal,” using ssh through the Terminal app on Mac OS X. The Mac itself is connected to the local network via wifi. The RPi was connected to the network using a wired connection at eth0, to start. The RPi is running Raspbian Jessie (v 4.1.17+). My wireless router, named “Lansdowne WiFi-g” is a Cisco Linksys E2500 with wireless MAC filtering enabled. The MAC address of the wireless adapter had been added to the list of permitted devices.

Confirming the wireless adapter hardware via lsusb:

The wifi adapter in question is the Ralink RT5370. Note that the 4-port USB hub is powered separately and connects the RPi to two external, powered hard drives. The RPi is powered independently from the hub.

Installed modules were reported as follows. I believe the drivers required for the RT5370 are listed as rt2800usb, rt2800lib, rt2x00usb, and rt2x00lib (lines 7-10).

Because I have been attempting to enable the wifi networking, the following details no longer represent the default configuration of the Raspbian install.

Looking at the wireless interfaces, wlan0 was already aware of my local wireless router, “Lansdowne WiFi-g.”

The following shows the contents of the /etc/network/interfaces file. Note that the wpa-psk password is obfuscated.

The following shows the contents of the /etc/wpa_supplicant/wpa_supplicant.conf file. Note that the long, uncommented, and obfuscated psk value represents a key generated using wpa_passphrase, rather than the plain-text password used in the interfaces file.

What follows is a first attempt to bring up and configure the wlan0 interface.

Alternatively, running wpa_supplicant, as shown below, triggered a lengthy response. After several minutes (over 1,300 lines of output) I terminated the process using control-c.