From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Barry Date: Thu, 22 Jan 2004 20:56:48 +0000 Subject: Re: udev rule for usb printer Message-Id: <200401222256.48331.bobb@absamail.co.za> MIME-Version: 1 Content-Type: multipart/mixed; boundary="Boundary-00=_QkDEAr2jwYc9GlW" List-Id: References: <200401211924.08672.bobb@absamail.co.za> In-Reply-To: <200401211924.08672.bobb@absamail.co.za> To: linux-hotplug@vger.kernel.org --Boundary-00=_QkDEAr2jwYc9GlW Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Kay - On Thursday 22 January 2004 12:04, Kay Sievers wrote: > I don't have any usb printer, what does: > > "tree /sys/class/usb" > "tree /sys/devices/pci0000:00/0000:00:02.0/usb1" > > print on your machine? I don't have tree. I replaced fileutils and others with coreutils; perhaps there was an oversight. Will have to hunt for it. But I battled on with /proc, /sys, and find. I found where the files are, but udevinfo (and presumably udev itself) rejects that path. It's all in the attached file - please have a look. Thanks, Bob --Boundary-00=_QkDEAr2jwYc9GlW Content-Type: text/plain; charset="iso-8859-1"; name="lp.info" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="lp.info" > cat /proc/bus/usb/devices T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 3 B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 2.06 S: Manufacturer=Linux 2.6.1 ohci_hcd S: Product=OHCI Host Controller S: SerialNumber=0000:00:03.0 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 3 B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 2.06 S: Manufacturer=Linux 2.6.1 ohci_hcd S: Product=OHCI Host Controller S: SerialNumber=0000:00:02.0 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs= 1 P: Vendor=043d ProdID=0018 Rev= 1.00 S: Manufacturer=Lexmark S: Product=Lexmark Z52 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 4mA I: If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=83(I) Atr=02(Bulk) MxPS= 16 Ivl=0ms > find /sys -follow -type f -name "*product" | xargs grep Z52 /sys/class/usb_host/usb2/driver/0000:00:02.0/usb1/1-1/product:Lexmark Z52 /sys/class/usb_host/usb1/driver/0000:00:02.0/usb1/1-1/product:Lexmark Z52 /sys/class/usb_host/usb1/device/usb1/1-1/product:Lexmark Z52 /sys/bus/usb/drivers/usb/1-1/product:Lexmark Z52 /sys/bus/usb/drivers/usb/usb1/1-1/product:Lexmark Z52 /sys/bus/usb/devices/1-1/product:Lexmark Z52 /sys/bus/usb/devices/usb1/1-1/product:Lexmark Z52 /sys/bus/pci/drivers/ohci_hcd/0000:00:02.0/usb1/1-1/product:Lexmark Z52 /sys/bus/pci/devices/0000:00:02.0/usb1/1-1/product:Lexmark Z52 /sys/devices/pci0000:00/0000:00:02.0/usb1/1-1/product:Lexmark Z52 > cd udev/udev-014/extras/udevinfo/ > ls /sys/class/usb_host/usb1/device/usb1/1-1 1-1:1.0 bDeviceProtocol bNumConfigurations idVendor speed bcdDevice bDeviceSubClass bNumInterfaces manufacturer bConfigurationValue bmAttributes detach_state power bDeviceClass bMaxPower idProduct product > ./udevinfo /sys/class/usb_host/usb1/device/usb1/1-1/product couldn't get the class device > ./udevinfo /sys/class/usb_host/usb1/device/usb1/1-1 couldn't get the "dev" file > ./udevinfo /sys/class/usb_host/usb1/device/usb1 couldn't get the "dev" file > ./udevinfo /sys/class/usb_host/usb1/device couldn't get the class device > ./udevinfo /sys/class/usb_host/usb1 couldn't get the "dev" file > ls /sys/bus/usb/devices/1-1 1-1:1.0 bDeviceProtocol bNumConfigurations idVendor speed bcdDevice bDeviceSubClass bNumInterfaces manufacturer bConfigurationValue bmAttributes detach_state power bDeviceClass bMaxPower idProduct product > ./udevinfo /sys/bus/usb/devices/1-1/product couldn't get the class device > ./udevinfo /sys/bus/usb/devices/1-1 couldn't get the class device > ./udevinfo /sys/bus/usb/devices couldn't get the "dev" file --Boundary-00=_QkDEAr2jwYc9GlW-- ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ 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