Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #7495

assigning specific /dev/videoN to specific USB webcams

From J G Miller <miller@yoyo.ORG>
Newsgroups comp.os.linux.misc
Subject assigning specific /dev/videoN to specific USB webcams
Date 2013-03-17 19:20 +0000
Organization A noiseless patient Spider
Message-ID <ki552n$nat$1@dont-email.me> (permalink)

Show all headers | View raw


Is it possible to create a udev rule to assign specific
/dev/videoN numbers to USB  webcams. 

The driver is uvcvideo but video4linux is involved because udevadm reports

 KERNEL=="video0"
 SUBSYSTEM=="video4linux"
 DRIVER==""
 ATTR{name}=="Philips SPC 1300NC Webcam"
 ATTR{index}=="0"

and /var/log/udev

UDEV  [6.985589] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-3/2-3:1.0/vide
o4linux/video0 (video4linux)
ACTION=add
COLORD_DEVICE=1
COLORD_KIND=camera
DEVLINKS=/dev/v4l/by-id/usb-Philips_CE_Philips_SPC_1300NC_Webcam-video-index0 /d
ev/v4l/by-path/pci-0000:00:1d.7-usb-0:3:1.0-video-index0
DEVNAME=/dev/video0
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb2/2-3/2-3:1.0/video4linux/video0
ID_BUS=usb
ID_MODEL=Philips_SPC_1300NC_Webcam
ID_MODEL_ENC=Philips\x20SPC\x201300NC\x20Webcam
ID_MODEL_ID=0331
ID_PATH=pci-0000:00:1d.7-usb-0:3:1.0
ID_PATH_TAG=pci-0000_00_1d_7-usb-0_3_1_0
ID_REVISION=0100
ID_SERIAL=Philips_CE_Philips_SPC_1300NC_Webcam
ID_TYPE=video
ID_USB_DRIVER=uvcvideo
ID_USB_INTERFACES=:0e0100:0e0200:010100:010200:
ID_USB_INTERFACE_NUM=00
ID_V4L_CAPABILITIES=:capture:
ID_V4L_PRODUCT=Philips SPC 1300NC Webcam
ID_V4L_VERSION=2
ID_VENDOR=Philips_CE
ID_VENDOR_ENC=Philips\x20CE
ID_VENDOR_ID=0471
MAJOR=81
MINOR=0
SEQNUM=2105
SUBSYSTEM=video4linux
TAGS=:udev-acl:
UDEV_LOG=3
USEC_INITIALIZED=6816309

I am trying to get this webcam on to /dev/video1 
and the other webcam a Logitech on to /dev/video0

I have tried various udev rules, one of which appeared to
give the desired results with udevadm test, but with an
actual reboot, nothing changed

The documentation for uvcvideo does not mention any possibility
of kernel parameters to specify the device numbering although
the v4l2 framework suggest that it *should*

QUOTE

  The last argument gives you a certain amount of control over the device
  device node number used (i.e. the X in videoX). Normally you will pass -1
  to let the v4l2 framework pick the first free number. But sometimes users
  want to select a specific node number. It is common that drivers allow
  the user to select a specific device node number through a driver module
  option. That number is then passed to this function and video_register_device
  will attempt to select that device node number.

UNQUOTE

Back to comp.os.linux.misc | Previous | NextNext in thread | Find similar | Unroll thread


Thread

assigning specific /dev/videoN to specific USB webcams J G Miller <miller@yoyo.ORG> - 2013-03-17 19:20 +0000
  Re: assigning specific /dev/videoN to specific USB webcams Robert Heller <heller@deepsoft.com> - 2013-03-17 14:46 -0500
    Re: assigning specific /dev/videoN to specific USB webcams J G Miller <miller@yoyo.ORG> - 2013-03-17 20:04 +0000
  Re: assigning specific /dev/videoN to specific USB webcams Kevin Snodgrass <kdsnodgrass@yahoo.com> - 2013-03-24 21:51 +0000
    Re: assigning specific /dev/videoN to specific USB webcams J G Miller <miller@yoyo.ORG> - 2013-03-24 22:54 +0000
      Re: assigning specific /dev/videoN to specific USB webcams Robert Heller <heller@deepsoft.com> - 2013-03-24 18:27 -0500
        Re: assigning specific /dev/videoN to specific USB webcams J G Miller <miller@yoyo.ORG> - 2013-03-25 02:34 +0000
      Re: assigning specific /dev/videoN to specific USB webcams Kevin Snodgrass <kdsnodgrass@yahoo.com> - 2013-03-31 18:16 +0000
        Re: assigning specific /dev/videoN to specific USB webcams J G Miller <miller@yoyo.ORG> - 2013-03-31 19:33 +0000
          Re: assigning specific /dev/videoN to specific USB webcams Kevin Snodgrass <kdsnodgrass@yahoo.com> - 2013-04-11 14:19 +0000
            Re: assigning specific /dev/videoN to specific USB webcams J G Miller <miller@yoyo.ORG> - 2013-04-11 15:21 +0000
  Re: assigning specific /dev/videoN to specific USB webcams Eric Pozharski <whynot@pozharski.name> - 2013-04-01 13:52 +0300
    Re: assigning specific /dev/videoN to specific USB webcams J G Miller <miller@yoyo.ORG> - 2013-04-01 18:24 +0000

csiph-web