Problems with Realtek RTL8188CUS

The Miniature WiFi module from Adafruit does not work with Ubuntu 13.04 on the BeagleBone Black. Wish I knew that before I purchased it. Would have saved me many hours of work. Strap in, this one is a bit ugly.

814_MED

The instructions are for the ubuntu-13.04-armhf-minfs-3.8.12-bone17.img.xz image. If you use a different image it should still work. Just make sure you have the correct kernel headers installed.

1. Grab the modified driver from here:
wget https://realtek-8188cus-wireless-drivers-3444749-ubuntu-1304.googlecode.com/files/rtl8192cu-tjp-dkms_1.6_all.deb

2. Update the available package information
apt-get update

3. Grab the kernel headers and install
wget http://rcn-ee.net/deb/raring-armhf/v3.8.12-bone17/linux-headers-3.8.12-bone17_1.0raring_armhf.deb
dpkg -i linux-headers-3.8.12-bone17_1.0raring_armhf.deb

5. install the dkms package and all its dependencies
apt-get install dkms

6. Install the rtl8192cu-tjp-dkms_1.6_all.deb package. Its going to fail, dont be concerned. We aren’t done yet!
dpkg -i rtl8192cu-tjp-dkms_1.6_all.deb

7. Fix the missing arch type
cd /usr/src/linux-headers-3.8.12-bone17/arch/
ln -s arm armv7l

8. Fix a problem with the timex.h header
vi /usr/src/linux-headers-3.8.12-bone17/arch/armv7l/include/asm/timex.h

change line 18 from

#include <mach/timex.h>

to

#include </usr/src/linux-headers-3.8.12-bone17/arch/arm/include/asm/timex.h>

9. Run make to build the driver

cd /usr/src/rtl8192cu-tjp-1.6
make

10. Copy the new module in to the kernel modules directory
cp 8192cu.ko /lib/modules/3.8.12-bone17/kernel/drivers/net/wireless/

11. Update the module deps
depmod

12. Blacklist the native drivers.
vi /etc/modprobe.d/blacklist.conf

add this to the end:

# Blacklist native RealTek 8188CUs drivers
blacklist rtl8192cu
blacklist rtl8192c_common
blacklist rtlwifi

13. reboot

Its OK to now remove the driver source under /usr/src/rtl8192cu-tjp-1.6 if you need to free up some disk space.

That’s it. Hopefully all the steps worked for you. If not leave me a message. Enjoy!