[argyllcms] Re: SOLVED newbie problems with make, usb
- From: Caspar Maessen <cmaessen@xxxxxxxxxxxxxx>
- To: argyllcms@xxxxxxxxxxxxx
- Date: Tue, 26 Jun 2007 20:52:38 +0200
Op dinsdag 26 juni 2007, schreef Milan Knizek:
> On Tuesday 26 June 2007, Graeme Gill wrote:
> > Really weird. There are many examples of udev configs that use
> > BUS=="usb" out there, so why this should have a negative effect
> > is a puzzle. Perhaps this has been removed from udev, and
> > now one uses SUBSYSTEM=="usb_device" ?
[...]
> Hence it seems quite difficult to propose a universal advice valid
> for all systems apart from
> 1) check dmesg after plug-in to find out which usb device was
> assigned (e.g. usb 2-1)
> 2) check udevinfo -a -p /sys/bus/usb/devices/2-1
> 3) use those keys in your rules.
I think you're right. Following this on my system gives for usb 4-1
caspar@casco:~> udevinfo -a -p /sys/bus/usb/devices/4-1
[...]
looking at device '/devices/pci0000:00/0000:00:1d.2/usb4/4-1':
KERNEL=="4-1"
SUBSYSTEM=="usb"
DRIVER=="usb"
ATTR{configuration}==""
ATTR{serial}=="027805"
ATTR{product}=="X-Rite DTP94"
ATTR{manufacturer}=="X-Rite"
ATTR{maxchild}=="0"
ATTR{version}==" 2.00"
ATTR{devnum}=="11"
ATTR{speed}=="1.5"
ATTR{bMaxPacketSize0}=="8"
ATTR{bNumConfigurations}=="1"
ATTR{bDeviceProtocol}=="ff"
ATTR{bDeviceSubClass}=="ff"
ATTR{bDeviceClass}=="ff"
ATTR{bcdDevice}=="0000"
ATTR{idProduct}=="d094"
ATTR{idVendor}=="0765"
ATTR{bMaxPower}==" 20mA"
ATTR{bmAttributes}=="80"
ATTR{bConfigurationValue}=="1"
ATTR{bNumInterfaces}==" 1"
[...]
Adding SUBSYSTEM=="usb", as these results would suggest, as a third
matching criterion to ATTR{idProduct}=="d094" and
ATTR{idVendor}=="0765", doesn't give the expected result.
SUBSYSTEM=="usb_device" does, as well as SUBSYSTEMS=="usb".
I can't explain this. But on the other hand I don't think adding this
extra criterion is necessary. The chance that an attached device has
the same vendor and product id is very slim.
By the way, SYSFS still works, but to be consistent with the above
information I now use ATTR.
Caspar.
--
Major accidents are rare events due to many barriers, safeguards, and
defences developed by modern technologies. But they continue to happen
with saddening regularity, and their human and financial consequences
are all too often catastrophic. --J. Reason, Managing the Risks of
Organisational Accidents (1998).
- References:
- [argyllcms] newbie problems with make, usb
- From: david
- [argyllcms] Re: Solved: Re: Re: newbie problems with make, usb
- From: Graeme Gill
- [argyllcms] Re: SOLVED newbie problems with make, usb
- From: Milan Knizek
Other related posts:
- » [argyllcms] Re: SOLVED newbie problems with make, usb
- » [argyllcms] Re: SOLVED newbie problems with make, usb
- [argyllcms] newbie problems with make, usb
- From: david
- [argyllcms] Re: Solved: Re: Re: newbie problems with make, usb
- From: Graeme Gill
- [argyllcms] Re: SOLVED newbie problems with make, usb
- From: Milan Knizek