Beaglebone Black Flaky WiFi

I have been accessing my headless Beaglebone Black via SSH through my local home network from a Windows machine quite nicely for several weeks. It is running Ubuntu 13.04 (GNU/Linux 3.8.13-bone28 armv7l). But I wanted to get it working through WiFi, so that I could start work setting it up as the heart of a 4WD rover project.

I should probably also mention the Beaglebone is connected to a quality bench power supply that can supply 20amps.

First I tried a Netgear N-300 adapter, which uses the Broadcom chip BCM43231. After not finding any success stories about anyone using one of these adapters on an Ubuntu Beaglbone, I decided to order Adafruit’s #814 WiFi adapter, which uses the RTL8192CUS chipset. Adafruit shows how to use it with Angstrom but says it may not work with the 3.8 kernel. But that didn’t stop me from ordering it, as I thought I would have a good chance of finding a way to use it with Ubuntu and my 3.8.13 kernel.

Long story short - I was able to rebuild the driver and get it working just fine with a connected monitor and keyboard. Both the keyboard and WiFi adapter were connected through an unpowered Targus ACH114 (4) port hub to the Beaglebone. By “working just fine” I mean I could SSH connect to it from my Windows machine, I could access external web sites, etc.

So next it was time to go headless again. That meant plugging the WiFi adapter directly into the Beaglebone without the hub, since I didn’t need to plug in a keyboard. This is where the flaky part comes in… it is only intermittently accessible, as in maybe 1 out of 20 attempts. It just times out with no response most of the time.

Eventually I realized it works just fine plugging the WiFi adapter back into the unpowered hub and then into the Beaglebone, but still headless without a monitor or keyboard. Now that seems very strange that the adapter works going through an unpowered hub but not directly plugged into the Beaglebone.

So, I decided to try another small 4 port hub, a Belkin F5U404. It can be powered or not. But guess what? It doesn’t allow access powered or not. In fact it doesn’t seem to be compatible with the Beaglebone at all.

Ok, to wrap this little story up… It did work often enough without the Targus hub to get a lsusb -v report, which is pasted below. I would have pasted a report with the hub, but it is identical. Both show the WiFi adapter needs 500ma.

Bus 001 Device 002: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Couldn’t open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0bda Realtek Semiconductor Corp.
idProduct 0x8176 RTL8188CUS 802.11n WLAN Adapter
bcdDevice 2.00
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 46
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 4
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1

I did also try to measure the current being drawn by the Beaglebone Black with the WiFi adapter plugged into the hub and working. It seems to average between 350 and 450ma. Of course that was with a digital meter and would not reflect higher current spikes.

Does anyone have any ideas? This is going to look silly mounted on my rover with a little usb unpowered hub just to make it work!

Thanks