linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* USB camera not hotplugging because  SYSFS{ID_VENDOR} etc. not available
@ 2006-04-10 15:16 Moshe Yudkowsky
  2006-04-10 17:02 ` Andrey Borzenkov
  2006-04-10 19:02 ` USB camera not hotplugging because SYSFS{ID_VENDOR} etc. not Moshe Yudkowsky
  0 siblings, 2 replies; 3+ messages in thread
From: Moshe Yudkowsky @ 2006-04-10 15:16 UTC (permalink / raw)
  To: linux-hotplug

In *both* the patched version of udev that I was running, and in the new 
official release of 0.089, I don't have SYSFS{ID_VENDOR} available when 
the device is plugged in. This in turn means that the libgphoto2.rules 
do not execute and the camera group is not set.

HOWEVER, the SYSFS variables for the MP3 player *are* available!

libgphoto2.rules:

> SYSFS{idVendor}="04a9", SYSFS{idProduct}="3051", MODE="0660", GROUP="camera"


udevmonitor --evn output for plugin of camera:

> UEVENT[1144681428.413283] add@/devices/pci0000:00/0000:00:10.0/usb1/1-1
> ACTION­d
> DEVPATH=/devices/pci0000:00/0000:00:10.0/usb1/1-1
> SUBSYSTEM=usb
> SEQNUM453
> PHYSDEVBUS=usb
> PHYSDEVDRIVER=usb
> 
> UDEV  [1144681428.414601] add@/devices/pci0000:00/0000:00:10.0/usb1/1-1
> UDEV_LOG=3
> ACTION­d
> DEVPATH=/devices/pci0000:00/0000:00:10.0/usb1/1-1
> SUBSYSTEM=usb
> SEQNUM453
> PHYSDEVBUS=usb
> PHYSDEVDRIVER=usb
> UDEVD_EVENT=1
> 
> UEVENT[1144681428.421787] add@/devices/pci0000:00/0000:00:10.0/usb1/1-1/1-1:1.0
> ACTION­d
> DEVPATH=/devices/pci0000:00/0000:00:10.0/usb1/1-1/1-1:1.0
> SUBSYSTEM=usb
> SEQNUM454
> PHYSDEVBUS=usb
> DEVICE=/proc/bus/usb/001/008
> PRODUCTJ9/3051/1
> TYPE%5/255/255
> INTERFACE%5/255/255
> MODALIAS=usb:v04A9p3051d0001dcFFdscFFdpFFicFFiscFFipFF
> 
> UEVENT[1144681428.430368] add@/class/usb_device/usbdev1.8
> ACTION­d
> DEVPATH=/class/usb_device/usbdev1.8
> SUBSYSTEM=usb_device
> SEQNUM455
> PHYSDEVPATH=/devices/pci0000:00/0000:00:10.0/usb1/1-1
> PHYSDEVBUS=usb
> PHYSDEVDRIVER=usb
> MAJOR\x189
> MINOR=7
> 
> UDEV  [1144681428.486187] add@/devices/pci0000:00/0000:00:10.0/usb1/1-1/1-1:1.0
> UDEV_LOG=3
> ACTION­d
> DEVPATH=/devices/pci0000:00/0000:00:10.0/usb1/1-1/1-1:1.0
> SUBSYSTEM=usb
> SEQNUM454
> PHYSDEVBUS=usb
> DEVICE=/proc/bus/usb/001/008
> PRODUCTJ9/3051/1
> TYPE%5/255/255
> INTERFACE%5/255/255
> MODALIAS=usb:v04A9p3051d0001dcFFdscFFdpFFicFFiscFFipFF
> UDEVD_EVENT=1
> 
> UDEV  [1144681428.584855] add@/class/usb_device/usbdev1.8
> UDEV_LOG=3
> ACTION­d
> DEVPATH=/class/usb_device/usbdev1.8
> SUBSYSTEM=usb_device
> SEQNUM455
> PHYSDEVPATH=/devices/pci0000:00/0000:00:10.0/usb1/1-1
> PHYSDEVBUS=usb
> PHYSDEVDRIVER=usb
> MAJOR\x189
> MINOR=7
> UDEVD_EVENT=1
> DEVNAME=/dev/bus/usb/001/008

And the device /dev/bus/usb/001/008 has group set to root, and that's 
the problem.

If I plug in the USB-based mp3 player, I get in part:

> UDEV  [1144681853.831681] add@/block/sdb
> UDEV_LOG=3
> ACTION­d
> DEVPATH=/block/sdb
> SUBSYSTEM=block
> SEQNUM464
> MINOR\x16
> MAJOR=8
> PHYSDEVPATH=/devices/pci0000:00/0000:00:10.3/usb4/4-4/4-4:1.0/host24/target24:0:0/24:0:0:0
> PHYSDEVBUS=scsi
> PHYSDEVDRIVER=sd
> UDEVD_EVENT=1
> ID_VENDOR=iriver
> ID_MODEL=MassStorage_Disc
> ID_REVISION\001
> ID_SERIAL=iriver_MassStorage_Disc
> ID_TYPE=disk
> ID_BUS=usb
> ID_PATH=pci-0000:00:10.3-usb-0:4:1.0-scsi-0:0:0:0
> REMOVE_CMD=/etc/hotplug/usb/iriver remove
> DEVNAME=/dev/scsi/host24/bus0/target0/lun0/disc
> DEVLINKS=/dev/sdb /dev/discs/disc2/disc /dev/disk/by-id/usb-iriver_MassStorage_Disc /dev/disk/by-path/pci-0000:00:10.3-usb-0:4:1.0-scsi-0:0:0:0 /dev/iriver

and the rules based on SYSFS{ID_VENDOR} work as expected. (Well, there's 
one bug that I'm chasing down -- REMOVE_CMD did *not* execute, and 
neither did the other remove rules. I don't know why just yet.)

So, in summary, SYSFS is available but only for some USB items.

Please let me know if you need any further information.

-- 
  Moshe Yudkowsky
  work: http://www.Disaggregate.com
  book: http://www.PebbleAndAvalanche.com


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x110944&bid$1720&dat\x121642
_______________________________________________
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: USB camera not hotplugging because  SYSFS{ID_VENDOR} etc. not available
  2006-04-10 15:16 USB camera not hotplugging because SYSFS{ID_VENDOR} etc. not available Moshe Yudkowsky
@ 2006-04-10 17:02 ` Andrey Borzenkov
  2006-04-10 19:02 ` USB camera not hotplugging because SYSFS{ID_VENDOR} etc. not Moshe Yudkowsky
  1 sibling, 0 replies; 3+ messages in thread
From: Andrey Borzenkov @ 2006-04-10 17:02 UTC (permalink / raw)
  To: linux-hotplug

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 10 April 2006 19:16, Moshe Yudkowsky wrote:
> In *both* the patched version of udev that I was running, and in the new
> official release of 0.089, I don't have SYSFS{ID_VENDOR} available when
> the device is plugged in. 

This does not exist and has never existed.

> This in turn means that the libgphoto2.rules 
> do not execute and the camera group is not set.
>
> HOWEVER, the SYSFS variables for the MP3 player *are* available!
>
> libgphoto2.rules:
> > SYSFS{idVendor}="04a9", SYSFS{idProduct}="3051", MODE="0660",
> > GROUP="camera"
>

If this is full rule it won't work.
[...]
> Please let me know if you need any further information.

please show full rule in question.

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEOo+sR6LMutpd94wRAtaeAKCqJa5LswqmrjyGXuSxiJ9nwN008wCfaS+W
3FPkEd5Zk86jtAc8AcKL5eo=BOLb
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x110944&bid$1720&dat\x121642
_______________________________________________
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: USB camera not hotplugging because  SYSFS{ID_VENDOR} etc. not
  2006-04-10 15:16 USB camera not hotplugging because SYSFS{ID_VENDOR} etc. not available Moshe Yudkowsky
  2006-04-10 17:02 ` Andrey Borzenkov
@ 2006-04-10 19:02 ` Moshe Yudkowsky
  1 sibling, 0 replies; 3+ messages in thread
From: Moshe Yudkowsky @ 2006-04-10 19:02 UTC (permalink / raw)
  To: linux-hotplug

Andrey,

Thanks for responding.

Andrey Borzenkov wrote:

>> libgphoto2.rules:
>>> SYSFS{idVendor}="04a9", SYSFS{idProduct}="3051", MODE="0660",
>>> GROUP="camera"
> 
> If this is full rule it won't work.

That's the full rule. I'm pretty sure it used to work.

I wrote:
>>  I don't have SYSFS{ID_VENDOR} available when
>> > the device is plugged in. 

You wrote:

> This does not exist and has never existed.

But I see from udevmonitor --env that:

> ID_VENDOR=iriver
> ID_MODEL=MassStorage_Disc
> ID_REVISION\001
> ID_SERIAL=iriver_MassStorage_Disc
> ID_TYPE=disk
> ID_BUS=usb

And the rule

> SUBSYSTEM="block", ACTION="add", ENV{ID_VENDOR}="iriver", ENV{ID_SERIAL}="iriver_MassStorage_Disc", SYMLINK+="iriver", RUN+="/etc/hotplug/usb/iriver",
> ENV{REMOVE_CMD}="/etc/hotplug/usb/iriver remove"

does work as expected.

Oh, I see. One's ENV and the other is SYSFS. As always, it's impossible 
to tell from the printout if you don't know the SYSFS variables by heart.

And, for the record, I suspect that ID_VENDOR got into the environment 
via a usb_id() function call -- am I correct?

For the camera, I get

> PRODUCTJ9/3051/1 

And inside the rule for the camera I see SYSFS{idVendor}="04a9", 
SYSFS{idProduct}="3051". It looks to me as if they are very similar. 
Has there been a recent change of some sort in udev that made idVendor 
stop working? Or did this never work, and I am remembering wrong, and 
it's time to write ghoto2 and ask them to update their rules?

-- 
  Moshe Yudkowsky
  work: http://www.Disaggregate.com
  book: http://www.PebbleAndAvalanche.com


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x110944&bid$1720&dat\x121642
_______________________________________________
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-10 19:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-10 15:16 USB camera not hotplugging because SYSFS{ID_VENDOR} etc. not available Moshe Yudkowsky
2006-04-10 17:02 ` Andrey Borzenkov
2006-04-10 19:02 ` USB camera not hotplugging because SYSFS{ID_VENDOR} etc. not Moshe Yudkowsky

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).