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 http://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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s