So I was unlucky to buy a wireless USB adapter that was not supported out of the box by Raspbian for my Raspberry Pi Zero. I thought I did my homework and looked at the compatibility list for the adapter I bought (Realtek 8191 300Mbps 802.11n/g/b USB Wireless WIFI LAN Network Card Adapter). My fault though as I did not read the description that stated the chipset was Realtek 8192. I needed somehow to compile the drivers for the adapter but did not know where to start.
This post is about my journey and woes to compiling the Realtek 8192eu drivers for the Adafruit PiTFT image. If you just want the driver and don't care about my woes or how to compile, here it is realtek_8192eu_adafruit_4.1.14+_pitft.tar.gz.
So on to my story.
As I scoured the internet on how to compile, I came across a thread on the Raspberry Pi forums that has user MrEngman that kindly compiles the drivers and shares it with everyone. Thank you MrEngman!!! I thought yay, no need to compile. My Wi-Fi adapter is working on my Pi Zero.
Then I got the itch to buy a touchscreen. I figure I'll just pony up the extra dollars and buy a 3.5" PiTFT since Adafruit provides support should I need it. First I thought, I better grab Adafruit's PiTFT image and get my wireless adapter to work. I looked to the thread mentioned earlier to see if there was already drivers for the 8192eu compiled for the 4.1.14+ kernel. I tried the naming convention used by MrEngman for the files in his Dropbox but to no avail (maybe it is there but I'm using the wrong filename???). Anyway, so on to my woes of trying to compile the drivers.
Let me preface a bit, I am no Linux guru. I'm a google, copy/paste and pray that it works kind of guy. So please don't laugh at me or call me names.
First I cloned the driver source onto my Pi Zero. I tried many times to compile but came across numerous errors. Google'ing and fixing as I went. Ultimately, I needed the Linux headers for my kernel.
So I cloned the Adafruit's fork and pointed the adapter driver build to it. I came across errors that said stuff were missing as I tried to compile the driver. Forums/posts/blogs mentioned that compiling the kernel would resolve those errors. I tried to compile the Adafruit image, but I came across a slew of errors trying to compile. Oh yeah, like a total newb to compiling kernels, I did this on my Pi. Needless to say, each compile iteration took a day since compiling on the Pi takes super long (at least 8hrs). I Google'd and fixed as necessary and finally had a successful compile after a few days. I jumped for joy.
Then I tried to compile the 8192eu drivers. I came across a few more errors that needed fixing, but eventually got a successful compile. I did a little celebration dance.
Finally, I just had to install the driver and everything would be good or so I thought. Nope, I got a message along the line of invalid format. I tried force install since the error message pointed to something along the line of kernel version the module was compiled for did not match the current running kernel. I tried other iterations of compiling the kernel with different configurations, but no luck. I cried and curled up into fetal position.
I wiped my tears off and said screw this damn wireless adapter and just ordered an adapter from Adafruit that will work out of the box along with the PiTFT.
Well, while I was waiting for my order to come in, I perused around the Adafruit site and came across their Raspberry Pi Kernel-O -Matic. Reading that, I was like crap, I could've been using my faster computer this whole time and cross compile the kernel. Then reading on, they have the PiTFT fork that contains the source and build for the PiTFT image. I was like ahhhhhhh, that maybe the source needed to compile the drivers correctly.
So yeah, I followed the Kernel-O-Matic instructions to compile the PiTFT kernel. On my i7 laptop, compile time was somewhere under 20mins, not sure exactly how fast as I stepped away to eat a snack. I was like wow, so much faster, I just wasted days compiling kernels on the Pi. I felt like smashing my head into a wall, but didn't because it would hurt, I don't like pain, so I just cried instead.
Then I loaded up the Kernel-O-Matic's virtual machine (or container not sure since I'm still new this) with the 8192eu driver source and compiled it from there. I had a successful build (with one minor tweak that I hope doesn't come back to bite me later). I crossed my fingers and installed that driver build, no error message this time, that was a good sign. I rebooted the pi and checked dmesg, no errors reported, another good sign. I then checked for connectivity and I swear I heard trumpets ringing out and saw white doves flying off in the background of my window as I was finally on the Wi-Fi.
So yeah that is my lengthy story of compiling the drivers. Thought I'd share to let other knows they are not alone at making the mistakes I made. Or maybe I am alone since I'm a newb at this sort of stuff.
Next post is a quick run-down of how I compiled the drivers.
This post is about my journey and woes to compiling the Realtek 8192eu drivers for the Adafruit PiTFT image. If you just want the driver and don't care about my woes or how to compile, here it is realtek_8192eu_adafruit_4.1.14+_pitft.tar.gz.
So on to my story.
As I scoured the internet on how to compile, I came across a thread on the Raspberry Pi forums that has user MrEngman that kindly compiles the drivers and shares it with everyone. Thank you MrEngman!!! I thought yay, no need to compile. My Wi-Fi adapter is working on my Pi Zero.
Then I got the itch to buy a touchscreen. I figure I'll just pony up the extra dollars and buy a 3.5" PiTFT since Adafruit provides support should I need it. First I thought, I better grab Adafruit's PiTFT image and get my wireless adapter to work. I looked to the thread mentioned earlier to see if there was already drivers for the 8192eu compiled for the 4.1.14+ kernel. I tried the naming convention used by MrEngman for the files in his Dropbox but to no avail (maybe it is there but I'm using the wrong filename???). Anyway, so on to my woes of trying to compile the drivers.
Let me preface a bit, I am no Linux guru. I'm a google, copy/paste and pray that it works kind of guy. So please don't laugh at me or call me names.
First I cloned the driver source onto my Pi Zero. I tried many times to compile but came across numerous errors. Google'ing and fixing as I went. Ultimately, I needed the Linux headers for my kernel.
So I cloned the Adafruit's fork and pointed the adapter driver build to it. I came across errors that said stuff were missing as I tried to compile the driver. Forums/posts/blogs mentioned that compiling the kernel would resolve those errors. I tried to compile the Adafruit image, but I came across a slew of errors trying to compile. Oh yeah, like a total newb to compiling kernels, I did this on my Pi. Needless to say, each compile iteration took a day since compiling on the Pi takes super long (at least 8hrs). I Google'd and fixed as necessary and finally had a successful compile after a few days. I jumped for joy.
Then I tried to compile the 8192eu drivers. I came across a few more errors that needed fixing, but eventually got a successful compile. I did a little celebration dance.
Finally, I just had to install the driver and everything would be good or so I thought. Nope, I got a message along the line of invalid format. I tried force install since the error message pointed to something along the line of kernel version the module was compiled for did not match the current running kernel. I tried other iterations of compiling the kernel with different configurations, but no luck. I cried and curled up into fetal position.
I wiped my tears off and said screw this damn wireless adapter and just ordered an adapter from Adafruit that will work out of the box along with the PiTFT.
Well, while I was waiting for my order to come in, I perused around the Adafruit site and came across their Raspberry Pi Kernel-O -Matic. Reading that, I was like crap, I could've been using my faster computer this whole time and cross compile the kernel. Then reading on, they have the PiTFT fork that contains the source and build for the PiTFT image. I was like ahhhhhhh, that maybe the source needed to compile the drivers correctly.
So yeah, I followed the Kernel-O-Matic instructions to compile the PiTFT kernel. On my i7 laptop, compile time was somewhere under 20mins, not sure exactly how fast as I stepped away to eat a snack. I was like wow, so much faster, I just wasted days compiling kernels on the Pi. I felt like smashing my head into a wall, but didn't because it would hurt, I don't like pain, so I just cried instead.
Then I loaded up the Kernel-O-Matic's virtual machine (or container not sure since I'm still new this) with the 8192eu driver source and compiled it from there. I had a successful build (with one minor tweak that I hope doesn't come back to bite me later). I crossed my fingers and installed that driver build, no error message this time, that was a good sign. I rebooted the pi and checked dmesg, no errors reported, another good sign. I then checked for connectivity and I swear I heard trumpets ringing out and saw white doves flying off in the background of my window as I was finally on the Wi-Fi.
So yeah that is my lengthy story of compiling the drivers. Thought I'd share to let other knows they are not alone at making the mistakes I made. Or maybe I am alone since I'm a newb at this sort of stuff.
Next post is a quick run-down of how I compiled the drivers.
Comments