UPDATE 01.2017 : With the new Raspbian release these Modules are now fully integrated. So this guide finally becomes obsolete.

I bought 2 cheap Chinese Wifi modules for my Raspberry Pi:



I even checked in the reviews that the Dongles work with RPi but i think they have changed the chip since then so both do not work out of the box!

lsusb just says:

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

I found the following thread and compiled the driver myself:


Check your Kernel version with uname -a and get the right header version for the kernel you are using.

You can get the latest Linux Driver source from here:


sudo apt-get update
sudo apt-get install gcc-4.8 g++-4.8
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 20
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 20
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
cd /home/pi
mkdir src
cd /home/pi/src
mkdir kernel
cd kernel/
wget https://github.com/raspberrypi/linux/archive/rpi-3.18.y.tar.gz
tar xvfz rpi-3.18.y.tar.gz
sudo ln -s /home/pi/src/kernel/linux-rpi-3.18.y /lib/modules/3.18.7-v7+/build
cd linux-rpi-3.18.y/
sudo make mrproper
gzip -dc /proc/config.gz > .config
sudo make oldconfig

sudo vim /home/pi/src/kernel/linux-rpi-3.18.y/arch/arm/kernel/asm-offsets.c

Remove the following lines:

#if GCC_VERSION >= 40800 && GCC_VERSION < 40803
#error Your compiler is too buggy; it is known to miscompile kernels
#error and result in filesystem corruption and oopses.

sudo make prepare
sudo make modules_prepare
wget https://github.com/raspberrypi/firmware/raw/master/extra/Module.symvers

For RPi2:
wget https://github.com/raspberrypi/firmware/raw/master/extra/Module7.symvers
mv Module7.symvers Module.symvers

cd /home/pi/src
tar xfv DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2
cd DPO_MT7601U_LinuxSTA_3.0.0.4_20130913

vi /home/pi/src/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/rt_linux.c

pOSFSInfo-&gt;fsuid = current_fsuid();
pOSFSInfo-&gt;fsgid = current_fsgid();

pOSFSInfo-&gt;fsuid = current_fsuid().val;
pOSFSInfo-&gt;fsgid = current_fsgid().val;

sudo make
sudo make install
Reboot and check dmesg if the driver loaded correctly.

[code language=”bash”]
wpa_passphrase SSID /etc/wpa_supplicant/my-wifi.conf

allow-hotplug ra0
iface ra0 inet static
wpa-conf /etc/wpa_supplicant/my-wifi.conf

If this Article was useful to you, please consider to buy me a Beer.

Leave a Reply

Your email address will not be published. Required fields are marked *