2

The goal was actually quite simple, I was trying to get a USB camera to work on Linux. After installing uvc, uv4l (bcm2835 kernel module I guess), it still doesn't work.

Currently, I got the following char files created during installation and debug:

crw-rw-rw-  1 root video   240,   0 Jul  4 20:24 video0
crw-rw-rw-+ 1 root video    81,   0 Jul  4 20:24 video10
crw-rw-rw-+ 1 root video    81,   1 Jul  4 20:24 video11
crw-rw-rw-+ 1 root video    81,   2 Jul  4 20:24 video12
crw-rw-rw-  1 root video   239,   0 Jul  4 23:01 uv4l

The last uv4l only appears after I run the uv4l command and disapper after reboot.

When I use dd or other programs to call the char file, it outputs an Input/output error. So I start to check on the kernel module or driver. I was thinking maybe the char file is not registered correctly to the kernel module.

This is the output of udevadm info -a -n /dev/uv4l:

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/virtual/cuse/uv4l':
    KERNEL=="uv4l"
    SUBSYSTEM=="cuse"
    DRIVER==""

The driver associated with the uv4l char file is nothing, and there is no device folder under /sys/dev/char/major#:minor#/ according to this answer. The same situation goes to char file videoX.

Does this mean my guess is correct? That the uvc driver is not installed properly?

Here are some relevant output of lsmod:

bcm2835_codec          36864  0
bcm2835_v4l2           45056  0
v4l2_mem2mem           24576  1 bcm2835_codec
v4l2_common            16384  1 bcm2835_v4l2
videobuf2_vmalloc      16384  1 bcm2835_v4l2
bcm2835_mmal_vchiq     32768  2 bcm2835_codec,bcm2835_v4l2
videobuf2_dma_contig    20480  1 bcm2835_codec
videobuf2_memops       16384  2 videobuf2_dma_contig,videobuf2_vmalloc
videobuf2_v4l2         24576  3 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem
videobuf2_common       45056  4 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
snd_bcm2835            24576  1
videodev              200704  6 bcm2835_codec,v4l2_common,videobuf2_common,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
snd_pcm               102400  2 snd_usb_audio,snd_bcm2835
media                  36864  2 videodev,v4l2_mem2mem

And cat /proc/devices shows the following (short):

81 video4linux
239 uv4l
240 video0

It seems all necessary kernel module are installed, why does the char files not associate with these drivers? Or did I misunderstand some basic concepts here? Thank you.

  • 1
    Where does uv4l come from? Otherwise, yes, there is something wrong somewhere it seems. How did you install uvc since it is embedded with the kernel? – Paradox Aug 6 '19 at 15:43
  • which kernel and OS are you running exactly? had a cam which didnt work with stretch but started working with buster plug and play :/ – x29a Sep 22 '19 at 3:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.