Topic: Chumby and webcams

So has anyone else tried building webcam drivers for the Chumby?  I'm working on a project involving the Chumby and need to find a webcam that works on the chumby which can also be found in moderate quantities.  I gather the chumby comes with a couple of cam drivers (the CPIA ones), but it appears that cameras supported by that driver are hard to come by.

I've built and tested the following drivers with various cameras, most of them haven't worked:

gspca
http://mxhaard.free.fr/download.html

microdia
http://groups.google.com/group/microdia

qc-usb-messenger
http://home.mag.cx/messenger/

qc-usb
http://qce-ga.sourceforge.net/

All of these except the qc-usb driver crash pretty badly at one point or another, sometimes with a USB error first.  The only problem with qc-usb is that cameras for that driver also seem difficult to find, the one I've been using is an old LEGO camera.

The most promising driver is the qc-usb-messenger driver, with a camera that has this USB ID: 046d:08f0.  The driver loads up, opens the camera, and can stream video from the camera, but the system re-boots when any attempt is made to close the camera handle.  I've looked at the driver source a bit, and there doesn't seem to be anything that's obviously not portable, so I'm at a loss really.

Has anyone else had better luck with these drivers?

Re: Chumby and webcams

The issue may lie with the USB driver - we found some bugs that are being addressed in the upcoming 1.6 firmware update.  In particular, the driver did not properly support some USB transfer modes - not actually mandatory parts of the specification, and therefore not typically operational on most embedded devices, but common enough for some peripherals that we felt it was important to add them.  There was also a bug that also affected the USB ethernet that might be related.

In any case, try again after we release the 1.6 firmware, which is currently in late-stage QA.

Re: Chumby and webcams

Well, that's encouraging smile  Any sort of estimate on when that firmware might be available?  Or possibly even just a beta post of the fixed driver, so that I can do some more testing?

Re: Chumby and webcams

Not sure - I'll look into it.

Re: Chumby and webcams

programmerjorge wrote:

Well, that's encouraging smile  Any sort of estimate on when that firmware might be available?  Or possibly even just a beta post of the fixed driver, so that I can do some more testing?

I've created a patch of the latest usb driver source that can be applied to the 1.5.0 firmware kernel tree.

To download the 1.5.0 kernel, apply the patch and build the new installable kernel image (assuming the toolchain is installed):

mkdir kernel
cd kernel
wget http://files.chumby.com/source/ironforge/build396/align.pl
wget http://files.chumby.com/source/ironforge/build565/linux-2.6.16-chumby-1.5.0.tar.gz
wget http://files.chumby.com/resources/linux-2.6.16-chumby-1.6-usb-driver.patch
tar zxvf linux-2.6.16-chumby-1.5.0.tar.gz
cd linux-2.6.16-chumby-1.5.0/drivers/usb
patch -p0 < ../../../linux-2.6.16-chumby-1.6-usb-driver.patch
cd ../../
ARCH=arm BOARD=mx21ads CROSS_COMPILE=arm-linux- make
perl ../align.pl arch/arm/boot/zImage 
zip k1.bin.zip arch/arm/boot/zImage

Then follow the wiki instructions on Installing the kernel image

Note: This has NOT been tested (other than successfully compiling the kernel).  Proceed at your own risk.

Re: Chumby and webcams

Hi Chumbians:

Any documentation on the webcam driver(s) installed in a standard Chumby?

Thanks,

Bob

Re: Chumby and webcams

Thanks!

Re: Chumby and webcams

bad_bob wrote:

Any documentation on the webcam driver(s) installed in a standard Chumby?

They're pretty standard Linux drivers - presumably the documentation can be found by Googling.  We haven't done anything special.

You should be able to see which ones are built in by downloading the kernel source and doing a "make config" to see how the kernel has been configured.

In any case, you'd still have to find and port an application that use the drivers to get anything useful out of them.  Note also that webcams on Linux are an inherently tricky business even on desktop machines.

Re: Chumby and webcams

Well, turns out the patch didn't fix the problems i've been having.  All of the drivers still crash, with some sort of USB error or segfault.  On at least one driver there seems to be trouble with incomplete USB packets, is there anything in particular that could cause that?

Re: Chumby and webcams

Perhaps - the problem here is that we don't have any Linux-compatible webcams to test with.  It's not currently an "official" feature of the chumby device and therefore not part of the engineering and QA process.

I attempted to buy some webcams to play with in engineering but it's very hard to figure out what works and what doesn't.  I picked up one webcam that was supposed to work, but it turned out that the manufacturer had completely replaced the electronics without changing the model number.

Re: Chumby and webcams

That does seem to cause problems, although all of the webcams I've picked up have had some form of linux support.  If you get a chance and would like to look at that again, you should try a quickcam messenger, with the qc-usb-messenger driver.  That runs pretty stably on a desktop machine, and seems to be fairly well supported (or it was anyway, until it was included in the mainstream kernel).

Re: Chumby and webcams

G'damn propriatary webcams!.....

Re: Chumby and webcams

It works!  After some trial and error, removing bits of the patch and putting them back, I've managed to get the quickcam driver working.

The driver works with the following chunk removed:

@@ -1150,7 +1161,7 @@
         td->len = urb->iso_frame_desc[i].length;
         td->iso_index = i;
 
-        td->dma = urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP;
+        td->dma = (urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP) == 0;
         if (td->dma) {
             td->data = (void *)((unsigned long)urb->transfer_dma + 
                                 urb->iso_frame_desc[i].offset);

I'm not sure I understand what this line does, or why it would cause USB packet errors.  Is it ok to go without?

Re: Chumby and webcams

Hmm...well, to correct my earlier post, it *sort of* works, the camera can be opened once, and a few images can be read from it, but the system crashes when trying to read images the second time around.

15

Re: Chumby and webcams

We're looking into this.  Reverting that particular change looks to be the right way to do it, but it breaks support for some other USB devices.

16

Re: Chumby and webcams

What is the exact model # of the webcam you're using?  We'd like to pick one up to investigate this further.

Re: Chumby and webcams

The camera i've had the best luck with has been the Logitech Quickcam Messenger.  On the tag it says "M/N: V-UM27"

This is where I picked it up:

http://www.newegg.com/Product/Product.a … 6826104078

Also, I'd be happy to do any testing that might help, just let me know what needs to be done

18 (edited by joltdude 2008-06-04 13:17:35)

Re: Chumby and webcams

There are a few cameras out there that are supposed to support a (generic USB class video input device)... Problem is the one i have is a composite USB device.... (Creative Quickcam Optia AF)... You can plug this camera into a Windoze machine and it does not require downloading a creative driver, but works better with it).....though the mic will obviously try to install an audio driver as well..

Wonder if there is an equivalent generic class driver for Linux...
(USB Video Class driver ... UVC)

http://en.wikipedia.org/wiki/USB_video_device_class

http://www.quickcamteam.net/

http://linux-uvc.berlios.de/

http://www.usb.org/developers/devclass_docs

Re: Chumby and webcams

Yeah, there is a uvcvideo driver, I haven't messed with it because the image data it produces isn't quite simple enough for the chumby to handle easily.

Re: Chumby and webcams

any chance someone could post just the k1.bin.zip file from this process?  I don't have a buildenv set up right now and won't have time to do so for a while, but could easily follow the rest of the kernel install process from the usb stick.

Do we have an ETA on 1.6 being released?  Is there a beta test available?

Ken wrote:
programmerjorge wrote:

Well, that's encouraging smile  Any sort of estimate on when that firmware might be available?  Or possibly even just a beta post of the fixed driver, so that I can do some more testing?

I've created a patch of the latest usb driver source that can be applied to the 1.5.0 firmware kernel tree.

To download the 1.5.0 kernel, apply the patch and build the new installable kernel image (assuming the toolchain is installed):

mkdir kernel
cd kernel
wget http://files.chumby.com/source/ironforge/build396/align.pl
wget http://files.chumby.com/source/ironforge/build565/linux-2.6.16-chumby-1.5.0.tar.gz
wget http://files.chumby.com/resources/linux-2.6.16-chumby-1.6-usb-driver.patch
tar zxvf linux-2.6.16-chumby-1.5.0.tar.gz
cd linux-2.6.16-chumby-1.5.0/drivers/usb
patch -p0 < ../../../linux-2.6.16-chumby-1.6-usb-driver.patch
cd ../../
ARCH=arm BOARD=mx21ads CROSS_COMPILE=arm-linux- make
perl ../align.pl arch/arm/boot/zImage 
zip k1.bin.zip arch/arm/boot/zImage

Then follow the wiki instructions on Installing the kernel image

Note: This has NOT been tested (other than successfully compiling the kernel).  Proceed at your own risk.

21

Re: Chumby and webcams

gadgetinspector wrote:

any chance someone could post just the k1.bin.zip file from this process?

We're updating the USB subsystem to address the issue that programmerjorge mentioned (however, there are other devices that this change affects that need to be addressed); once the changes have been checked in and tested, I'll post a new k1.bin.zip.

programmerjorge - feel free to post your k1.bin.zip in the interim (though, keep in mind, Chumby does not warranty devices with modified firmware images).

Re: Chumby and webcams

So I've had no luck playing with the version 1.6.0 firmware, the same issue still arises (the chumby re-boots) when frames are grabbed from the camera.  Can anyone shed some light as to why?

Re: Chumby and webcams

hot dang a chumby that sits there and makes my home open to video (for security etc) would be really useful.

Re: Chumby and webcams

Hey all

Is there any news about this?
Essentially want to capture images from a webcam, store them as jpg and be able to load them into flash widgets
sounds feasible?
otherwise will have to go for something like eye-fi card?
anybody with gphoto or ptp experience?