1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY libusb-download-http "http://downloads.sourceforge.net/libusb/libusb-&libusb-version;.tar.gz">
|
---|
8 | <!ENTITY libusb-download-ftp " ">
|
---|
9 | <!ENTITY libusb-md5sum "caf182cbc7565dac0fd72155919672e6">
|
---|
10 | <!ENTITY libusb-size "389 KB">
|
---|
11 | <!ENTITY libusb-buildsize "8.4 MB (includes installing all documentation)">
|
---|
12 | <!ENTITY libusb-time "0.3 SBU (includes building all documentation)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="libusb" xreflabel="libusb-&libusb-version;">
|
---|
16 | <?dbhtml filename="libusb.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>libusb-&libusb-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="libusb">
|
---|
26 | <primary sortas="a-Libusb">Libusb</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to libusb</title>
|
---|
31 |
|
---|
32 | <para>The <application>libusb</application> package contains a library
|
---|
33 | used by some applications for USB device access.</para>
|
---|
34 |
|
---|
35 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
36 | <itemizedlist spacing="compact">
|
---|
37 | <listitem>
|
---|
38 | <para>Download (HTTP): <ulink url="&libusb-download-http;"/></para>
|
---|
39 | </listitem>
|
---|
40 | <listitem>
|
---|
41 | <para>Download (FTP): <ulink url="&libusb-download-ftp;"/></para>
|
---|
42 | </listitem>
|
---|
43 | <listitem>
|
---|
44 | <para>Download MD5 sum: &libusb-md5sum;</para>
|
---|
45 | </listitem>
|
---|
46 | <listitem>
|
---|
47 | <para>Download size: &libusb-size;</para>
|
---|
48 | </listitem>
|
---|
49 | <listitem>
|
---|
50 | <para>Estimated disk space required: &libusb-buildsize;</para>
|
---|
51 | </listitem>
|
---|
52 | <listitem>
|
---|
53 | <para>Estimated build time: &libusb-time;</para>
|
---|
54 | </listitem>
|
---|
55 | </itemizedlist>
|
---|
56 |
|
---|
57 | <bridgehead renderas="sect3">libusb Dependencies</bridgehead>
|
---|
58 |
|
---|
59 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
60 | <para role="optional"><xref linkend="pkgconfig"/></para>
|
---|
61 |
|
---|
62 | <bridgehead renderas="sect4">Optional
|
---|
63 | (Required to Build the HTML User Manual)</bridgehead>
|
---|
64 | <para role="optional"><xref linkend="openjade"/> and
|
---|
65 | <ulink url="http://www.docbook.org/sgml/4.2/index.html"> DocBOOK SGML
|
---|
66 | DTD-4.2</ulink></para>
|
---|
67 |
|
---|
68 | <bridgehead renderas="sect4">Optional
|
---|
69 | (Required to Build the API Documentation)</bridgehead>
|
---|
70 | <para role="optional"><xref linkend="doxygen"/> and
|
---|
71 | <xref linkend="graphviz"/></para>
|
---|
72 |
|
---|
73 | <para condition="html" role="usernotes">User Notes:
|
---|
74 | <ulink url="&blfs-wiki;/libusb"/></para>
|
---|
75 |
|
---|
76 | </sect2>
|
---|
77 |
|
---|
78 | <sect2 role="installation">
|
---|
79 | <title>Installation of libusb</title>
|
---|
80 |
|
---|
81 | <para>Install <application>libusb</application> by running the following
|
---|
82 | commands:</para>
|
---|
83 |
|
---|
84 | <screen><userinput>./configure --prefix=/usr --disable-build-docs &&
|
---|
85 | make</userinput></screen>
|
---|
86 |
|
---|
87 | <para>If you wish to build the API documentation (see the required
|
---|
88 | dependencies), issue the following command:</para>
|
---|
89 |
|
---|
90 | <screen><userinput>make apidox</userinput></screen>
|
---|
91 |
|
---|
92 | <para>To test the results, issue <command>make -k check</command>.</para>
|
---|
93 |
|
---|
94 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
95 |
|
---|
96 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
97 |
|
---|
98 | <para>If you built the HTML user manual (by having the required
|
---|
99 | dependencies installed and removing the
|
---|
100 | <parameter>--disable-build-docs</parameter> parameter from the
|
---|
101 | <command>configure</command> command), install it using the following
|
---|
102 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
103 |
|
---|
104 | <screen role="root"><userinput>install -v -d -m755 /usr/share/doc/libusb-&libusb-version;/html &&
|
---|
105 | install -v -m644 doc/html/* /usr/share/doc/libusb-&libusb-version;/html</userinput></screen>
|
---|
106 |
|
---|
107 | <para>If you built the API documentation, install it using the following
|
---|
108 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
109 |
|
---|
110 | <screen role="root"><userinput>install -v -d -m755 /usr/share/doc/libusb-&libusb-version;/apidocs &&
|
---|
111 | install -v -m644 apidocs/html/* \
|
---|
112 | /usr/share/doc/libusb-&libusb-version;/apidocs</userinput></screen>
|
---|
113 |
|
---|
114 | </sect2>
|
---|
115 |
|
---|
116 | <sect2 role="commands">
|
---|
117 | <title>Command Explanations</title>
|
---|
118 |
|
---|
119 | <para><parameter>--disable-build-docs</parameter>: This switch avoids
|
---|
120 | building the HTML user manual. Remove it if you have the required
|
---|
121 | dependencies installed and wish to build the manual.</para>
|
---|
122 |
|
---|
123 | </sect2>
|
---|
124 |
|
---|
125 | <sect2 role="configuration">
|
---|
126 | <title>Configuring Libusb</title>
|
---|
127 |
|
---|
128 | <!--
|
---|
129 | <para><application>libusb</application> requires the
|
---|
130 | <systemitem class="filesystem">usbfs</systemitem> kernel filesystem
|
---|
131 | to be mounted on <filename class="directory">/proc/bus/usb</filename>.
|
---|
132 | Applications require the files in this directory to be accessible to the user,
|
---|
133 | sometimes for both reading and writing. To restrict access to USB devices,
|
---|
134 | ensure the <systemitem class="filesystem">usb</systemitem> group exits
|
---|
135 | on your system. If necessary, create the <systemitem
|
---|
136 | class="filesystem">usb</systemitem> group using the following command:</para>
|
---|
137 |
|
---|
138 | <screen role='root'><userinput>groupadd -g 14 usb</userinput></screen>
|
---|
139 | -->
|
---|
140 |
|
---|
141 | <para id="libusb-kernel">To access raw USB devices (those not treated as a
|
---|
142 | disk by the mass-storage driver), appropriate support must be available in
|
---|
143 | the kernel. Check your kernel configuration for Device Drivers ⇒ USB
|
---|
144 | support ⇒ Support for Host-side USB. Select any USB hardware device
|
---|
145 | drivers you may need on the same page.</para>
|
---|
146 |
|
---|
147 | <indexterm zone="libusb libusb-kernel">
|
---|
148 | <primary sortas="d-USB-device-filesystem">Support for Host-side USB</primary>
|
---|
149 | </indexterm>
|
---|
150 |
|
---|
151 | <para>To have raw USB devices set up properly, add the following
|
---|
152 | <application>udev</application> rule and add any users
|
---|
153 | that need to access raw USB devices to the "usb" group.</para>
|
---|
154 |
|
---|
155 | <screen><literal>cat > /etc/udev/rules.d/23-usb.rules << "EOF"
|
---|
156 | # Set group ownership for raw USB devices
|
---|
157 | SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
|
---|
158 | EOF</literal></screen>
|
---|
159 |
|
---|
160 | <!--
|
---|
161 | <para>Fine-tuning of permissions is also possible by creating extra rules,
|
---|
162 | matching on something like this (on one line). The vendor and product can
|
---|
163 | be found by searchng the <filename
|
---|
164 | class='directory'>/sys/devices</filename> directory entries or using
|
---|
165 | <command>udevinfo</command> after the device has been attached. See the
|
---|
166 | documentation in the current udev directory of <filename
|
---|
167 | class='directory'>/usr/share/doc></filename> for details.</para>
|
---|
168 |
|
---|
169 | <screen><literal>SUBSYSTEM=="usb_device", SYSFS{idVendor}=="05d8",
|
---|
170 | SYSFS{idProduct}=="4002", GROUP:="scanner"</literal></screen>
|
---|
171 |
|
---|
172 | <para>Some older applications, such as <application>VMware</application>,
|
---|
173 | need the following deprecated entry in the <filename>/etc/fstab</filename>
|
---|
174 | file. This is not normally needed.</para>
|
---|
175 |
|
---|
176 | <screen><literal>usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0</literal></screen>
|
---|
177 | -->
|
---|
178 |
|
---|
179 | </sect2>
|
---|
180 |
|
---|
181 | <sect2 role="content">
|
---|
182 | <title>Contents</title>
|
---|
183 |
|
---|
184 | <segmentedlist>
|
---|
185 | <segtitle>Installed Program</segtitle>
|
---|
186 | <segtitle>Installed Libraries</segtitle>
|
---|
187 | <segtitle>Installed Directory</segtitle>
|
---|
188 |
|
---|
189 | <seglistitem>
|
---|
190 | <seg>libusb-config</seg>
|
---|
191 | <seg>libusb.{so,a} and libusbpp.{so,a}</seg>
|
---|
192 | <seg>/usr/share/doc/libusb-&libusb-version;</seg>
|
---|
193 | </seglistitem>
|
---|
194 | </segmentedlist>
|
---|
195 |
|
---|
196 | <variablelist>
|
---|
197 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
198 | <?dbfo list-presentation="list"?>
|
---|
199 | <?dbhtml list-presentation="table"?>
|
---|
200 |
|
---|
201 | <varlistentry id="libusb-config">
|
---|
202 | <term><command>libusb-config</command></term>
|
---|
203 | <listitem>
|
---|
204 | <para>is a script that provides the right compiler and linker
|
---|
205 | flags for programs using
|
---|
206 | <filename class='libraryfile'>libusb</filename>.</para>
|
---|
207 | <indexterm zone="libusb libusb-config">
|
---|
208 | <primary sortas="b-libusb-config">libusb-config</primary>
|
---|
209 | </indexterm>
|
---|
210 | </listitem>
|
---|
211 | </varlistentry>
|
---|
212 |
|
---|
213 | <varlistentry id="libusb-lib">
|
---|
214 | <term><filename class='libraryfile'>libusb.{so,a}</filename></term>
|
---|
215 | <listitem>
|
---|
216 | <para> libraries contain C functions for accessing
|
---|
217 | USB hardware.</para>
|
---|
218 | <indexterm zone="libusb libusb-lib">
|
---|
219 | <primary sortas="c-libusb">libusb.{so,a}</primary>
|
---|
220 | </indexterm>
|
---|
221 | </listitem>
|
---|
222 | </varlistentry>
|
---|
223 |
|
---|
224 | </variablelist>
|
---|
225 |
|
---|
226 | </sect2>
|
---|
227 |
|
---|
228 | </sect1>
|
---|