Mediatek 7630 on Ubuntu

We are now proud owners of an ASUS TP500LA-AB52T laptop.  It is a new laptop to help my wife with her new teaching job.  I have installed Ubuntu on it so that it matches the rest of the computers in the house.

The first issue is that the wireless doesn’t work on first boot.  This is a major blow because the point of the laptop was so that she could catch up on her teaching plans anywhere.  Being tethered to the router in the back room kind of defeats the purpose.

Here’s the wireless card information:

$ lspci | grep -i wireless<br />
03:00.0 Network controller: MEDIATEK Corp. MT7630e 802.11bgn Wireless Network Adapter

The fix was to just to manually install the wireless driver.  I found a bug post with fairly good instructions (Thank you keshara Dorakumbura).

Getting the Driver

First, I downloaded the driver from MediaTek’s website:

MediaTek Driver Download

I saved the zip file to my Downloads directory and used the right click menu to extract it there.

The next step is to copy the MT7650E234.bin file to the /lib/firmware/ directory.

cd Downloads/MT7630E_Wi-Fi_BT_Source_V3.14_20140625_v2/<br />
cd firmware/Wi-FI/<br />
sudo cp MT7650E234.bin /lib/firmware/

Preparing the Source Code

For this step, I needed to know the version of my kernel.  uname -r does the trick:

$ uname -r<br />
3.13.0-34-generic

The first two numbers are what I needed.  For me, that was “3.13”.

Next, I changed the DRV_VERSION variable from 2.3.0 to 2.3.1.  I’m not sure why, but it made it work.  The change is in the rt2x00/rt2x00.h file.

I opened the file with these commands:

cd ../..<br />
cd rt2x00/<br />
gedit rt2x00.h

In the file, I changed this line:

#define DRV_VERSION "2.3.0"

to:

#define DRV_VERSION "2.3.1"

Next, the directory needs to be changed to match the kernel version.  For me, my version was 3.13.  So, I renamed the directory from rt2x00 to “rt2x00-3.13“.

cd ..<br />
mv rt2x00 rt2x00-3.13

Now that the directory has the correct name, we need it copied into the /usr/src/ directory:

sudo cp -r rt2x00-3.13/ /usr/src/

dkms

Now, we are ready for dkms to get the compiling/installing job done.

First we need to create a new dkms configuration file (dkms.conf).  I opened the new file with this command:

sudo gedit /usr/src/rt2x00-3.13/dkms.conf

Then, I added these contents into the file:

</p>
<p>PACKAGE_NAME=&quot;rt2x00&quot;<br />
PACKAGE_VERSION=&quot;3.13&quot;<br />
AUTOINSTALL=&quot;yes&quot;<br />
OBSOLETE_BY=&quot;&quot;<br />
BUILD_EXCLUSIVE_KERNEL=&quot;&quot;<br />
POST_INSTALL=&quot;&quot;<br />
POST_REMOVE=&quot;&quot;</p>
<p>BUILT_MODULE_NAME[0]=&quot;rt2x00lib&quot;<br />
DEST_MODULE_LOCATION[0]=&quot;/updates&quot;</p>
<p>BUILT_MODULE_NAME[1]=&quot;rt2x00pci&quot;<br />
DEST_MODULE_LOCATION[1]=&quot;/updates&quot;</p>
<p>BUILT_MODULE_NAME[2]=&quot;rt2x00mmio&quot;<br />
DEST_MODULE_LOCATION[2]=&quot;/updates&quot;</p>
<p>BUILT_MODULE_NAME[3]=&quot;rt2800lib&quot;<br />
DEST_MODULE_LOCATION[3]=&quot;/updates&quot;</p>
<p>BUILT_MODULE_NAME[4]=&quot;rt2800pci&quot;<br />
DEST_MODULE_LOCATION[4]=&quot;/updates&quot;</p>
<p>

Note that the instructions say that the package version must match your kernel version.  (Remember the uname command above?)  It already matched for me (3.13) — PACKAGE_VERSION=”3.13″

Don’t forget to install dkms.  If you forget, you’ll get “command not found”:

$ sudo dkms add -m rt2x00 -v 3.13<br />
sudo: dkms: command not found

It’s easy to install:

sudo apt-get install dkms

Once dkms is installed, I ran these three commands:

sudo dkms add -m rt2x00 -v 3.13<br />
sudo dkms build -m rt2x00 -v 3.13<br />
sudo dkms install -m rt2x00 -v 3.13

Note that the original instructions had a fourth command with force on it.  I didn’t need that.  I’m not sure what situations would call for the force.

Loading the Modules

The last step of the process is to add in the modules for loading.  Add them to the /etc/modules file:

sudo gedit /etc/modules

I added these lines to the bottom:

eeprom<br />
eeprom_93cx6<br />
crc-ccitt<br />
cfg80211<br />
mac80211<br />
rt2x00lib<br />
rt2x00pci<br />
rt2x00mmio<br />
rt2800lib

That seemed to do the trick!  After rebooting, I had wireless connectivity!

Resources

Leave a Comment

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