Saturday, 16 March 2013

Notes for configuring udev rules for em28xx USB capture card

Goal: 
to create static /dev/video10 for plug in USB capture device em28xx.  Static video card location using udev rules ensures that the correct video device is utilised during reboots.  Used for motion program www.lavrsen.dk

Soloution: 
auto create a symlink from kernel assigned video address to /dev/video10 when em28xx is plugged in.

Plug in device and note video number assignment i.e. video0
then use this command to search for variables that can uniquely identify this device.
udevadm info -a -p $(udevadm info -q path -n /dev/video0)

Create udev rule:
KERNEL=="video[0-9]*", DRIVERS=="em28xx", SYMLINK+="video10"

Where:
KERNEL=="video[0-9]*" binds this rule to only video devices
DRIVERS=="em28xx" bind the rule to devices using driver em28xx
SYMLINK+="video10" creates a symlink from /dev/videoX to /dev/video10

Does it work:
ls /dev/video*

sudo service udev restart

References:
http://www.mythtv.org/wiki/Device_Filenames_and_udev

WindyCityTech Blogger
WindyWindyCityTech Wordpress

No comments:

Post a Comment

Post a Comment