Sunday, December 8, 2013

Realtek RTL8192CU WiFi adapter problems on BeagleBone Black

I recently bought a BeagleBone Black (BBB) to act as my home automation server. This is a really nice board, the size of a credit card, but with quite powerful processor ARM A8 at 1 GHz - equivalent to the initial iPhone. It has a big expansion connector for adding different control boards, called "capes".
It can run Linux or Android OS. And, it costs only $45 (http://www.makershed.com/BeagleBoard_BeagleBone_Black_p/mkcce3.htm)



The only problem is that it does not have a WiFi card built-in. But, you can plug a USB-based WiFi dongle. Edimax EW-7811n is very cheap (<$10 on Amazon: http://www.amazon.com/Edimax-EW-7811Un-Wireless-Adapter-Wizard/dp/B003MTTJOY/ref=sr_1_2?ie=UTF8&qid=1386476449&sr=8-2&keywords=edimax) and supposedly works well on BBB Ubuntu Linux out-the-box. Or, that's what I thought...

After following instructions on the web to configure the the WLAN settings to connect to my secure router, I got it to work, kind of. It was very unstable, very slow and working only once in a while. I could not ping any external servers with it only explicit IP addresses on my network (if it was in the mood). I searched and searched web for updated drivers and solutions. Some drivers I downloaded did not work at all, and hosed even my wired Ethernet LAN. Some posts warned about using underpowered power supply or advocated to use a USB extension cable to reduce electronic interference. Nothing helped. Finally, I stumbled onto this blog post by +Darshan Gencarelle:

http://gencarelle.com/blog/2013/07/19/problems-with-rtl8188cus/

He modified the driver Makefile and described the process of driver compilation and installation. I just changed the portions referring to header files for my Ubuntu distribution version and this worked beautifully. WiFi seems now to be solid and work every time I try. I will test it for the next few days, but my hopes are high the problem is solved now.

I still have one more issue to solve with my BBB Ubuntu setup. The clock seems to come up with wrong date & time whenever I reboot. This is not good, since I intend to use this system to automatically run my sprinkler schedule and we have municipal watering date & time restrictions.. I wouldn't want to get a fine just because my sprinkler controller decided to boot up with wrong time setting...

PS. I also tested this with this generic WiFi adapter (which also uses RTL8192CU chip from RealTek), I bought from Makershed.com:
http://www.makershed.com/WiFi_802_11b_g_n_Module_For_Raspberry_Pi_More_p/mkad55.htm
It seems to work the same as the Edimax adapter.

PS2: I tried to run the board just from USB supplied by my PC and it does not work well. The power supplied by my PC USB host is not enough to run the whole system with WiFi. So, the advice about using sufficient power supply is a valid one.


2 comments:

  1. I would like to develop smart phone home automation. Can beaglebone board using to android app for home automation? Is it possible ? Can anyone help me? thanks...

    ReplyDelete
  2. Take a look at Ninja Blocks. It's an open source home automation controller based on Beagle Bone Black: http://shop.ninjablocks.com/pages/open-source

    ReplyDelete