USB WiFi and a USB Webcam Causing BBB To Freeze

I’m trying to set up a remote viewing application using a Logitech C920 webcam and a BBB over a wireless link. The C920 has hardware H264 encoding letting me use less than 10% of the BBB processor load even running at 300MHz.

When I run this command while connected to wired network everythign works as hoped, and I get video streaming at 30fps, using just over 3MBit as measuered at my network switch.

./boneCV/capture -F -o -c108000 | ffmpeg -re -i - -vcodec copy -f rtp rtp://239.8.8.8:8090/

If I boot without the wired network connected, and am running on my 5.8GHz network and I run the exact same command, the unit stops responding on the network after about 10 seconds, and the heartbeat LED stops blinking at about the same time. I can plug in ethernet at that point but the BBB seems to be fully locked up.

I did a basic transfer of a 2GB file over Zmodem/SSH/WiFi and it ran about 10Mb/sec which is close to 3 times the rate that the rtp stream should be generating, so I don’t think it’s a problem with limited bandwidth on the WiFi connection.

Can anyone suggest how to test this, without a Monitor/Keyboard on the unit?

Here’s a little bit of extra information on the devices being used:

root@beaglebone:~# lsusb
Bus 001 Device 002: ID 04b4:6560 Cypress Semiconductor Corp. CY7C65640 USB-2.0 “TetraHub”
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 046d:082d Logitech, Inc.
Bus 001 Device 004: ID 13b1:002f Linksys AE1000 v1 802.11n [Ralink RT3572]

William,

I tried to do what you are doing—setting up a remote USB Webcam feeding a WiFi connection using the Beaglebone Black. I spent countless hours over a several week period, trying multiple revisions of Angstrom and Ubuntu with zero success. I had the benefit of a console serial port connection which showed multiple failure modes, including especially kernel panics of various sorts—which left the Beaglebone in the state that you reported. Between “conman” and the marginally stable WiFi and USB drivers IMHO you are setting yourself up for a world of hurt.

Unfortunately, based on my “lurking” on this forum, it seems that little has changed since I fought my last fight with the Beaglebone Black firmware. My recommendation to you is to put the Beaglebone Black aside for now and switch to something more stable, such as the Raspberry Pi, which is what I did. Maybe one day the Beaglebone Black will make it to the same state as the Beagleboard (and the Raspberry Pi)? We are just going to have to wait and see.

Best regards,

Bruce D. Lightner

P.S.- Those of you that feel compelled to “flame” me (again) about this criticism should save their bits! I recognize all the efforts of those fine people who are trying to make it work, but the Beaglebone Black is not ready for prime time. Deal with it! Most importantly, this situation is unclear given the “hype” that surrounds the otherwise fine BBB hardware. It is unfortunate that people keep getting sucked in by something that simply does not work.

Why do people always generalize the "WiFi" chipset's. Just because
your "WiFi/Chipset/device" does not work does not mean some other
users's "WiFi/Chipset/device" is "also" not going to work.. So make
this post at least useful for later people... What "chipset/device"
and what driver was the chipset using... (lsusb)

As a side note, I'm going to stick with I've said before.. In my
experience, If it isn't an Atheros based chipset, it probably isn't
going to work on arm..

Regards,

When I used to run on the BeagleBoard I had a serial console cable, but I’ve not got the TTL cable adapter for my BBB. I probably should get it, but it’s currently just one more connection I was hoping to avoid if possible. Because of my lockup issues, I couldn’t tell if the problem was related to the ethernet, the USB Hub, or the camera when I’m heavily hitting the process.

For my purpose I’m only interested in running in the 5.8GHz frequencies. The Linksys adapter I’m using is just one that I had on the shelf from an aborted earlier project. Do you have a suggestion of an inexpensive WiFi adapter that has the Atheros chipset?

Another thing that I just now tested, which I thought was kind of interesting. I loaded the camera and the WiFi separately. First I saved the output of the camera to the SD card over the course of an hour, then I streamed the contents of the file over the next hour. No lockups with that situation. It’s just some sort of interaction between the camera and wifi, or perhaps USB.

instead of:

./boneCV/capture -F -o -c108000 | ffmpeg -re -i - -vcodec copy -f rtp rtp://239.8.8.8:8090/

I ran the following two commands.

./boneCV/capture -F -o -c108000 | ffmpeg -re -i - -vcodec copy TestOutput.mp4

ffmpeg -re -i TestOutput.mp4 -vcodec copy -f rtp rtp://239.8.8.8:8090/

hmm might be interesting to capture the stream onto an NFS share and see what happens. Or perhaps try to stream it via Ethernet. Have you tested via Ethernet yet ?

It sounds as though you may be dead set on wifi, but may be worth testing.

My initial testing was streaming via the hardwired ethernet port and everything was working fine there, it’s just when I’m trying to stream my video over wireless that I was running into the problem. I need wireless for the application I’m working on. If I can fix my problem simply by buying a different WiFi adapter I’m all for that route, I just need to know what adapter I should buy. I didn’t notice any of the WiFi adapters in the successful tested list that support 5.8GHz operation which is what I need to be running.

An interesting oddity… When I took out the “-re” realtime option on the streaming file, it pushed the file out as fast as it could onto the network via RTP instead of at 30fps, and the bandwidth went from 3Mbps to over 25MBps without crashing the adapter. (I was measuring via MRTG, so am not positive of the exact max usage since the file transferred significantly faster)

Wim.

I had an interesting item happen to me just now in another test. I had removed my SD card from the micro-sd slot, and had it in a USB adapter. I was un-tarring a large fileset from another USB thumbdrive into the SD card. The BBB locked up.

The USB hub that I’m using is an IOData hub that is very small, which was the original reason I’d purchased it. I’ve never had noticeable problems with it in the past, but it’s possible that it’s related to my problems. I certainly don’t understand how the USB system works. It’s reported as the "04b4:6560 Cypress Semiconductor Corp. CY7C65640 USB-2.0 “TetraHub” as I mentioned in my first post of this thread.

I suppose I should dig around and see if I’ve got another hub I can test things with.

I had a Cisco Linksys USB300M USB Ethernet Adapter sitting around from my BeagleBoard work in the past. I just now booted with it and my camera connected to my old hub. I’ve been streaming video output over that network for nearly half an hour without a hiccup.

I just recently discovered the --verbose option on lsusb, and that it lists the power requirements advertised by the various devices.

root@beaglebone:~# lsusb
Bus 001 Device 002: ID 04b4:6560 Cypress Semiconductor Corp. CY7C65640 USB-2.0 “TetraHub”
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 046d:082d Logitech, Inc.
Bus 001 Device 005: ID 0b95:7720 ASIX Electronics Corp. AX88772
Bus 001 Device 010: ID 13b1:002f Linksys AE1000 v1 802.11n [Ralink RT3572]

I’ll skip the entire output of the Verbose mode, running it through grep.

root@beaglebone:~# lsusb -v | grep -i power
Self Powered
MaxPower 100mA
Per-port power switching
Port 1: 0000.0503 highspeed power enable connect
Port 2: 0000.0503 highspeed power enable connect
Port 3: 0000.0100 power
Port 4: 0000.0503 highspeed power enable connect
Self Powered
Self Powered
MaxPower 0mA
Per-port power switching
Port 1: 0000.0503 highspeed power enable connect
Self Powered
Self Powered
MaxPower 0mA
Per-port power switching
Port 1: 0000.0100 power
Self Powered
(Bus Powered)
MaxPower 500mA
Power Line Frequency
(Bus Powered)
(Bus Powered)
MaxPower 250mA
(Bus Powered)
(Bus Powered)
MaxPower 450mA
(Bus Powered)

This would seem to tell me that the hub itself draws 100mA, my camera may draw up to 500mA, and my WiFi may draw up to 450mA. (And the wired Ethernet may pull up to 250mA)

How much power can the BBB distribute to the hub itself, and what it the chance that my problems have all been power related?

I just looked at the fine print on the power adapter I am using to power my BBB. It lists 5v1.2A. Is that possibly the problem I’ve been having all along?

The old hub that I’ve been using

I just found the following information in SRM for the BBB so I guess to have any chance of reliably using my camera and anything else I’m going to have to use a powered hub. Can anyone recommend an inexpensive, lightweight, powered USB hub that I can power from a 5 volt power supply similar to the one powering the BBB?

5.7 USB1 Host Port

On the board is a single USB Type A female connector with full LS/FS/HS Host support that connects to USB1 on the processor. The port can provide power on/off control and up to 500mA of current at 5V. Under USB power, the board will not be able to supply the full 500mA, but should be sufficient to supply enough current for a lower power USB device supplying power between 50 to 100mA.