linux UVC and hardware viewer

至于从哪个版本开始内核支持UVC,官方的话是“Linux 2.6.26 and newer includes the Linux UVC driver natively.”

1、查看摄像头ID:

[root@151 dev]# lsusb

Bus 002 Device 013: ID 0ac8:3313 Z-Star Microelectronics Corp.

0xc8:3313在UVC中支持了。

2、插入摄像头后,就可以在/dev/下查看是否有video设备文件:

[root@151 dev]# ls | grep video

video

video0

其中,video是video0的连接。如果没有再现,可能UVC没有配置到内核中,重新配置就可以了

(大致在Device DriversàMultimedia devicesàVideo capture adaptersàV4L USB devices下面)。如果内核配置了,

还是不出现,可以使用modprobe uvcvideo来加载该模块。

3、先看看摄像头的相关信息:

lshal | grep Cam

出现:

info.product = 'Vega USB 2.0 Camera.' (string)

usb_device.product = 'Vega USB 2.0 Camera.' (string)

usb.interface.description = 'Vega USB 2.0 Camera.' (string)

info.product = 'Vega USB 2.0 Camera.' (string)

input.product = 'Vega USB 2.0 Camera.' (string)

info.product = 'Vega USB 2.0 Camera.' (string)

对USB有研究的,就很熟悉这些字段。

再看一下系统能不能识别出摄像头:

[root@151 log]# dmesg | grep Cam

uvcvideo: Found UVC 1.00 device Vega USB 2.0 Camera. (0ac8:3313)

input: Vega USB 2.0 Camera. as /class/input/input6

usb 2-7: Product: Vega USB 2.0 Camera.

uvcvideo: Found UVC 1.00 device Vega USB 2.0 Camera. (0ac8:3313)

input: Vega USB 2.0 Camera. as /class/input/input7

usb 2-7: Product: Vega USB 2.0 Camera.

uvcvideo: Found UVC 1.00 device Vega USB 2.0 Camera. (0ac8:3313)

input: Vega USB 2.0 Camera. as /class/input/input8

usb 2-7: Product: Vega USB 2.0 Camera.

[root@151 ~]# dmesg | grep video

You can install HAL from the PPA.

sudo add-apt-repository ppa:mjblenner/ppa-hal
sudo apt-get update
sudo apt-get install hal

https://www.binarytides.com/linux-commands-hardware-info/

原文地址:https://www.cnblogs.com/SZLLQ2000/p/8481836.html