Setting up D-Link’s DWA 131 E1 nano Wi-Fi adapter to work with Raspbian

dwa-131-nano-adapter-e1-rapsberry-pi-2

I think that i’m beginning to become comfortable with WordPress as it does have some compelling editing features compare to blogger. Today (or tonight), i’ll be doing a tutorial on how you can connect to Wi-Fi on your Rasbperry Pi (any model) running Raspbian (any version).

Of course, none of the Raspberry Pi models to date come with built in wireless connectivity and it’s pretty much an optional accessory because there is a dedicated ethernet port built in. Specifically, i will be guiding you on how to install the drivers for D-Link’s DWA 131 nano adapter rev E1. Your wireless adapter should looks something like this (img below) and if it’s not then you should just skip this tutorial and look elsewhere

(yeah feel free to skip the next two topics if you don’t want to hear my long winded story)

dwa-131-e1-raspberry-pi-2-malaysia

The saga begins

This is actually the newer hardware revision of the DWA 131 nano adapter and the funny story is that when i bought it the guy in the shop actually offered me the older model (img: below) opposed to the newer one and he said that there are some compatibility issues with the newer revision.

116938-dwl-131-front-uk-mediumBut then, i ended up buying the newer model mainly because the price is the same and i would rather get the new revision because it also looks nicer…

Well, little did i know that this nano wifi adapter is NOT plug and play even on Windows 8. Initially, my plan was to use this adapter on my desktop because it is a 300N adapter opposed to my older 150N D-Link adapter. But, with some tough luck, i was facing some technical issues with the adapter on Windows even after installing the drivers through the included disk.

Then i went on to try the DWA 131 on the Raspberry Pi 2 but it just doesn’t work. Mind you, at that time i was fairly new with Raspbian/Linux and i didn’t even know how to connect to Wi-Fi even if the adapter worked. I googled a bit and ended up giving up hope and stashing up the adapter in my table-side drawer.

Two months later

So, i’ve actually finally started to do some programming with the Raspberry Pi 2 and i started off with the shiny new Windows 10 IoT core which is very command line intensive. About last week, i decided to revisit Raspbian (the Raspberry Pi foundation’s OS choice for the Pi) and the setup was quite OK and i had to refer back to my tutorial from a few months back.

Then it came to SSH which stands for Secure Shell and i’ve been using this quite frequently in the past because my monitor does not support HDMI inputs, my router is miles away from my computer and i didn’t want to pay 50 bucks to get a HDMI to VGA adapter. Previously i only ran SSH through the LAN cable because i read somewhere that it doesn’t quite work through Wi-Fi.

But that turned out to be wrong as i managed to run SSH through Wi-Fi with my old D-Link DWA 125 adapter which worked on Raspbian without any additional drivers. Turns out that the IP address for Wi-Fi and LAN connections is different (take Note!), that’s why i couldn’t access my Pi through SSH last time because i was keying in the IP address of the LAN connection for the Wi-Fi SSH.

For a few days, i was happily using SSH through Wi-Fi with my D-Link DWA 125 adapter but today i was getting fed up that the old adapter was taking was blocking one of my USB ports and it was also a little obtrusive (for the eyes). So, i turned to my friend Google again to search for answers and surprisingly i found this forum which linked to the forum which had my answer.

Apparently, only the original D-Link DWA 131 (the more rounded looking one) works out of the box with Raspbian without any drivers and that the new adapter works on Raspbian but requires a dedicated driver

Installing the driver

Finally, the moment you have been waiting for, the solution to this problem. I tried this a few times and i think it finally worked after the 7/8th time. The instructions on the forum is actually quite clear it’s just that i’m not used to reading all the nested forum quotes and i was a little sleepy (and here i am writing this article) so i was a little ignorant towards the important words.

The whole process of installing the drivers took about 5 minutes. You can either do this through SSH or straight from the monitor your Raspberry Pi is connected to. Again, this tutorial is based off MrEngman’s solution on the Raspberry Pi forum, you can check out the thread here

Step 1: getting your kernel and build number

This is a fairly new command for me but this command will tell you your build number and kernel number. What you have to do now is to run the command on the terminal program

uname -a

After typing in that command on to the terminal or your SSH client, you should see something like this

Linux raspberrypi 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux

Take not of the numbers which i underlined and highlighted in bold. The numbers behind the + is the kernel number and the number with the hash symbol is the build number. So it’ll be something like this

kernel: 3.18.11-v7

build: 781

The next thing you want to do is to run this command

wget https://dl.dropboxusercontent.com/u/80256631/8192eu-kernel-build.tar.gz

Following the build and kernel number you obtained earlier, just put them inside the highlighted text. So it’s going to look something like this

wget https://dl.dropboxusercontent.com/u/80256631/8192eu-3.18.11-v7-781.tar.gz

Do note that you will need an active internet connection as this command is basically just downloading the drivers from the cloud. You should see a new file in your file explorer if everything goes well. If you get a 404 Error, do check if you have mistyped the build and kernel numbers

dwa-131-drivers-raspbian

Next is to run this command

tar xzf 8192eu-kernel-build.tar.gz

Again, you will need to plug in your kernel and build number into the highlighted text and it should look something like this

tar xzf 8192eu-3.18.11-v7-781.tar.gz

The final step is to run the installation command and you’re all set to go!

./install.sh

dwa-131-raspbian-driverthis is how your terminal window should look like if everything is successful. A quick reboot and your D-Link DWA 131 should be recognized within Rasbpian and if you have not configured Wi-Fi yet, you can do so via the wpa_gui program or you can follow on this tutorial to connect Wi-Fi on Rasbpian.

Feel free to ask any questions if you have any problems.

dwa-131-nano-adapter-e1-rapsberry-pi-2
The indicator LED should light up if the Wi-Fi adapter is active
Advertisements

30 thoughts on “Setting up D-Link’s DWA 131 E1 nano Wi-Fi adapter to work with Raspbian

  1. Fayadem97x

    Hi, can you help me.
    My english is little but this the problem :

    $ uname -a
    Linux raspberrypi 3.18.7+ #755 …

    $ wget https://dl.dropboxusercontent.com/u/80256631/8192eu-3.18.7-755.tar.gz

    $ tar xzf 8192eu-3.18.7-755.tar.gz

    $ ./install.sh
    sudo cp 8192eu.conf /etc/modprobe.d/.
    sudo install -p -m 644 8192eu.ko /lib/modules/3.18.7+/kernel/drivers/net/wireless
    sudo depmod 3.18.7+
    ERROR: failed to load symbols from /lib/modules/3.18.7+/kernel/drivers/usb/mon/usbmon.ko: Invalid argument
    ERROR: failed to load symbols from /lib/modules/3.18.7+/kernel/drivers/hid/hid-belkin.ko: Exec format error
    ERROR: failed to load symbols from /lib/modules/3.18.7+/kernel/drivers/hid/hid-dr.ko: Exec format error
    ERROR: failed to load symbols from /lib/modules/3.18.7+/kernel/drivers/hid/hid-tmff.ko: Exec format error
    depmod: ../libkmod/libkmod-elf.c:207: elf_get_mem: Assertion `offset size’ failed.

    Reboot to run the driver…

    Like

  2. multinet

    Hello, i’ve downloader the correct files, run ./install.sh and now I don’t have wlan0 anymore (oncluding after reboot). Before I was having a wlan0 but a iwlist scan gave no network available (and also I was unable to connect my network with a correct interface)

    any idea?

    DWA 131 B1 (2001-330d)

    Like

  3. Caton

    Thanks man, that really saved my bacon here. DLINK DWA 131 H/W: E1 with F/W: 5.02 is working on Linux raspberrypi 4.1.19+ #858 😀

    Like

  4. Prasanna

    Excellent, you saved hours of searching and scratching my head for a newbie like me. Tried multiple sites and raspberrypi.org, none worked (may be its my mistake…), but this tutorial made my dw-131 work with rpi model b r1, thanks so much.

    Like

  5. Maurice Clarke

    Excellent tutorial. First I tried with the terminal and got a 404 and then I used PuTTY with copy and paste and now everything works. Thanks a lot

    Like

    1. Hello, I have checked back with my Pi 2 running the latest Debian Jessie. The link is working and the installation is a success. Make sure you double check you kernel and build number, a little difference will affect the whole installation process.

      Like

    1. No prob, somewhat took me some time to get the actual solution. Probably went through the same sites you’ve searched and couldn’t understand most of them. A lot like programming, you need a fresh mind to get the solution

      Like

Drop some words

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s