From: Frederic Peters <fpeters@debian.org>
To: linux-hotplug@vger.kernel.org
Subject: Generic udev rule for PTP camera
Date: Thu, 16 Nov 2006 13:27:34 +0000 [thread overview]
Message-ID: <20061116132734.GA13117@entrouvert.com> (raw)
Hello,
For a long time, since we totally switched from hotplug to udev, we
have been unable in Debian to provide fallback support for unknown
PTP cameras.
Hotplugging any known camera works perfectly but this require
attentive maintenance of matching USB id and always lags behind
constructors.
PTP camera devices define an interface which I thought could be
matched by the following rule:
SYSFS{bInterfaceClass}="06", SYSFS{bInterfaceSubClass}="01", \
SYSFS{bInterfaceProtocol}="01", MODE="0660", GROUP="plugdev"
Unfortunately this doesn't work. Then Marcus Meissner from libgphoto2
suggested to use ENV{INTERFACE}="6/1/1" as matcher but I can't get it
to work and Marco d'Itri (Debian udev maintainer) believe this not to
be the correct solution anyway.
Since Marco doesn't have much time for the moment he suggested I asked
the question here, so here it is: what would be the rule to use to set
mode/group on /dev/bus/usb/... device when detecting this device by
bInterface{Class/SubClass/Protocol} ?
For the record, I copied below the output of udevmonitor --env when
plugging in a camera.
Thanks for your support,
Frederic
UEVENT[1163683152.644771] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2
SUBSYSTEM=usb
SEQNUM\x1708
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb
UEVENT[1163683152.645218] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/usbdev1.4_ep00
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/usbdev1.4_ep00
SUBSYSTEM=usb_endpoint
SEQNUM\x1709
MAJORD2
MINOR=3
UDEV [1163683152.645698] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2
UDEV_LOG=3
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2
SUBSYSTEM=usb
SEQNUM\x1708
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb
UDEVD_EVENT=1
DRIVER=usb
UEVENT[1163683152.647503] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0
SUBSYSTEM=usb
SEQNUM\x1710
PHYSDEVBUS=usb
DEVICE=/proc/bus/usb/001/004
PRODUCTJ9/30fd/2
TYPE=0/0/0
INTERFACE=6/1/1
MODALIAS=usb:v04A9p30FDd0002dc00dsc00dp00ic06isc01ip01
UEVENT[1163683152.647551] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep81
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep81
SUBSYSTEM=usb_endpoint
SEQNUM\x1711
MAJORD2
MINOR=3
UEVENT[1163683152.647585] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep02
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep02
SUBSYSTEM=usb_endpoint
SEQNUM\x1712
MAJORD2
MINOR=3
UEVENT[1163683152.647618] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep83
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep83
SUBSYSTEM=usb_endpoint
SEQNUM\x1713
MAJORD2
MINOR=3
UEVENT[1163683152.647657] add@/class/usb_device/usbdev1.4
ACTIONd
DEVPATH=/class/usb_device/usbdev1.4
SUBSYSTEM=usb_device
SEQNUM\x1714
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb
MAJOR\x189
MINOR=3
UDEV [1163683152.664824] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/usbdev1.4_ep00
UDEV_LOG=3
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/usbdev1.4_ep00
SUBSYSTEM=usb_endpoint
SEQNUM\x1709
MAJORD2
MINOR=3
UDEVD_EVENT=1
DEVNAME=/dev/usbdev1.4_ep00
UDEV [1163683152.665734] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0
UDEV_LOG=3
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0
SUBSYSTEM=usb
SEQNUM\x1710
PHYSDEVBUS=usb
DEVICE=/proc/bus/usb/001/004
PRODUCTJ9/30fd/2
TYPE=0/0/0
INTERFACE=6/1/1
MODALIAS=usb:v04A9p30FDd0002dc00dsc00dp00ic06isc01ip01
UDEVD_EVENT=1
UDEV [1163683152.698823] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep81
UDEV_LOG=3
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep81
SUBSYSTEM=usb_endpoint
SEQNUM\x1711
MAJORD2
MINOR=3
UDEVD_EVENT=1
DEVNAME=/dev/usbdev1.4_ep81
UDEV [1163683152.700491] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep02
UDEV_LOG=3
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep02
SUBSYSTEM=usb_endpoint
SEQNUM\x1712
MAJORD2
MINOR=3
UDEVD_EVENT=1
DEVNAME=/dev/usbdev1.4_ep02
UDEV [1163683152.701862] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep83
UDEV_LOG=3
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep83
SUBSYSTEM=usb_endpoint
SEQNUM\x1713
MAJORD2
MINOR=3
UDEVD_EVENT=1
DEVNAME=/dev/usbdev1.4_ep83
UDEV [1163683152.715971] add@/class/usb_device/usbdev1.4
UDEV_LOG=3
ACTIONd
DEVPATH=/class/usb_device/usbdev1.4
SUBSYSTEM=usb_device
SEQNUM\x1714
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb
MAJOR\x189
MINOR=3
UDEVD_EVENT=1
DEVNAME=/dev/bus/usb/001/004
UEVENT[1163683157.940219] remove@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep81
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep81
SUBSYSTEM=usb_endpoint
SEQNUM\x1715
MAJORD2
MINOR=3
UEVENT[1163683157.940251] remove@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep02
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep02
SUBSYSTEM=usb_endpoint
SEQNUM\x1716
MAJORD2
MINOR=3
UEVENT[1163683157.940278] remove@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep83
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep83
SUBSYSTEM=usb_endpoint
SEQNUM\x1717
MAJORD2
MINOR=3
UEVENT[1163683157.940285] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep81
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep81
SUBSYSTEM=usb_endpoint
SEQNUM\x1718
MAJORD2
MINOR=3
UEVENT[1163683157.940292] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep02
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep02
SUBSYSTEM=usb_endpoint
SEQNUM\x1719
MAJORD2
MINOR=3
UEVENT[1163683157.940298] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep83
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep83
SUBSYSTEM=usb_endpoint
SEQNUM\x1720
MAJORD2
MINOR=3
UDEV [1163683157.953460] remove@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep81
UDEV_LOG=3
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep81
SUBSYSTEM=usb_endpoint
SEQNUM\x1715
MAJORD2
MINOR=3
UDEVD_EVENT=1
DEVNAME=/dev/usbdev1.4_ep81
UDEV [1163683157.954286] remove@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep02
UDEV_LOG=3
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep02
SUBSYSTEM=usb_endpoint
SEQNUM\x1716
MAJORD2
MINOR=3
UDEVD_EVENT=1
DEVNAME=/dev/usbdev1.4_ep02
UDEV [1163683157.954900] remove@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep83
UDEV_LOG=3
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep83
SUBSYSTEM=usb_endpoint
SEQNUM\x1717
MAJORD2
MINOR=3
UDEVD_EVENT=1
DEVNAME=/dev/usbdev1.4_ep83
UDEV [1163683157.957305] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep81
UDEV_LOG=3
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep81
SUBSYSTEM=usb_endpoint
SEQNUM\x1718
MAJORD2
MINOR=3
UDEVD_EVENT=1
DEVNAME=/dev/usbdev1.4_ep81
UDEV [1163683157.958620] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep02
UDEV_LOG=3
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep02
SUBSYSTEM=usb_endpoint
SEQNUM\x1719
MAJORD2
MINOR=3
UDEVD_EVENT=1
DEVNAME=/dev/usbdev1.4_ep02
UDEV [1163683157.959884] add@/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep83
UDEV_LOG=3
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usbdev1.4_ep83
SUBSYSTEM=usb_endpoint
SEQNUM\x1720
MAJORD2
MINOR=3
UDEVD_EVENT=1
DEVNAME=/dev/usbdev1.4_ep83
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next reply other threads:[~2006-11-16 13:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-16 13:27 Frederic Peters [this message]
2006-11-16 17:57 ` Generic udev rule for PTP camera Andrey Borzenkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061116132734.GA13117@entrouvert.com \
--to=fpeters@debian.org \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).