[52d29f7] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[52d29f7] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[fc3e01f] | 7 | <!ENTITY libusb-download-http "http://prdownloads.sourceforge.net/libusb/libusb-&libusb-version;.tar.gz">
|
---|
[1f3b7a7] | 8 | <!ENTITY libusb-download-ftp "ftp://ftp.fu-berlin.de/unix/linux/mirrors/gentoo/distfiles/libusb-&libusb-version;.tar.gz">
|
---|
| 9 | <!ENTITY libusb-md5sum "c6062b29acd2cef414bcc34e0decbdd1">
|
---|
| 10 | <!ENTITY libusb-size "375 KB">
|
---|
| 11 | <!ENTITY libusb-buildsize "7.4 MB (additional 1.3 MB to install documentation)">
|
---|
| 12 | <!ENTITY libusb-time "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>
|
---|
[4f26c54] | 21 | <keywordset>
|
---|
| 22 | <keyword role="package">libusb-&libusb-version;.tar</keyword>
|
---|
[22ac237] | 23 | <keyword role="ftpdir">libusb</keyword>
|
---|
[4f26c54] | 24 | </keywordset>
|
---|
[fc3e01f] | 25 | </sect1info>
|
---|
[4c3474fe] | 26 |
|
---|
[1f3b7a7] | 27 | <title>libusb-&libusb-version;</title>
|
---|
[4c3474fe] | 28 |
|
---|
[fc3e01f] | 29 | <indexterm zone="libusb">
|
---|
| 30 | <primary sortas="a-Libusb">Libusb</primary>
|
---|
| 31 | </indexterm>
|
---|
| 32 |
|
---|
| 33 | <sect2 role="package">
|
---|
[1f3b7a7] | 34 | <title>Introduction to libusb</title>
|
---|
[4c3474fe] | 35 |
|
---|
[fc3e01f] | 36 | <para>The <application>libusb</application> package contains a library
|
---|
| 37 | used by some applications for USB device access.</para>
|
---|
[4c3474fe] | 38 |
|
---|
[fc3e01f] | 39 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 40 | <itemizedlist spacing="compact">
|
---|
| 41 | <listitem>
|
---|
| 42 | <para>Download (HTTP): <ulink url="&libusb-download-http;"/></para>
|
---|
| 43 | </listitem>
|
---|
| 44 | <listitem>
|
---|
| 45 | <para>Download (FTP): <ulink url="&libusb-download-ftp;"/></para>
|
---|
| 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
| 48 | <para>Download MD5 sum: &libusb-md5sum;</para>
|
---|
| 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
| 51 | <para>Download size: &libusb-size;</para>
|
---|
| 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
| 54 | <para>Estimated disk space required: &libusb-buildsize;</para>
|
---|
| 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
| 57 | <para>Estimated build time: &libusb-time;</para>
|
---|
| 58 | </listitem>
|
---|
| 59 | </itemizedlist>
|
---|
[4c3474fe] | 60 |
|
---|
[1f3b7a7] | 61 | <bridgehead renderas="sect3">libusb Dependencies</bridgehead>
|
---|
[4c3474fe] | 62 |
|
---|
[74390482] | 63 | <bridgehead renderas="sect4">Optional (Required to Build the HTML User
|
---|
[fc3e01f] | 64 | Manual)</bridgehead>
|
---|
[4f26c54] | 65 | <para role="optional"><xref linkend="openjade"/> and
|
---|
[74390482] | 66 | <ulink url="http://www.docbook.org/sgml/4.2/index.html"> DocBOOK SGML
|
---|
[4c3474fe] | 67 | DTD-4.2</ulink></para>
|
---|
| 68 |
|
---|
[74390482] | 69 | <bridgehead renderas="sect4">Optional (Required to Build the API
|
---|
[fc3e01f] | 70 | Documentation)</bridgehead>
|
---|
[4f26c54] | 71 | <para role="optional"><xref linkend="doxygen"/> and
|
---|
[fc3e01f] | 72 | <ulink url="http://www.graphviz.org/">GraphViz</ulink></para>
|
---|
[4c3474fe] | 73 |
|
---|
[fc3e01f] | 74 | </sect2>
|
---|
[4c3474fe] | 75 |
|
---|
[fc3e01f] | 76 | <sect2 role="installation">
|
---|
[1f3b7a7] | 77 | <title>Installation of libusb</title>
|
---|
[fc3e01f] | 78 |
|
---|
[74390482] | 79 | <para>Install <application>libusb</application> by running the following
|
---|
[fc3e01f] | 80 | commands:</para>
|
---|
| 81 |
|
---|
| 82 | <screen><userinput>./configure --prefix=/usr --disable-build-docs &&
|
---|
| 83 | make</userinput></screen>
|
---|
| 84 |
|
---|
[1f3b7a7] | 85 | <para>If you wish to build the API documentation (see the required
|
---|
| 86 | dependencies), issue the following command:</para>
|
---|
[fc3e01f] | 87 |
|
---|
| 88 | <screen><userinput>make apidox</userinput></screen>
|
---|
[4c3474fe] | 89 |
|
---|
[1f3b7a7] | 90 | <para>To test the results, issue <command>make -k check</command>.</para>
|
---|
| 91 |
|
---|
[fc3e01f] | 92 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[4c3474fe] | 93 |
|
---|
[fc3e01f] | 94 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 95 |
|
---|
[1f3b7a7] | 96 | <para>If you built the HTML user manual (by having the required
|
---|
| 97 | dependencies installed and removing the
|
---|
| 98 | <parameter>--disable-build-docs</parameter> parameter from the
|
---|
| 99 | <command>configure</command> command), install it using the following
|
---|
| 100 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[fc3e01f] | 101 |
|
---|
| 102 | <screen role="root"><userinput>install -v -d -m755 /usr/share/doc/libusb-&libusb-version;/html &&
|
---|
| 103 | install -v -m644 doc/html/* /usr/share/doc/libusb-&libusb-version;/html</userinput></screen>
|
---|
| 104 |
|
---|
[1f3b7a7] | 105 | <para>If you built the API documentation, install it using the following
|
---|
| 106 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[fc3e01f] | 107 |
|
---|
| 108 | <screen role="root"><userinput>install -v -d -m755 /usr/share/doc/libusb-&libusb-version;/apidocs &&
|
---|
[4c288b0] | 109 | install -v -m644 apidocs/html/* \
|
---|
| 110 | /usr/share/doc/libusb-&libusb-version;/apidocs</userinput></screen>
|
---|
[4c3474fe] | 111 |
|
---|
[fc3e01f] | 112 | </sect2>
|
---|
[4c3474fe] | 113 |
|
---|
[fc3e01f] | 114 | <sect2 role="commands">
|
---|
| 115 | <title>Command Explanations</title>
|
---|
| 116 |
|
---|
[1f3b7a7] | 117 | <para><parameter>--disable-build-docs</parameter>: This switch avoids
|
---|
| 118 | building the HTML user manual.</para>
|
---|
[4412b30b] | 119 |
|
---|
[fc3e01f] | 120 | </sect2>
|
---|
[4c3474fe] | 121 |
|
---|
[fc3e01f] | 122 | <sect2 role="configuration">
|
---|
| 123 | <title>Configuring Libusb</title>
|
---|
| 124 |
|
---|
[74390482] | 125 | <para><application>libusb</application> requires the
|
---|
| 126 | <systemitem class="filesystem">usbfs</systemitem> kernel filesystem
|
---|
| 127 | to be mounted on <filename class="directory">/proc/bus/usb</filename>.
|
---|
| 128 | Applications require the files in this directory to be accessible to the user,
|
---|
| 129 | sometimes for both reading and writing. To restrict access to USB devices,
|
---|
| 130 | ensure the <systemitem class="filesystem">usb</systemitem> group exits
|
---|
| 131 | on your system. If necessary, create the <systemitem
|
---|
[fc3e01f] | 132 | class="filesystem">usb</systemitem> group using the following command:</para>
|
---|
| 133 |
|
---|
| 134 | <screen role='root'><userinput>groupadd -g 14 usb</userinput></screen>
|
---|
| 135 |
|
---|
[74390482] | 136 | <para id="libusb-kernel">Ensure that you have compiled the <quote>USB device
|
---|
| 137 | filesystem</quote> directly into the kernel or compiled it as a module
|
---|
| 138 | (listing the resulting <quote>usbcore</quote> module in the
|
---|
| 139 | <filename>/etc/sysconfig/modules</filename> file). You should also have an
|
---|
[4c3474fe] | 140 | entry similar to the line below in your <filename>/etc/fstab</filename>
|
---|
[fc3e01f] | 141 | file:</para>
|
---|
[4c3474fe] | 142 |
|
---|
[fc3e01f] | 143 | <indexterm zone="libusb libusb-kernel">
|
---|
| 144 | <primary sortas="d-USB-device-filesystem">USB device filesystem</primary>
|
---|
| 145 | </indexterm>
|
---|
| 146 |
|
---|
| 147 | <screen><literal>usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0</literal></screen>
|
---|
[4c3474fe] | 148 |
|
---|
[fc3e01f] | 149 | </sect2>
|
---|
[4c3474fe] | 150 |
|
---|
[fc3e01f] | 151 | <sect2 role="content">
|
---|
| 152 | <title>Contents</title>
|
---|
| 153 |
|
---|
| 154 | <segmentedlist>
|
---|
| 155 | <segtitle>Installed Program</segtitle>
|
---|
| 156 | <segtitle>Installed Libraries</segtitle>
|
---|
| 157 | <segtitle>Installed Directory</segtitle>
|
---|
[4c3474fe] | 158 |
|
---|
[fc3e01f] | 159 | <seglistitem>
|
---|
| 160 | <seg>usb-config</seg>
|
---|
| 161 | <seg>libusb.[so,a] and libusbpp.[so,a]</seg>
|
---|
| 162 | <seg>/usr/share/doc/libusb-&libusb-version;</seg>
|
---|
| 163 | </seglistitem>
|
---|
| 164 | </segmentedlist>
|
---|
[4c3474fe] | 165 |
|
---|
[fc3e01f] | 166 | <variablelist>
|
---|
| 167 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 168 | <?dbfo list-presentation="list"?>
|
---|
| 169 | <?dbhtml list-presentation="table"?>
|
---|
[4c3474fe] | 170 |
|
---|
[fc3e01f] | 171 | <varlistentry id="usb-config">
|
---|
| 172 | <term><command>usb-config</command></term>
|
---|
| 173 | <listitem>
|
---|
[74390482] | 174 | <para>is a script that provides the right compiler and linker
|
---|
| 175 | flags for programs using
|
---|
[fc3e01f] | 176 | <filename class='libraryfile'>libusb</filename>.</para>
|
---|
| 177 | <indexterm zone="libusb usb-config">
|
---|
| 178 | <primary sortas="b-usb-config">usb-config</primary>
|
---|
| 179 | </indexterm>
|
---|
| 180 | </listitem>
|
---|
| 181 | </varlistentry>
|
---|
[4c3474fe] | 182 |
|
---|
[fc3e01f] | 183 | <varlistentry id="libusb-lib">
|
---|
| 184 | <term><filename class='libraryfile'>libusb.[so,a]</filename></term>
|
---|
| 185 | <listitem>
|
---|
[74390482] | 186 | <para> libraries contain C functions for accessing
|
---|
[fc3e01f] | 187 | USB hardware.</para>
|
---|
| 188 | <indexterm zone="libusb libusb-lib">
|
---|
| 189 | <primary sortas="c-libusb">libusb.[so,a]</primary>
|
---|
| 190 | </indexterm>
|
---|
| 191 | </listitem>
|
---|
| 192 | </varlistentry>
|
---|
[4c3474fe] | 193 |
|
---|
[fc3e01f] | 194 | </variablelist>
|
---|
| 195 |
|
---|
| 196 | </sect2>
|
---|
[bdf5806e] | 197 |
|
---|
| 198 | </sect1>
|
---|