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)
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.
But 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
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
The next thing you want to do is to run this command
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
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
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!
this 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.