[Balloon] Web Cams on Balloon

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: David Bisset
Date:  
To: balloon
Subject: [Balloon] Web Cams on Balloon
I've been prompted by Wookey to give an update on attaching a USB Web Cam to
the Balloon board.

This presents a number of problems:
a) Making the USB host controller work properly.
b) Finding a web cam.
c) Finding a web cam Linux driver.
d) Finding a web cam Linux driver that ports to the ARM architecture.

Firstly b) c) and d) are solved (see ***note*** for definition of "solved")
by using a Logitech Quickcam Messenger with the qc-usb drivers for the
messenger see:

    http://www.ee.oulu.fi/~tuukkat/quickcam/quickcam.html


Goto "Other Linux Camera Drivers" and follow the Messenger links.

This Linux camera driver has a good history and is more robust than some.
It only provides V4L1 but that's good enough for most people.

V0.1 cleanly cross compiles to ARM with the usual fiddles to Linux source
tree variables in the Makefile, I've not yet tested V0.8.

a) is harder to "solve". I think that all the people involved in the design
of the Balloon board (v2.05) agree that the choice of USB Host controller
was a difficult one, there were may factors that went into the decision.
However the Philips chip has one semi-fatal flaw in that it *needs*, and I
mean *needs*, to be serviced every millisecond. Fine for a dedicated micro,
not so good for a StrongARM running Linux (not known for its hard real time
capability). Thus if you are working your Balloon hard the USB controller
may randomly stop working and need a hardware reset/power cycle, and the
associated reattachment of the USB devices.

The second difficulty is that the standard 116x driver shipped with the
Balloon does not provide ISOCHRONOUS packet support. I have found a
modification to the driver that does (and is under GPL) and I've ported this
to the Balloon (renamed ohci116x to allow the previous deriver to coexist).
I've sent Wookey source so he can test that it compiles in a different build
environment and hopefully he can make that available.

The modified driver also provided support for resetting the Host USB. I have
currently removed this as it requires hardware access to the Host USB reset
line as well as modifications to usb.c I need to find a better way of
providing this that doesn't require such a heavy handed kernel file mod and
will publish a fix when I have one. Using this may require an upgrade to the
CPLD code, a final version for 2.05 is long overdue (on my task list...).
(The Host USB reset line does go to the CPLD so no hardware mods should be
needed)

Finally I've not yet had time to port any of this to Linux 2.6.xx so my
testing has all been done on 2.4.25. However I don't expect this to break
although the Host USB driver may need to be tweaked. However I may be only a
few weeks away from attempting this.

I have managed several frames per second over WLAN (with reduced frame size)

Hope this helps

David Bisset
iTechnic Ltd.

***NOTE***
The Linux camera market is still not recognised by most suppliers so most
drivers are produced by reverse engineering (in some cases data for the
camera chip is available some not). Some cameras are supported but of these
I have not found one that easily ports to the StrongARM architecture and
works with the Balloon host controller, I've tried several (mainly cheap)
Web cams from the Phillips Toucam to the TrustCam series both of which enjoy
a degree of manufacturer support. Logitech does not supply support. As a
consequence the design of the Quickcam Messenger may suddenly change so that
this driver no longer works. You will not see any change in packaging bar
codes, product pack codes etc, or even manufacturer's stock number. One day
you will buy one and it won't work, you'll take it apart and find a totally
different PCB and chip inside... (Usually the USB ID code changes so you can
spot the difference if you look at the debug output. I have taken to doing
this without unwrapping the plastic bag on the camera as this makes it
slightly easier to take back). So "solved" means as of the last time I
bought one that worked (about 4 weeks ago). You have been warned.