|
From: Peter Hull on 5 Jun 2008 05:57 When a usb device is attached, entries with names like usbdev4.1_ep00 appear in /dev/ There appears to be one for every endpoint on every device attached. Does anyone know what these nodes are used for? Peter
From: Aragorn on 5 Jun 2008 07:40 Peter Hull wrote: > When a usb device is attached, entries with names like usbdev4.1_ep00 > appear in /dev/ There appears to be one for every endpoint on every > device attached. What device exactly are you talking about? A USB hub perhaps? A USB storage device with multiple LUNs? > Does anyone know what these nodes are used for? They exist so that processes with the proper permissions can communicate with the devices. Perhaps if you were being more verbose? What exactly did you plug in? Are the device special files listed as character devices or as block devices? -- *Aragorn* (registered GNU/Linux user #223157)
From: Peter Hull on 5 Jun 2008 08:44 On Jun 5, 12:40 pm, Aragorn <arag...(a)chatfactory.invalid> wrote: > Peter Hull wrote: > What device exactly are you talking about? A USB hub perhaps? A USB > storage device with multiple LUNs? As far as I know, any device (including internal hubs) - see below. This is not a problem, I'm just curious and I imagine that someone would just know what they are straight away. > > > Does anyone know what these nodes are used for? > > They exist so that processes with the proper permissions can communicate > with the devices. My question really is: are these files any use for communicating with a device from user space? I've seen documentation on the ioctl interface for the nodes in /dev/bus/usb/BBB/DDD (which is what libusb uses) but I've never seen anything on these files. I found the part in the source code where they're created but my knowledge is not enough to understand what they're for. > > Perhaps if you were being more verbose? What exactly did you plug in? Are > the device special files listed as character devices or as block devices? Here's the output from ls /dev/usb* on my system (Ubuntu 8.04 i386) crw-rw---- 1 root root 254, 0 2008-06-05 13:11 /dev/usbdev1.1_ep00 crw-rw---- 1 root root 254, 1 2008-06-05 13:11 /dev/usbdev1.1_ep81 crw-rw---- 1 root root 254, 2 2008-06-05 13:11 /dev/usbdev2.1_ep00 crw-rw---- 1 root root 254, 3 2008-06-05 13:11 /dev/usbdev2.1_ep81 crw-rw---- 1 root root 254, 4 2008-06-05 13:11 /dev/usbdev3.1_ep00 crw-rw---- 1 root root 254, 5 2008-06-05 13:11 /dev/usbdev3.1_ep81 crw-rw---- 1 root root 254, 6 2008-06-05 13:11 /dev/usbdev4.1_ep00 crw-rw---- 1 root root 254, 7 2008-06-05 13:11 /dev/usbdev4.1_ep81 crw-rw---- 1 root root 254, 8 2008-06-05 13:11 /dev/usbdev5.1_ep00 crw-rw---- 1 root root 254, 9 2008-06-05 13:11 /dev/usbdev5.1_ep81 crw-rw---- 1 root root 254, 10 2008-06-05 13:15 /dev/usbdev5.2_ep00 crw-rw---- 1 root root 254, 12 2008-06-05 13:15 /dev/usbdev5.2_ep01 crw-rw---- 1 root root 254, 11 2008-06-05 13:15 /dev/usbdev5.2_ep81 Most of these are hubs (ID 0000:0000) apart from this one (output from lsusb) Bus 005 Device 002: ID 0781:5151 SanDisk Corp. Cruzer Micro 256/512MB Flash Drive So you can see how they match up. Pete > > -- > *Aragorn* > (registered GNU/Linux user #223157)
From: Chris Cox on 5 Jun 2008 19:15 Peter Hull wrote: > When a usb device is attached, entries with names like usbdev4.1_ep00 > appear in /dev/ There appears to be one for every endpoint on every > device attached. > > Does anyone know what these nodes are used for? You can get a lot of info about this from the book Essential Linux Device Drivers It goes into great detail with regards to USB (and other things). I can't remember exactly how the device is used though... I'd have to look it up really fast in the book. Probably some kind of control device (??)
From: Chris Cox on 5 Jun 2008 23:44
Chris Cox wrote: > Peter Hull wrote: >> When a usb device is attached, entries with names like usbdev4.1_ep00 >> appear in /dev/ There appears to be one for every endpoint on every >> device attached. >> >> Does anyone know what these nodes are used for? > > You can get a lot of info about this from the book > Essential Linux Device Drivers > > It goes into great detail with regards to USB (and other things). > > I can't remember exactly how the device is used though... I'd > have to look it up really fast in the book. > > Probably some kind of control device (??) Actually endpoint 0 on each device is the control device... the rest are for various types of transfer, in/out, interrupts... |