1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>/proc/bus/usb/BBB/DDD</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The Linux-USB Host Side API"><link rel="up" href="usbfs.html" title="Chapter&#160;7.&#160;The USB Filesystem (usbfs)"><link rel="prev" href="usbfs-devices.html" title="/proc/bus/usb/devices"><link rel="next" href="usbfs-lifecycle.html" title="Life Cycle of User Mode Drivers"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">/proc/bus/usb/BBB/DDD</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="usbfs-devices.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;7.&#160;The USB Filesystem (usbfs)</th><td width="20%" align="right">&#160;<a accesskey="n" href="usbfs-lifecycle.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="usbfs-bbbddd"></a>/proc/bus/usb/BBB/DDD</h2></div></div></div><p>Use these files in one of these basic ways:
2	    </p><p><span class="emphasis"><em>They can be read,</em></span>
3	    producing first the device descriptor
4	    (18 bytes) and then the descriptors for the current configuration.
5	    See the USB 2.0 spec for details about those binary data formats.
6	    You'll need to convert most multibyte values from little endian
7	    format to your native host byte order, although a few of the
8	    fields in the device descriptor (both of the BCD-encoded fields,
9	    and the vendor and product IDs) will be byteswapped for you.
10	    Note that configuration descriptors include descriptors for
11	    interfaces, altsettings, endpoints, and maybe additional
12	    class descriptors.
13	    </p><p><span class="emphasis"><em>Perform USB operations</em></span> using 
14	    <span class="emphasis"><em>ioctl()</em></span> requests to make endpoint I/O
15	    requests (synchronously or asynchronously) or manage
16	    the device.
17	    These requests need the CAP_SYS_RAWIO capability,
18	    as well as filesystem access permissions.
19	    Only one ioctl request can be made on one of these
20	    device files at a time.
21	    This means that if you are synchronously reading an endpoint
22	    from one thread, you won't be able to write to a different
23	    endpoint from another thread until the read completes.
24	    This works for <span class="emphasis"><em>half duplex</em></span> protocols,
25	    but otherwise you'd use asynchronous i/o requests. 
26	    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="usbfs-devices.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="usbfs.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="usbfs-lifecycle.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">/proc/bus/usb/devices&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Life Cycle of User Mode Drivers</td></tr></table></div></body></html>
27