Setup WiFi adapter on Raspbian Wheezy

  1. Run apt-get update to get it up-to-date (not necessary, but…)
  2. If you don't know what wifi adapter you are using you can find out
  3. lsusb
  4. In my case the response is:
  5. ~ $ lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. Bus 001 Device 004: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

My wifi adapter is “Bus 001 Device 004: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter” To see if raspbian has firmware for it use “apt-cache search Ralink” It returns firmware-ralink - Binary firmware for Ralink wireless cards

sudo apt-get install firmware-ralink

Last line is: Setting up firmware-ralink (0.36+wheezy.1) …

using lsmod doesn't show up anything.

using dmesg shows:

[ 3.232446] usb 1-1.3: new high-speed USB device number 4 using dwc_otg [ 3.380554] usb 1-1.3: New USB device found, idVendor=148f, idProduct=5370 [ 3.401844] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 3.422167] usb 1-1.3: Product: 802.11 n WLAN [ 3.428721] usb 1-1.3: Manufacturer: Ralink [ 3.451907] usb 1-1.3: SerialNumber: 1.0

doing ifconfig shows adapter is now seen by system:

wlan0 Link encap:Ethernet HWaddr e8:4e:06:0d:79:31

        UP BROADCAST MULTICAST  MTU:1500  Metric:1
        RX packets:0 errors:0 dropped:0 overruns:0 frame:0
        TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:1000 
        RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sudo nano /etc/wpa.config

copy and paste: network={ ssid=“YOUR-SSID” proto=RSN key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP psk=“WPA-PASSWORD” }

save and close.

then edit $ sudo nano /etc/network/interfaces

and check that the following is in there:

auto lo

iface lo inet loopback iface eth0 inet dhcp

auto wlan0 allow-hotplug wlan0

iface wlan0 inet dhcp

      wpa-ssid "SSID"
      wpa-psk "PASSWORD"

then sudo nano /etc/network/interfaces

auto lo

iface lo inet loopback iface eth0 inet dhcp

auto wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa.conf

restart your networking sudo /etc/init.d/networking restart

Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces … (warning). Reconfiguring network interfaces…Internet Systems Consortium DHCP Client 4.2.2 Copyright 2004-2011 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/b8:27:eb:d4:ed:3b Sending on LPF/eth0/b8:27:eb:d4:ed:3b Sending on Socket/fallback DHCPRELEASE on eth0 to 192.168.1.254 port 67

At which point the raspi WiFi interface will come up and you can disconnect the ethernet cable from the onboard ethernet adapter.

If you have configured the raspi as DHCP, you will have to find the IP address it has been assigned. Simplest for me was do an nmap of my network to find it.

If you configured it static, SSH to it as before.

If this doesn't work, you may need to reboot it. At which point you can then SSH to it.