[52d29f7] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[52d29f7] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[aff3caf0] | 7 | <!ENTITY libusb-download-http "&sourceforge-repo;/libusb/libusb-&libusb-version;.tar.bz2">
|
---|
[6d0910f1] | 8 | <!ENTITY libusb-download-ftp "&sources-anduin-ftp;/l/libusb-&libusb-version;.tar.bz2">
|
---|
[8c15e4c] | 9 | <!ENTITY libusb-md5sum "dc8865eaff167aabe78e5799762b8067">
|
---|
| 10 | <!ENTITY libusb-size "305 KB">
|
---|
| 11 | <!ENTITY libusb-buildsize "4 MB">
|
---|
[4ee3a30] | 12 | <!ENTITY libusb-time "less than 0.1 SBU">
|
---|
[52d29f7] | 13 | ]>
|
---|
| 14 |
|
---|
[bdf5806e] | 15 | <sect1 id="libusb" xreflabel="libusb-&libusb-version;">
|
---|
[fc3e01f] | 16 | <?dbhtml filename="libusb.html"?>
|
---|
[4c3474fe] | 17 |
|
---|
[fc3e01f] | 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
[4c3474fe] | 22 |
|
---|
[1f3b7a7] | 23 | <title>libusb-&libusb-version;</title>
|
---|
[4c3474fe] | 24 |
|
---|
[fc3e01f] | 25 | <indexterm zone="libusb">
|
---|
| 26 | <primary sortas="a-Libusb">Libusb</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
[1f3b7a7] | 30 | <title>Introduction to libusb</title>
|
---|
[4c3474fe] | 31 |
|
---|
[fc3e01f] | 32 | <para>The <application>libusb</application> package contains a library
|
---|
| 33 | used by some applications for USB device access.</para>
|
---|
[4c3474fe] | 34 |
|
---|
[8c15e4c] | 35 | &lfs65_checked;
|
---|
| 36 |
|
---|
[fc3e01f] | 37 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 38 | <itemizedlist spacing="compact">
|
---|
| 39 | <listitem>
|
---|
| 40 | <para>Download (HTTP): <ulink url="&libusb-download-http;"/></para>
|
---|
| 41 | </listitem>
|
---|
| 42 | <listitem>
|
---|
| 43 | <para>Download (FTP): <ulink url="&libusb-download-ftp;"/></para>
|
---|
| 44 | </listitem>
|
---|
| 45 | <listitem>
|
---|
| 46 | <para>Download MD5 sum: &libusb-md5sum;</para>
|
---|
| 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
| 49 | <para>Download size: &libusb-size;</para>
|
---|
| 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>Estimated disk space required: &libusb-buildsize;</para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>Estimated build time: &libusb-time;</para>
|
---|
| 56 | </listitem>
|
---|
| 57 | </itemizedlist>
|
---|
[4c3474fe] | 58 |
|
---|
[1f3b7a7] | 59 | <bridgehead renderas="sect3">libusb Dependencies</bridgehead>
|
---|
[4c3474fe] | 60 |
|
---|
[de49ebd] | 61 | <bridgehead renderas="sect4">Optional
|
---|
| 62 | (Required to Build the API Documentation)</bridgehead>
|
---|
[4ee3a30] | 63 | <para role="optional"><xref linkend="doxygen"/></para>
|
---|
[4c3474fe] | 64 |
|
---|
[1039de3] | 65 | <para condition="html" role="usernotes">User Notes:
|
---|
| 66 | <ulink url="&blfs-wiki;/libusb"/></para>
|
---|
| 67 |
|
---|
[fc3e01f] | 68 | </sect2>
|
---|
[4c3474fe] | 69 |
|
---|
[fc3e01f] | 70 | <sect2 role="installation">
|
---|
[1f3b7a7] | 71 | <title>Installation of libusb</title>
|
---|
[fc3e01f] | 72 |
|
---|
[74390482] | 73 | <para>Install <application>libusb</application> by running the following
|
---|
[fc3e01f] | 74 | commands:</para>
|
---|
| 75 |
|
---|
[4ee3a30] | 76 | <screen><userinput>./configure --prefix=/usr &&
|
---|
[fc3e01f] | 77 | make</userinput></screen>
|
---|
| 78 |
|
---|
[aff3caf0] | 79 | <para>If <application>Doxygen</application> is installed and you wish to
|
---|
| 80 | build the API documentation, issue the following command:</para>
|
---|
[fc3e01f] | 81 |
|
---|
[8c15e4c] | 82 | <!-- <screen><userinput>pushd doc &&
|
---|
[4ee3a30] | 83 | make docs &&
|
---|
[8c15e4c] | 84 | popd</userinput></screen> -->
|
---|
| 85 |
|
---|
| 86 | <screen><userinput>make -C doc docs</userinput></screen> <!-- tested with doxygen -->
|
---|
[4c3474fe] | 87 |
|
---|
[4ee3a30] | 88 | <para>This package does not come with a test suite.</para>
|
---|
[1f3b7a7] | 89 |
|
---|
[fc3e01f] | 90 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[4c3474fe] | 91 |
|
---|
[fc3e01f] | 92 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 93 |
|
---|
[1f3b7a7] | 94 | <para>If you built the API documentation, install it using the following
|
---|
| 95 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[fc3e01f] | 96 |
|
---|
| 97 | <screen role="root"><userinput>install -v -d -m755 /usr/share/doc/libusb-&libusb-version;/apidocs &&
|
---|
[4ee3a30] | 98 | install -v -m644 doc/html/* \
|
---|
[4c288b0] | 99 | /usr/share/doc/libusb-&libusb-version;/apidocs</userinput></screen>
|
---|
[4c3474fe] | 100 |
|
---|
[fc3e01f] | 101 | </sect2>
|
---|
[4c3474fe] | 102 |
|
---|
[fc3e01f] | 103 | <sect2 role="configuration">
|
---|
| 104 | <title>Configuring Libusb</title>
|
---|
| 105 |
|
---|
[33ca2b6] | 106 | <!--
|
---|
[74390482] | 107 | <para><application>libusb</application> requires the
|
---|
| 108 | <systemitem class="filesystem">usbfs</systemitem> kernel filesystem
|
---|
| 109 | to be mounted on <filename class="directory">/proc/bus/usb</filename>.
|
---|
| 110 | Applications require the files in this directory to be accessible to the user,
|
---|
| 111 | sometimes for both reading and writing. To restrict access to USB devices,
|
---|
| 112 | ensure the <systemitem class="filesystem">usb</systemitem> group exits
|
---|
| 113 | on your system. If necessary, create the <systemitem
|
---|
[fc3e01f] | 114 | class="filesystem">usb</systemitem> group using the following command:</para>
|
---|
| 115 |
|
---|
| 116 | <screen role='root'><userinput>groupadd -g 14 usb</userinput></screen>
|
---|
[33ca2b6] | 117 | -->
|
---|
[fc3e01f] | 118 |
|
---|
[7bcc1669] | 119 | <para id="libusb-kernel">To access raw USB devices (those not treated as a
|
---|
| 120 | disk by the mass-storage driver), appropriate support must be available in
|
---|
| 121 | the kernel. Check your kernel configuration for Device Drivers ⇒ USB
|
---|
| 122 | support ⇒ Support for Host-side USB. Select any USB hardware device
|
---|
| 123 | drivers you may need on the same page.</para>
|
---|
[9f12e36] | 124 |
|
---|
[fc3e01f] | 125 | <indexterm zone="libusb libusb-kernel">
|
---|
[7bcc1669] | 126 | <primary sortas="d-USB-device-filesystem">Support for Host-side USB</primary>
|
---|
[fc3e01f] | 127 | </indexterm>
|
---|
[9f12e36] | 128 |
|
---|
| 129 | <para>To have raw USB devices set up properly, add the following
|
---|
[3a79861] | 130 | <application>udev</application> rule.</para>
|
---|
[9f12e36] | 131 |
|
---|
[4e4fa01] | 132 | <screen><literal>cat > /etc/udev/rules.d/23-usb.rules << "EOF"
|
---|
[9f12e36] | 133 | # Set group ownership for raw USB devices
|
---|
[3e50349d] | 134 | SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
|
---|
[7bcc1669] | 135 | EOF</literal></screen>
|
---|
| 136 |
|
---|
[e73e361] | 137 | <!--
|
---|
[531886d] | 138 | <para>Fine-tuning of permissions is also possible by creating extra rules,
|
---|
[7bcc1669] | 139 | matching on something like this (on one line). The vendor and product can
|
---|
[104733c] | 140 | be found by searching the <filename
|
---|
[531886d] | 141 | class='directory'>/sys/devices</filename> directory entries or using
|
---|
| 142 | <command>udevinfo</command> after the device has been attached. See the
|
---|
| 143 | documentation in the current udev directory of <filename
|
---|
| 144 | class='directory'>/usr/share/doc></filename> for details.</para>
|
---|
[7bcc1669] | 145 |
|
---|
[9f12e36] | 146 | <screen><literal>SUBSYSTEM=="usb_device", SYSFS{idVendor}=="05d8",
|
---|
[7bcc1669] | 147 | SYSFS{idProduct}=="4002", GROUP:="scanner"</literal></screen>
|
---|
| 148 |
|
---|
[531886d] | 149 | <para>Some older applications, such as <application>VMware</application>,
|
---|
| 150 | need the following deprecated entry in the <filename>/etc/fstab</filename>
|
---|
[93b8f83d] | 151 | file. This is not normally needed.</para>
|
---|
[fc3e01f] | 152 |
|
---|
| 153 | <screen><literal>usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0</literal></screen>
|
---|
[e73e361] | 154 | -->
|
---|
[4c3474fe] | 155 |
|
---|
[410e228b] | 156 | <para>Add any users that need to access raw USB devices to the
|
---|
[3a79861] | 157 | <systemitem class="groupname">usb</systemitem> group.</para>
|
---|
[c5923846] | 158 |
|
---|
[3a79861] | 159 | <screen role="root"><userinput>usermod -a -G usb <replaceable><username></replaceable></userinput></screen>
|
---|
| 160 |
|
---|
[fc3e01f] | 161 | </sect2>
|
---|
[4c3474fe] | 162 |
|
---|
[fc3e01f] | 163 | <sect2 role="content">
|
---|
| 164 | <title>Contents</title>
|
---|
| 165 |
|
---|
| 166 | <segmentedlist>
|
---|
[aff3caf0] | 167 | <segtitle>Installed Programs</segtitle>
|
---|
| 168 | <segtitle>Installed Library</segtitle>
|
---|
[4ee3a30] | 169 | <segtitle>Installed Directories</segtitle>
|
---|
[4c3474fe] | 170 |
|
---|
[fc3e01f] | 171 | <seglistitem>
|
---|
[4ee3a30] | 172 | <seg>None</seg>
|
---|
| 173 | <seg>libusb-1.0.{so,a}</seg>
|
---|
[8c15e4c] | 174 | <seg>/usr/include/libusb-1.0 and
|
---|
[aff3caf0] | 175 | /usr/share/doc/libusb-&libusb-version;</seg>
|
---|
[fc3e01f] | 176 | </seglistitem>
|
---|
| 177 | </segmentedlist>
|
---|
[4c3474fe] | 178 |
|
---|
[fc3e01f] | 179 | <variablelist>
|
---|
| 180 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 181 | <?dbfo list-presentation="list"?>
|
---|
| 182 | <?dbhtml list-presentation="table"?>
|
---|
[4c3474fe] | 183 |
|
---|
[fc3e01f] | 184 | <varlistentry id="libusb-lib">
|
---|
[c2c0f5b6] | 185 | <term><filename class='libraryfile'>libusb-1.0.{so,a}</filename></term>
|
---|
[fc3e01f] | 186 | <listitem>
|
---|
[74390482] | 187 | <para> libraries contain C functions for accessing
|
---|
[fc3e01f] | 188 | USB hardware.</para>
|
---|
| 189 | <indexterm zone="libusb libusb-lib">
|
---|
[4ee3a30] | 190 | <primary sortas="c-libusb">libusb-1.0.{so,a}</primary>
|
---|
[fc3e01f] | 191 | </indexterm>
|
---|
| 192 | </listitem>
|
---|
| 193 | </varlistentry>
|
---|
[4c3474fe] | 194 |
|
---|
[fc3e01f] | 195 | </variablelist>
|
---|
| 196 |
|
---|
| 197 | </sect2>
|
---|
[bdf5806e] | 198 |
|
---|
| 199 | </sect1>
|
---|