I use the Video4Linux API. I'm writing the program that will use the webcam from scratch so I use function-calls directly to the v4l API like grab_one(width,height) etc., but most linux-programs that use webcams use v4l so this is really the way to go anyway. Let's also install both the quickcam-messenger driver and the pwc driver. There's several posts about this already, but I'll save you the trouble. This is for OpenEmbedded on the Verdex.

I assume you've got past the point in the Quick Start guide where you do
bitbake gumstix-basic-image

Assuming you checked out the svn to ~/gumstix/gumstix-oe/, now lets make a custom kernel:
mkdir -p ~/gumstix/gumstix-oe/user.collection/packages/linux
cp -r ~/gumstix/gumstix-oe/com.gumstix.collection/packages/linux/* ~/gumstix/gumstix-oe/user.collection/packages/linux/
cd ~/gumstix/gumstix-oe/tmp/work/gumstix-custom-verdex-angstrom-linux-gnueabi/gumstix-kernel-2.6.21-r1/linux-2.6.21/
make ARCH=arm menuconfig


Configure the kernel like this:
Device Drivers --> USB Support --> Support for host-side USB (<M>)
Device Drivers --> Multimedia Devices --> Video For Linux (<M>)
Device Drivers --> Multimedia Devices --> Video Capture Adapters --> V4L USB Devices --> Your camera, or simply all cameras (<M>)

Close and save.

cat .config > ~/gumstix/gumstix-oe/user.collection/packages/linux/gumstix-kernel-2.6.21/gumstix-custom-verdex/defconfig
bitbake -c rebuild gumstix-kernel


Install the new kernel (see the Getting Started guide). Now you'll need the following files:
kernel-module-compat-ioctl32_2.6.21-r1_gumstix-custom-verdex.ipk
kernel-module-v4l1-compat_2.6.21-r1_gumstix-custom-verdex.ipk
kernel-module-v4l2-common_2.6.21-r1_gumstix-custom-verdex.ipk
kernel-module-videodev_2.6.21-r1_gumstix-custom-verdex.ipk
kernel-module-pwc_2.6.21-r1_gumstix-custom-verdex.ipk
kernel-module-usbvideo_2.6.21-r1_gumstix-custom-verdex.ipk
kernel-module-quickcam-messenger_2.6.21-r1_gumstix-custom-verdex.ipk


They can be found in ~/gumstix/gumstix-oe/tmp/deploy/glibc/ipk/gumstix-custom-verdex/
Transfer them to your verdex in whatever way you fancy. I used a USB memory stick.
Install them in the following sequence:
ipkg install kernel-module-compat-ioctl32_2.6.21-r1_gumstix-custom-verdex.ipk
ipkg install kernel-module-v4l1-compat_2.6.21-r1_gumstix-custom-verdex.ipk
ipkg install kernel-module-v4l2-common_2.6.21-r1_gumstix-custom-verdex.ipk
ipkg install kernel-module-videodev_2.6.21-r1_gumstix-custom-verdex.ipk
ipkg install kernel-module-pwc_2.6.21-r1_gumstix-custom-verdex.ipk
ipkg install kernel-module-usbvideo_2.6.21-r1_gumstix-custom-verdex.ipk
ipkg install kernel-module-quickcam-messenger_2.6.21-r1_gumstix-custom-verdex.ipk


Now you should be good to go. With this setup, when I plug in my webcam, I get:
root@gumstix-custom-verdex:~$
usb 1-2: new full speed USB device using pxa27x-ohci and address 2

usb 1-2: configuration #1 chosen from 1 choice
Linux video capture interface: v2.00
drivers/media/video/usbvideo/quickcam_messenger.c: Logitech Quickcam Messenger USB v0.01
videodev: "QCM USB Camera" has no release callback. Please fix your driver for proper sysfs support, see http://lwn.net/Articles/36850/
drivers/media/video/usbvideo/usbvideo.c: QCM on /dev/video0: canvas=320x240 videosize=320x240
input: QCM button as /class/input/input0
usbcore: registered new interface driver QCM
usbcore: registered new interface driver snd-usb-audio
root@gumstix-custom-verdex:~$ lsusb
Bus 1 Device 2: ID 046d:08f0 Logitech, Inc.
Bus 1 Device 1: ID 0000:0000 
root@gumstix-custom-verdex:~$ ls /dev/video*

/dev/video   /dev/video0


Good luck
Jostein A. Jacobsen

2008/12/10 Shao Chong Oh <mirage.oh@hotmail.com>
Hi Jostein,

How did you interface your webcam with the Verdex? The driver that comes with the webcam normally works only on Windows or Mac, did you write your own driver for the webcam? Hope you can reply directly to my email account and not to the mailing list as I've just unsubscribed from the list. Thanks lots. =)

Regards,
Shao Chong


Date: Sun, 23 Nov 2008 14:21:13 +0100

From: josteija@stud.ntnu.no
To: gumstix-users@lists.sourceforge.net
Subject: Re: [Gumstix-users] Selecting a Microprocessor

2008/11/22 Shao Chong Oh <mirage.oh@hotmail.com>
Hi Jostein,

Thank you very much for your advice. I'm really new to these things and I still have quite a few questions on my mind. In fact this is my first time dealing with microprocessors.

1. May I know if there's already a USB connector on the Verdex motherboard? Or do you have to buy another expansion board?

There is no USB connector on the motherboard itself, it just has the signals capable of USB Host functionality. The easiest way to go would be to get an expansion board with USB Host connector. I haven't looked through them all to see which ones has got it, but my Console-VX expansion board has a USB Host connector. To get a standard Type A connector like the ones on normal desktop/laptop computers you will need a USB connector-converter - available from gumstix.com as well as many other electronics shops.
 
2. How do you connect the I/O devices (monitor, keyboard, mouse) to the Verdex to work on it? Can I just connect through the I/O pins on the Verdex itself? Or is there a need for other components?

I don't know about monitor and mouse, but the normal way of connecting to a gumstix (without setting up a network) is using USART over RS232 and kermit as briefly described here (There is a longer description on some other page, but I can't find it in the documentation anymore. It seems they've removed links to everything other than Overo and Verdex Pro. This one I had bookmarked).

Hope this helps.
Regards
Jostein A. Jacobsen
 


Regards,
Shaochong


Date: Sun, 9 Nov 2008 17:29:49 +0100
From: josteija@stud.ntnu.no
To: gumstix-users@lists.sourceforge.net
Subject: Re: [Gumstix-users] Selecting a Microprocessor


The easiest approach for connecting to a webcam would be to use a motherboard with USB Host capabilities. Of the Basix, Connex and Verdex boards, Verdex is the only one with USB Host. The Overo motherboard will support USB Host, but it's listed as "experimental" and I don't think its working quite yet.

I've currently set up my Verdex XL6P to use a webcam through the Console-VX, but I'm not sure what expansion boards you would use to get both USB Host and Wi-Fi at the same time.

Hope this helps, good luck.

Regards
Jostein A. Jacobsen

2008/11/8 Shao Chong Oh <mirage.oh@hotmail.com>
Hi everyone,

I'm currently looking for a microprocessor that is capable of connecting to a webcam and a wireless chip, so that I can capture, process and then transmit the video images wirelessly. May I know if any product in Gumstix is good for that? Any recommendations/comments? Thanks a lot!

Regards,
Shaochong




Make the most of what you can do on your PC and the Web, just the way you want. Windows Live

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users




Chat online and in real-time with friends and family! Windows Live Messenger



Chat online and in real-time with friends and family! Windows Live Messenger