Friday, November 15, 2013

MediaTek/Ralink WiFi Adapter in Raspberry PI

How to make MediaTek/Ralink MT7601 work with Raspberry Pi


I bought USB WiFi adapter for my Raspberry Pi recently. The adapter had a MediaTek MT7601 chip. I was eager to create a media center for my home. I installed OpenElec and hoped everything would work. OpenElec worked great but it did not include a driver for the relatively new MediaTek MT7601.

I googled around but could not get any ready-made drivers. Finally, I decided to download the driver source and compile it myself.

This driver works with following configuration:

$ lsusb
Bus 001 Device 004: ID 148f:7601 Ralink Technology, Corp.

OpenElec did not allow me to write to /lib, /etc directories. So, I ended up installing Raspbian which allowed me to edit /lib, /etc directories.

How to use this driver:

  • Copy mt7601Usta.ko to /lib/modules/<version>/kernel/drivers/net/wireless
  • Create directory /etc/Wireless/RT2870STA
  • Copy RT2870STA.dat to /etc/Wireless/RT2870STA directory
  • Run sudo depmod -a
  • Add the below text to /etc/network/interfaces. Note that quotes around SSID and password are required
auto ra0
allow-hotplug ra0
iface ra0 inet dhcp
wpa-ssid "ENTER YOUR NETWORK SSID"
wpa-psk "ENTER YOUR NETWORK PASSWORD"
  • Change the permissions of this file to 600, so that only root can read your wireless network password
# chmod 600 /etc/network/interfaces
  • Reboot!
  • Run lsmod to verify if the driver is loaded
$ lsmod
mt7601Usta            798542  1 
  • Run ifconfig to make sure that the network interface ra0 is available

Update on 22 June 2014

My recent firmware update to 3.12.22+ broke the driver. I recompiled the driver with 3.12.22+ kernel version.




Firmware version Driver
3.6.11+ Dropbox link
3.12.22+ Dropbox link

    Troubleshooting:

    • Look for hints from output of dmesg command