03 January 2013

Linux drivers for USB wireless adapter DWA-140, hardware rev. B3 on raspberry pi

I finally got my Raspberry Pi, a $35 computer with 512MB ram: http://www.raspberrypi.org
After installing raspbian on it (http://www.raspberrypi.org/downloads), I had to prepare drivers for my USB wireless adapter, D-Link DWA-140 with hardware revision B3.

These are the steps I made

  • Install the raspbian on the SD card, boot Linux, and connect to the Internet using Ethernet
sudo apt-get update && sudo apt-get upgrade -y
Wait a very long time until this finishes, and then reboot:
sudo reboot
After reboot
 sudo apt-get install build-essential linux-headers -y
 Then go to the RaLink website (link found at http://wikidevi.com/wiki/D-Link_DWA-140_rev_B3 and https://help.ubuntu.com/community/WifiDocs/Device/Tenda_W311M)
I had to download the 4th link:

Please input your name and your email address, and save the archive. Next, unpack it:
tar xf DPO_RT5572*
cd DPO_RT5572* 
Change config to support WPA and WPA2
gedit os/linux/config.mk
To build the driver, I had to make a link to the kernel headers:
sudo ln -s /usr/src/linux-headers-3.2.0-3-rpi /lib/modules/3.2.27+/build
Now, build:
This will take some time, and finally give an error about not being able to copy to /tftpboot, which you can ignore. Next, install:
make install
And this should be all.

No comments: