All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Barry <bobb@absamail.co.za>
To: linux-hotplug@vger.kernel.org
Subject: Re: udev rule for usb printer
Date: Thu, 22 Jan 2004 20:56:48 +0000	[thread overview]
Message-ID: <200401222256.48331.bobb@absamail.co.za> (raw)
In-Reply-To: <200401211924.08672.bobb@absamail.co.za>

[-- Attachment #1: Type: text/plain, Size: 546 bytes --]

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

[-- Attachment #2: lp.info --]
[-- Type: text/plain, Size: 3357 bytes --]

> 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

  parent reply	other threads:[~2004-01-22 20:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-21 17:24 udev rule for usb printer Bob Barry
2004-01-21 19:36 ` Kay Sievers
2004-01-22  8:10 ` Bob Barry
2004-01-22 10:04 ` Kay Sievers
2004-01-22 15:51 ` Greg KH
2004-01-22 20:56 ` Bob Barry [this message]
2004-01-27 14:24 ` Bob Barry

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=200401222256.48331.bobb@absamail.co.za \
    --to=bobb@absamail.co.za \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.