Use Cisco Linksys AE1000 with Raspberry Pi

The Raspberry Pi does not come with built-in WiFi. Only the 10/100 Ethernet port provides network support straight out of the box. In order to use WiFi you need to use a USB wireless adaptor. A good choice for this is the Cisco Linksys AE1000. I happened to have one of these so while I was waiting for the RPi to be delivered the other day I checked online to see if the AE1000 was supported in the provided Raspian kernel or if I would need to compile the necessary module. I found several articles which said the AE1000 (specifically the Ralink chipset it uses) required code to be downloaded and compiled for support. That wasn’t the answer I wanted but I’m not averse to doing that. After all, I’ve been a Linux user for 18 years since the old monolithic kernel days and used to compile the entire kernel at upgrade time. I bookmarked the various links I found for reference once the RPi arrived.

Once the RPi arrived and I had completed the initial configuration, it was time to get the AE1000 up and running. In order to catch the syslog messages as they happened I ran tail -0f /var/log/messages and inserted the adapter. I was pleasantly surprised when I saw the following:

pi@raspberrypi ~ $ tail -0f /var/log/messages
Jan 15 17:19:54 raspberrypi kernel: [ 180.457433] usb 1-1.2: new high-speed USB device number 4 using dwc_otg
Jan 15 17:19:54 raspberrypi kernel: [ 180.576028] usb 1-1.2: New USB device found, idVendor=13b1, idProduct=002f
Jan 15 17:19:54 raspberrypi kernel: [ 180.576059] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 15 17:19:54 raspberrypi kernel: [ 180.576077] usb 1-1.2: Product: Linksys AE1000
Jan 15 17:19:54 raspberrypi kernel: [ 180.576089] usb 1-1.2: Manufacturer: Linksys
Jan 15 17:19:54 raspberrypi kernel: [ 180.676007] cfg80211: Calling CRDA to update world regulatory domain
Jan 15 17:19:55 raspberrypi kernel: [ 180.867485] usb 1-1.2: reset high-speed USB device number 4 using dwc_otg
Jan 15 17:19:55 raspberrypi kernel: [ 181.041736] usbcore: registered new interface driver rt2800usb
^C
pi@raspberrypi ~ $

I didn’t see any errors so I figured it was supported. Time to check some other things. Running ifconfig showed the wlan0 interface was there and needed to be configured.

pi@raspberrypi ~ $ ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:11:22:33:44:55 
 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
 RX packets:348 errors:0 dropped:0 overruns:0 frame:0
 TX packets:209 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000 
 RX bytes:41450 (40.4 KiB) TX bytes:29196 (28.5 KiB)

lo Link encap:Local Loopback 
 inet addr:127.0.0.1 Mask:255.0.0.0
 UP LOOPBACK RUNNING MTU:16436 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:0 
 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr aa:bb:cc:dd:ee:ff 
 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)

pi@raspberrypi ~ $

I run a WPA-encrypted network here so I need to edit the /etc/network/interfaces file and try to bring up the wireless adapter. It’s my normal practice to backup any configuration files I edit before making any changes so I backed up the interfaces file.

pi@raspberrypi ~ $ cd /etc/network
pi@raspberrypi /etc/network $ sudo cp interfaces interfaces.orig
pi@raspberrypi /etc/network $

Once this is done I open the interfaces file with vi and make my edits with the command sudo vi interfaces. Once my edits are complete, the interfaces file looks as follows:

auto lo wlan0

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "myssid"
wpa-psk "my preshared key"
iface default inet dhcp

Now it’s time to bring up the wireless interface. First, enter the command sudo ifdown wlan0.

pi@raspberrypi /etc/network $ sudo ifdown wlan0
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/wlan0/aa:bb:cc:dd:ee:ff
Sending on LPF/wlan0/aa:bb:cc:dd:ee:ff
Sending on Socket/fallback
DHCPRELEASE on wlan0 to 192.168.1.1 port 67
pi@raspberrypi /etc/network $

Then, enter the command sudo ifup wlan0.

pi@raspberrypi /etc/network $ sudo ifup wlan0
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/wlan0/aa:bb:cc:dd:ee:ff
Sending on   LPF/wlan0/aa:bb:cc:dd:ee:ff
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPOFFER from 192.168.1.1
DHCPACK from 192.168.1.1
bound to 192.168.1.101 -- renewal in 282351 seconds.
pi@raspberrypi /etc/network $

At this point everything looks good so run the command ifconfig wlan0 to confirm the configuration.

pi@raspberrypi /etc/network $ ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 68:7f:74:bb:e2:32  
          inet addr:192.168.1.56  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1577 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:346144 (338.0 KiB)  TX bytes:2281 (2.2 KiB)

pi@raspberrypi /etc/network $

And finally a quick ping from another system on my network to make sure it’s really available.

$ ping -c 1 192.168.1.101
PING 192.168.1.101 (192.168.1.101): 56 data bytes
64 bytes from 192.168.1.101: icmp_seq=0 ttl=64 time=5.416 ms

--- 192.168.1.56 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 5.416/5.416/5.416/0.000 ms
$

And there you have it!

Later,
Keith

About these ads

2 responses to “Use Cisco Linksys AE1000 with Raspberry Pi

  1. Hi Keith,

    I also use an AE1000 which works perfectly with raspbmc on 2,4G but it can’t connect to 5G SSIDs. Have you ever tried this and if so, do you have any hints for me? I already tried to find something about selecting the wifi band but had no success.

    Thank you and kind regards,
    Chris

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s