OpenWrt Forum Archive

Topic: [how to] usb pendrive and webcam SPCA

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all.
Just wanted to share my experience trying to use a webcam and usb pendrives on my nslu2 running Kamikaze 8.09. I've been searching forums all over the weekend with no luck. Hope this will be useful and not a repost...

The webcam runs on my linux PC smoothly, with gspca driver.

I started from a bare kamikaze install, just base packages. First I installed USB support to read pendrives: the packages are...
kmod-usb2 depends on kmod-usb-core
and
kmod-usb-storage depends on kmod-scsi-core

Then, install these packages to be able to mount FAT32 filesystems:
kmod-fs-vfat kmod-nls-base kmod-nls-cp437 kmod-nls-iso8859-1
Reboot and now you can mount usb filesystems via...

mount -t vfat /dev/sda1 /mnt

The tricky part was the webcam. The webcam, when working, should create a /dev/video0 node to interact with.
These packages will provide support for webcam driver and V4L (video for linux) interface.
kmod-video-gspca kmod-video-core
Now the packages for the command line program that can read the webcam:
spcacat libpthread
You plug the camera and... no device is created. Do not try to make it yourself (mknod /dev/video0 c 81 0): it won't work at all.

Well, the answer is that the nslu2 has EHCI USB 2.0 ports, provided by kmod-usb2. BUT, the webcam is USB 1.1 !! USB 1.1 devices need OHCI driver, and it's provided by another package, kmod-usb-ohci . I think it should be required as a dependency to install kmod-video-gspca, but it is not.
Install it, reboot, and then webcam appears in dmesg and creates /dev/video0 EASILY.

Now capture a single picture:

spcacat -d /dev/video0 -f jpg -s 352x288 -N 1 -o

..and that's all

(Last edited by xeper on 23 Feb 2009, 23:31)

Nice smile

Which Webcam are you using?

The webcam is detected as

Bus 001 Device 004: ID 04fc:0561 Sunplus Technology Co., Ltd Flexcam 100
gspca: USB GSPCA camera found.(SPCA561A)
gspca: [spca5xx_probe:4275] Camera type S561
gspca: [spca5xx_getcapability:1249] maxw 352 maxh 288 minw 160 minh 120
usbcore: registered new interface driver gspca
gspca: gspca driver 01.00.20 registered

a really cheap one.

(Last edited by xeper on 24 Feb 2009, 21:20)

Just wondering - why did you decide to use vfat? There is a tutorial for setting ext2/ext3 on a USB drive (ignore the boot part - everything else is up to date).

Hello,

I have some problem installing my webcam.
it is a chicony twinkle dc-2110
I opened the plastic, and inside it is a sn9c101 chip.
I wonder if i choosed the right kmod-video-???
I tryed to install many as i found associations.

example: kmod-video-gspca-sonixb
kmod-video-gspca-sonixj
kmod-video-gspca-sn9c102
kmod-video-gspca-ov511

and of course

kmod-video-gspca-core

and it is not getting any /dev/video

please help.

what driver should i use?

Thanks,
Seb

What’s the USB device ID? That determines which driver you need.

e.g.: 17ef:4807


Alternatively, plug it into a recent Linux PC and run "lsmod | grep spca"

(Last edited by towolf on 13 Apr 2012, 18:08)

i did not find any driver for that webcam inside opkg repository.
i found driver sources but i wonder how can i get a opkg driver from C language sources??!! any ideea?

fortunately i got another webcam which accepted a driver listed in opkg repository.
and it works with new wecam.

brgds,
seb

What is the USB device ID?

hello towolf,
now i'm trying to install a webcam with: 093A:2468
on mxhaard.fr it appears it uses pac207.
i downloaded gspca ipk for pac207 along with the ones in the first post but no /dev/video0 yet. DAMN!!!
what can i do about this?

Best regards,
Seb

viosebi wrote:

hello towolf,
now i'm trying to install a webcam with: 093A:2468
on mxhaard.fr it appears it uses pac207.
i downloaded gspca ipk for pac207 along with the ones in the first post but no /dev/video0 yet. DAMN!!!
what can i do about this?

Best regards,
Seb

does dmesg say anything interesting when you plug the camera?

The discussion might have continued from here.