Select Page

I needed to compile drivers for the Raspberry Pi Edimax AC450 EW-7711ULC Nano USB WiFi Adapter that I picked up for less than $20 at Amazon to bring 5GHz connectivity to both my RPi2 & RPi3B.

OF COURSE I check the officially supported devices list after I bought them, only to find these specific adapters weren’t on the list, so basically I was on my own.

After doing a few days of research, I determined this wasn’t going to be easy, but in theory it should be possible.

*** Updated 09/23/2017 *** Added section WiFi configs necessary to get connected easily

*** Updated 11/21/2016 *** Added section Building the new module prior to rebooting into a new kernel update

Starting off with the RPi2

Perform a full update. Install packages required for the build process. Then run rpi-update to bring in the most recent firmware updates, followed by a reboot if it finishes without errors.

I’ve plugged in the Edimax adapter and it shows up on the USB bus: vendor ID 7392 device ID a711 (so you know this is exactly the same device as the one you’re trying to get working).

WiFi configs necessary to get connected easily

These are the configs that have been working well for me, keeping the RPi3 well-connected to the Asus/DD-WRT for a long time, so thought I would post them here because it could be possible to waste many hours as you’re trying to get everything dialed in just right.

Add the new config to the bottom of the network interfaces file. Make sure to change the WiFi settings to fit your needs.

It’s also important to note, anywhere you need to enter the key, it’s not the plain text version of the passphrase, it’s actually a big long string of hex.
To get your hex passphrase:

Now add the network block to your wpa_supplicant.conf with a few extra lines shown below.

And the interfaces file only needs a few quick edits:

There is one more place to add configuration, but it doesn’t just exist yet.

Kernel Headers

Now we need to get the linux kernel ready to build a module against it.

To do this, you have three options.

Option 1: Install a package with apt

If that completes successfully, great! You can now skip straight to driver compilation section.

If not, you still have another fairly easy option.

Option 2: Manually download & install a pre-built package

Based on the version of kernel that you’re running or upgrading to, Raspbian (jessie) doesn’t always provide an equivalent package for the same version of kernel headers, which are imperative for a successful build process. This could potentially send you on an endless pursuit for a kernel headers package which don’t exist.

Thankfully, Dewey Williams has commented with a link where you should be able to find almost any version of kernel headers that you need, specifically for the RPi.

And if that doesn’t work for you, then you’ll have to create your own custom kernel headers package manually.

Option 3: Roll your own custom kernel headers

Now import the previous kernel config and run make oldconfig.

Prep the kernel with these two commands.

Grab this symbols file and then the kernel is ready to go.

In case this doesn’t work for you the first time around, you can reset the kernel back to a fresh state by running these commands.

Don’t forget that your .config and the Module.symvers will have been wiped out, and you’ll need to reload your config again.

The WiFi Driver

You can download the driver source from Edimax or get the file directly from their site).

Next get this patch bundle (updated 9/23/2017) from Github and run the script.

You should be ready now for a clean build process.

Compile time on the RPi 2 took 21:15. You’ll probably see quite a few warnings throughout, but if everything finishes without errors, you should be good to go.

Building a new WiFi module prior to rebooting into a new kernel update

If apt-get has downloaded & installed a new kernel, you can safely & easily recompile another module for the new kernel before rebooting the RPi. Otherwise everything will be broken when it boots into the new kernel.

Modify the Makefile and hard code the newly installed version (check /usr/src for the corresponding newly installed linux-headers-x.x.xx). If the headers are missing for the version you need, get the correct kernel header version here.

I’ve commented out the lines with uname (as we’ve yet to boot the new kernel), and added the lines below with the new version. Don’t forget to make sure the paths that you specify here are valid or the build will fail.

After adding the two lines, save & exit.

Run make -j4 and then wait for the build to complete.

Then run make install… don’t be afraid of any errors you see here. The module will be installed to the proper location for the new kernel. You can double check by looking for mt7650u_sta.ko in /lib/modules/x.x.xx-xx-x/kernel/drivers/net/wireless/.

The part that fails during make install is depmod.

Just run it again with the correct version number this time.

Almost ready for a reboot, but here’s that final configuration file that needs to be edited.

Make sure to edit /etc/Wireless/RT2870STA/RT2870STA.dat and add your SSID and PSK. Most of the configuration should already be set from when we ran the gist and patched the driver files eariler.

Now hold your breath & give it a reboot.

Don’t stress too much though, the blue light came on almost immediately for me and I was once again connected via WiFi with the RPi having booted the new kernel.


Now you should see the blue light on the WiFi adapter, and it should be trying to join to the network using the settings you defined in /etc/network/interfaces.

Verify that everything is working properly with these commands.

Follow the exact same procedure for RPi 3B

Compile time for the RPi 3B only took 3:57! So snappy compared to the RPi2. On the most recent kernel update 4.4.26-v7+ (released October 25th, 2017), based on a suggestion provided in a comment by Harold Feit, adding the -j4 parameter to make has reduced the build process on the 3B by 1:31 – that’s 37% faster than running make by itself. Makes perfect sense in order to take full advantage of RPi 3B’s 4 cores. Thanks Harold.

The only thing different that I ran into here, was the final make install didn’t actually install the dat file correctly, so I had to copy it manually.

I had a helluva time getting this to work, on two different platforms no less. Hopefully this helps you to compile the driver and get up and running with your WiFi without too much headache.

If you need to start over again in the driver source tree, this command will reset you back to the beginning. (Must’ve done it at least 50 times myself.)

Also, if the driver is compiling successfully, but modprobe complains when you try to load it, you might try installing the kernel headers package and linking them to your modules directory: /lib/modules/4.4.13-v7+/build → /usr/src/linux-headers-4.4.13-v7+/

Otherwise how’d it go? Did you get it to work? Run into any issues? Share your experience below in the comments.