You are not logged in.

#1 2009-10-24 14:41:17

Vladislav IV
Member
Registered: 2008-06-23
Posts: 30

Chicony TwinkleCam, can't open /dev/video0: No such device or address

Hi all ! It's been a long time since my last visit here.

I'm experiencing a problem with a Chicony TwinkleCam webcam. I updated my system last week (I haven't updated it for months, woo...), and I wanted to play with my old webcam.

I had a look at the wiki's howto (http://wiki.archlinux.org/index.php/Webcam_setup), and here is what I done :

Plug in the webcam, no module loaded.

$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 08ff:2580 AuthenTec, Inc. AES2501 Fingerprint Sensor
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 020: ID 06a5:d800 Divio Chicony TwinkleCam
Bus 007 Device 002: ID 093a:2510 Pixart Imaging, Inc. Hama Optical Mouse
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

$ dmesg|tail
usb 7-1: new full speed USB device using uhci_hcd and address 20
usb 7-1: configuration #1 chosen from 1 choice

According to http://mxhaard.free.fr/spca5xx.html, my webcam needs sn9c102. Here we go :

$ sudo modprobe sn9c102
$ lsmod|grep sn9
sn9c102               142468  0 
videodev               37088  1 sn9c102
usbcore               154032  5 sn9c102,usbhid,uhci_hcd,ehci_hcd

$dmesg|tail
Linux video capture interface: v2.00
sn9c102: V4L2 driver for SN9C1xx PC Camera Controllers v1:1.47pre49
usbcore: registered new interface driver sn9c102

Plug the webcam :

$ dmesg|tail
usb 7-1: new full speed USB device using uhci_hcd and address 22
usb 7-1: configuration #1 chosen from 1 choice

$ xawtv
This is xawtv-3.95, running on Linux/i686 (2.6.31-ARCH)
xinerama 0: 1280x800+0+0
can't open /dev/video0: No such file or directory
v4l-conf had some trouble, trying to continue anyway
v4l2: open /dev/video0: Aucun fichier ou dossier de ce type
v4l2: open /dev/video0: Aucun fichier ou dossier de ce type
v4l: open /dev/video0: Aucun fichier ou dossier de ce type
no video grabber device available

Here we are. There is no /dev/video0, nor /dev/video nodes. I made them with the following commands :

# mknod /dev/video0 c 81 0
# chmod 666 /dev/video0
# ln -s /dev/video0 /dev/video
# chown root:video /dev/video*

$ ls -l /dev/video*
lrwxrwxrwx 1 root root     11 oct.  24 16:03 /dev/video -> /dev/video0
crw-rw-rw- 1 root video 81, 0 oct.  24 16:03 /dev/video0

$ groups
tty wheel log locate games kvm network video audio optical storage scanner power users tex ntfs

$ xawtv
This is xawtv-3.95, running on Linux/i686 (2.6.31-ARCH)
xinerama 0: 1280x800+0+0
can't open /dev/video0: No such device or address
v4l-conf had some trouble, trying to continue anyway
v4l2: open /dev/video0: Aucun périphérique ou adresse
v4l2: open /dev/video0: Aucun périphérique ou adresse
v4l: open /dev/video0: Aucun périphérique ou adresse
no video grabber device available

This didn't worked. VLC doesn't work either, nor mplayer. I searched the forum and the Web, but can't find what is the problem. The /dev/videox nodes are not created automatically, and I read somewhere the issue appeared with a kernel update, but I can't get more information, and get my webcam working.

I loaded the bttv module, but it didn't helped. Anyone else having this issue ?

Offline

#2 2009-10-24 14:50:56

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Chicony TwinkleCam, can't open /dev/video0: No such device or address

The xawtv defaults are a bit outdated. Look in /dev/v4l/ instead.

[err... yes, you are in the video group, nevermind wink]

Last edited by byte (2009-10-24 14:58:45)


1000

Offline

#3 2009-10-24 15:02:07

Vladislav IV
Member
Registered: 2008-06-23
Posts: 30

Re: Chicony TwinkleCam, can't open /dev/video0: No such device or address

There is no /dev/v4l/ at all... Must I make the nodes ? I thought they was created by the modules automatically.

Offline

#4 2009-10-24 15:05:28

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Chicony TwinkleCam, can't open /dev/video0: No such device or address

Well, that's odd then.
I'd suspect it's something about that not-updating-for-months thing... did you merge .pacnew files in /etc, look for orphaned files or packages?


1000

Offline

#5 2009-10-24 15:12:53

Vladislav IV
Member
Registered: 2008-06-23
Posts: 30

Re: Chicony TwinkleCam, can't open /dev/video0: No such device or address

byte wrote:

I'd suspect it's something about that not-updating-for-months thing...

Bad thing, eh ? smile

Yes, I merged most of the .pacnew files. Here are the ones remaining :

/etc/group.pacnew
/etc/openldap/ldap.conf.pacnew
/etc/pacman.d/mirrorlist.pacnew
/etc/profile.d/openjdk6.sh.pacnew
/etc/security/limits.conf.pacnew
/etc/security/namespace.init.pacnew
/etc/skel/.bashrc.pacnew
/etc/ssh/sshd_config.pacnew
/etc/ssl/openssl.cnf.pacnew

Don't think any of them is concerned. Here are orphans packages :

$  pacman -Qdt
db4.1 4.1.25-3
xfce4-panel 4.6.2-1

Odd thing, as you said.

Last edited by Vladislav IV (2009-10-24 15:13:13)

Offline

#6 2009-10-24 16:26:06

Vladislav IV
Member
Registered: 2008-06-23
Posts: 30

Re: Chicony TwinkleCam, can't open /dev/video0: No such device or address

According to http://bugs.gentoo.org/275527, maybe udev isn't creating the device nodes.

Here's what 'udevadm monitor' returns when I insert the sn9c102 module :

$ udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[1256401272.476054] add      /module/v4l1_compat (module)
UDEV  [1256401272.476361] add      /module/v4l1_compat (module)
KERNEL[1256401272.483841] add      /module/videodev (module)
KERNEL[1256401272.484089] add      /class/video4linux (class)
UDEV  [1256401272.484464] add      /module/videodev (module)
UDEV  [1256401272.484509] add      /class/video4linux (class)
KERNEL[1256401272.488384] add      /module/sn9c102 (module)
KERNEL[1256401272.488563] add      /bus/usb/drivers/sn9c102 (drivers)
UDEV  [1256401272.488583] add      /module/sn9c102 (module)
UDEV  [1256401272.488742] add      /bus/usb/drivers/sn9c102 (drivers)

And when I plug the webcam in :

$ udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[1256401560.570774] add      /devices/pci0000:00/0000:00:1d.2/usb7/7-1 (usb)
KERNEL[1256401560.572277] add      /devices/pci0000:00/0000:00:1d.2/usb7/7-1/7-1:1.0 (usb)
KERNEL[1256401560.572348] add      /devices/pci0000:00/0000:00:1d.2/usb7/7-1/usb_device/usbdev7.4 (usb_device)
UDEV  [1256401560.577772] add      /devices/pci0000:00/0000:00:1d.2/usb7/7-1 (usb)
UDEV  [1256401560.577801] add      /devices/pci0000:00/0000:00:1d.2/usb7/7-1/usb_device/usbdev7.4 (usb_device)
UDEV  [1256401560.585380] add      /devices/pci0000:00/0000:00:1d.2/usb7/7-1/7-1:1.0 (usb)

Maybe it helps ? I still don't know what to do. I don't think that udev rules are broken, are they ?

Last edited by Vladislav IV (2009-10-24 16:28:57)

Offline

#7 2009-10-24 17:25:58

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 834
Website

Re: Chicony TwinkleCam, can't open /dev/video0: No such device or address

According to http://mxhaard.free.fr/spca5xx.html, my webcam needs sn9c102

Actually, according to that page it doesn't. It is for another webcam with ID 0c45:600d.

Btw I was the one who reported that cam many years ago :^)

Bus 007 Device 020: ID 06a5:d800 Divio Chicony TwinkleCam

You should always do a search on Google based on the ID not by name. I don't want to do the work for you, but a quick search suggested that this chipset is covered by nw802 project http://nw802.sourceforge.net  You should double check.

You had a good chance of getting the cam working trough the spca project just because it covers a lot of cams. But when available you should always test the proper driver, in most cases the picture quality and support is better.

Btw in my case and that old cam it was the opposite. The advertised driver was crap, picture was awful, and thanks to Michel Xhaard and his project I had a usable cam.

Last edited by anrxc (2009-10-24 17:28:37)


You need to install an RTFM interface.

Offline

#8 2009-10-24 18:47:59

Vladislav IV
Member
Registered: 2008-06-23
Posts: 30

Re: Chicony TwinkleCam, can't open /dev/video0: No such device or address

anrxc wrote:

You should always do a search on Google based on the ID not by name. I don't want to do the work for you, but a quick search suggested that this chipset is covered by nw802 project http://nw802.sourceforge.net

Correct, I'm not very familiar with the hardware side of Linux smile

I got the module sources, as well as some patch and info from http://ubuntuforums.org/showthread.php?t=1080759. I still have some compilation problems, but I should manage to get this module working. I'll post back when I have tested it.

Thanks for your help !

Offline

#9 2009-10-27 15:11:01

Vladislav IV
Member
Registered: 2008-06-23
Posts: 30

Re: Chicony TwinkleCam, can't open /dev/video0: No such device or address

Hi, new info : I applied the 2.6 patch as well as the 100-compile_fix.patch from the link I previously posted. I'm almost there smile

Little problem remaining :

$ make
ln -sf /lib/modules/`uname -r`/build/drivers/media/video/usbvideo/usbvideo.h .
ln -sf /lib/modules/`uname -r`/build/drivers/media/video/usbvideo/usbvideo.c .
make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd` modules
make[1]: entrant dans le répertoire « /usr/src/linux-2.6.31-ARCH »
  CC [M]  /fichiers/tmp/nw802-2.4/nw8xx_jpgl.o
/fichiers/tmp/nw802-2.4/nw8xx_jpgl.c: In function 'decodeBlock':
/fichiers/tmp/nw802-2.4/nw8xx_jpgl.c:421: attention : suggest parentheses
around operand of '!' or change '&' to '&&' or '!' to '~'
  CC [M]  /fichiers/tmp/nw802-2.4/nw802.o
  LD [M]  /fichiers/tmp/nw802-2.4/nw8xx.o
make[2]: *** Pas de règle pour fabriquer la cible « /fichiers/tmp/nw802-2.4/usbvideo.c »,
nécessaire pour « /fichiers/tmp/nw802-2.4/usbvideo.o ». Arrêt.
make[1]: *** [_module_/fichiers/tmp/nw802-2.4] Erreur 2
make[1]: quittant le répertoire « /usr/src/linux-2.6.31-ARCH »
make: *** [default] Erreur 2

Translation : no rules to make target « /fichiers/tmp/nw802-2.4/usbvideo.c », required by « /fichiers/tmp/nw802-2.4/usbvideo.o ».

I don't really know where to find this 'usbvideo.c', though... I have the header somewhere (usbvideo.h), but not the source. Is it a part of the kernel sources ? Must I download the kernel sources, via ABS for example ?

The README says one must have the kernel sources of the distribution installed. I have the kernel26 package installed, that's all that I can say.

Last edited by Vladislav IV (2009-11-12 16:22:10)

Offline

#10 2009-11-12 16:20:49

Vladislav IV
Member
Registered: 2008-06-23
Posts: 30

Re: Chicony TwinkleCam, can't open /dev/video0: No such device or address

I had some time to work on it again, here's new info.

I managed to compile the driver by downloading usbvideo.c from the kernel sources. The driver compiled flawlessly. I tried to insert the modules as explained in README :

 # modprobe videodev
 # insmod usbvideo.o
 # insmod nw802.o

The two compiled modules won't be inserted (invalid module format). I inserted the .ko versions of these two (used by 2.6 kernels, if I understood right) :

# insmod usbvideo.ko
# insmod nw8xx.ko

All seemed to be ok :

$ udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[1258042080.301590] add      /module/usbvideo (module)
UDEV  [1258042080.303433] add      /module/usbvideo (module)
KERNEL[1258042087.633750] add      /module/nw8xx (module)
KERNEL[1258042087.634185] add      /devices/virtual/misc/nw8xx (misc)
UDEV  [1258042087.635055] add      /module/nw8xx (module)
UDEV  [1258042087.635114] add      /devices/virtual/misc/nw8xx (misc)
KERNEL[1258042087.635237] add      /bus/usb/drivers/nw802 (drivers)
UDEV  [1258042087.636951] add      /bus/usb/drivers/nw802 (drivers)
$ dmesg|tail
Linux video capture interface: v2.00
usbcore: registered new interface driver nw802
nw802.c: Module loaded

Plug in the webcam :

$ dmesg|tail
usb 7-1: new full speed USB device using uhci_hcd and address 10
usb 7-1: configuration #1 chosen from 1 choice
$ udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[1258042228.763940] add      /devices/pci0000:00/0000:00:1d.2/usb7/7-1 (usb)
KERNEL[1258042228.764738] add      /devices/pci0000:00/0000:00:1d.2/usb7/7-1/7-1:1.0 (usb)
KERNEL[1258042228.764794] add      /devices/pci0000:00/0000:00:1d.2/usb7/7-1/usb_device/usbdev7.11 (usb_device)
UDEV  [1258042228.770934] add      /devices/pci0000:00/0000:00:1d.2/usb7/7-1 (usb)
UDEV  [1258042228.772496] add      /devices/pci0000:00/0000:00:1d.2/usb7/7-1/usb_device/usbdev7.11 (usb_device)
UDEV  [1258042228.778403] add      /devices/pci0000:00/0000:00:1d.2/usb7/7-1/7-1:1.0 (usb)

Still no /dev/videoX nor /dev/v4l/. Still not working, even if I make the nodes.

Offline

Board footer

Powered by FluxBB