Tuesday, July 24, 2012

Cisco Linksys AE3000 WiFi USB Dongle and Linux Driver Installation

So, back again with yet another geek niggle! This time its to do with drivers. 

[ Bored of the  crap that i  have written, jump to the bottom directly, to install the driver :). ]

I was wanting to experiment something with setting up a web server and was very excited to get to work right away! There goes, formatted my personal computer, and installed Ubuntu 12.04 Precise Pangolin. I have a 8GB RAM, good enough eh!, won't compromise with the 32 bit edition, so went for the 64 bit edition. Downloaded the live cd, installed, and was all thrilled to my desktop. Of course i installed it using wired ethernet that ran across my house much to the cribbing's from my wife. I installed ubuntu-desktop as well, for some reason known only to me, and unplugged my wired cable, plugged in my shinny new Cisco AE3000 just to find out that neither ndiswrapper nor compiling driver from the chip-set vendor would work. Mere frustration, without Internet. 

Finally decided to dig into the bare metal, and figured a working solution. Why ndiswrapper when you can get it working natively? So ventured into it, and after 30 minutes of trials and errands, got the "Blue LED" blinking!! and thought might as well share it here, so that someone could benefit from it.

First, why it won't work either way.

1. NDISWRAPPER 1.57(the default that ships with Ubuntu 12.04) needs the 64 bit windows driver, and cisco does not ship the driver with the CD that is included with the WiFi dongle or is it available in the CCO website. I tested using the ndiswrapper on a 32bit ubuntu and even then it complained and was not working. So if you use the "x86" driver under the Windows XP folder in the package cd (Don't use Windows Vista or Windows 7 drivers with ndiswrapper, they are not supported for any cards AFAIK) you could get an error saying "64 bit kernel detected by ndiswrapper". So bottom line it won't work.

2. Option 2, rt2800usb the default module for majority of Ralink chipsets, that comes included with the kernel does not support RT3573 (the chipset used in Cisco AE3000) chipsets. Why? rt3573 is a 3x3 chipset, a relatively new one to linux kernel, and development work is on-going.

3. So! why not go to the chipset vendor and ask for the driver? Thank god it is OPENSOURCE !! Problem, compilation works, module gets installed, but the "Blue LED" won't blink !!!  why ! because it still doesn't recognize the usb device as a WiFi dongle. The AE3000 is not part of the usb device table.

So solution!., start coding!

1. Download and extract the source (provided here). Extract it anywhere doesn't matter.

2. Navigate to the source folder.

3. Make sureyou have "g++", "build-essential" and "linux-headers" installed.

[The above steps are pretty basic, so i'm not posting the commands]

4. Navigate to the following folder and open the file below in your favorite editor.

cd <driver-source-folder>
vim common/rtusb_dev_id.c

5. Look for the following lines, and add the line highlighted in bold. 
[Note: the line highlighted in bold, is the only change you need to make. Its vendor id for Cisco AE3000.]

#ifdef RT3573
    {USB_DEVICE(0x148F,0x3573)}, /* Ralink 3573 */
    {USB_DEVICE(0x7392,0x7733)}, /* Edimax */
    {USB_DEVICE(0x0B05,0x17AD)}, /*ASUS */
    {USB_DEVICE(0x13B1,0x003B)}, /* Cisco LinkSys AE3000 */
#endif /* RT3573 */

6. Close the file, and compile and install the driver.

sudo make -j10 <------- "sudo" is needed
sudo make install

sudo depmod -a
sudo modprobe -v rt3573sta

Bingo !! LED will blink and your device is ready to use.

Easy Enough !! Please add a '+1' :p :) !!