[1ed12e2d] | 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" [
|
---|
[1ed12e2d] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[8dfc5c3] | 7 | <!ENTITY usbutils-download-http "&kernel-dl;/linux/utils/usb/usbutils/usbutils-&usbutils-version;.tar.xz">
|
---|
[faa68e4a] | 8 | <!ENTITY usbutils-download-ftp " ">
|
---|
[1a424644] | 9 | <!ENTITY usbutils-md5sum "0da98eb80159071fdbb00905390509d9">
|
---|
| 10 | <!ENTITY usbutils-size "100 KB">
|
---|
| 11 | <!ENTITY usbutils-buildsize "6.6 MB">
|
---|
| 12 | <!ENTITY usbutils-time "0.2 SBU">
|
---|
[1ed12e2d] | 13 | ]>
|
---|
| 14 |
|
---|
[4890200] | 15 | <sect1 id="usbutils" xreflabel="usbutils-&usbutils-version;">
|
---|
[1ed12e2d] | 16 | <?dbhtml filename="usbutils.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
[4890200] | 23 | <title>usbutils-&usbutils-version;</title>
|
---|
[1ed12e2d] | 24 |
|
---|
| 25 | <indexterm zone="usbutils">
|
---|
[4890200] | 26 | <primary sortas="a-usbutils">usbutils</primary>
|
---|
[1ed12e2d] | 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
[564851b] | 30 | <title>Introduction to USB Utils</title>
|
---|
[1ed12e2d] | 31 |
|
---|
[564851b] | 32 | <para>
|
---|
[2882ec4b] | 33 | The <application>USB Utils</application> package contains utilities
|
---|
[564851b] | 34 | used to display information about USB buses in the system and the
|
---|
| 35 | devices connected to them.
|
---|
| 36 | </para>
|
---|
[1ed12e2d] | 37 |
|
---|
[5380ca3] | 38 | &lfs91_checked;
|
---|
[75c492d] | 39 |
|
---|
[1ed12e2d] | 40 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 41 | <itemizedlist spacing="compact">
|
---|
| 42 | <listitem>
|
---|
[564851b] | 43 | <para>
|
---|
| 44 | Download (HTTP): <ulink url="&usbutils-download-http;"/>
|
---|
| 45 | </para>
|
---|
[1ed12e2d] | 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
[564851b] | 48 | <para>
|
---|
| 49 | Download (FTP): <ulink url="&usbutils-download-ftp;"/>
|
---|
| 50 | </para>
|
---|
[1ed12e2d] | 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
[564851b] | 53 | <para>
|
---|
| 54 | Download MD5 sum: &usbutils-md5sum;
|
---|
| 55 | </para>
|
---|
[1ed12e2d] | 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
[564851b] | 58 | <para>
|
---|
| 59 | Download size: &usbutils-size;
|
---|
| 60 | </para>
|
---|
[1ed12e2d] | 61 | </listitem>
|
---|
| 62 | <listitem>
|
---|
[564851b] | 63 | <para>
|
---|
| 64 | Estimated disk space required: &usbutils-buildsize;
|
---|
| 65 | </para>
|
---|
[1ed12e2d] | 66 | </listitem>
|
---|
| 67 | <listitem>
|
---|
[564851b] | 68 | <para>
|
---|
| 69 | Estimated build time: &usbutils-time;
|
---|
| 70 | </para>
|
---|
[1ed12e2d] | 71 | </listitem>
|
---|
| 72 | </itemizedlist>
|
---|
[1a424644] | 73 | <!--
|
---|
[194a584] | 74 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 75 | <itemizedlist spacing="compact">
|
---|
| 76 | <listitem>
|
---|
| 77 | <para>
|
---|
| 78 | Required patch:
|
---|
| 79 | <ulink url="&patch-root;/usbutils-&usbutils-version;-lsusb_bugfixes-1.patch"/>
|
---|
| 80 | </para>
|
---|
| 81 | </listitem>
|
---|
| 82 | </itemizedlist>
|
---|
[1a424644] | 83 | -->
|
---|
[564851b] | 84 | <bridgehead renderas="sect3">USB Utils Dependencies</bridgehead>
|
---|
[9f12e36] | 85 |
|
---|
[195b246] | 86 |
|
---|
[76cfd80] | 87 | <para role="required">
|
---|
[195b246] | 88 | <xref linkend="libusb"/> and
|
---|
| 89 | <xref linkend="wget"/>
|
---|
[eae7f55] | 90 | <!-- In the systemd book, a unit/timer is installed to update the
|
---|
[195b246] | 91 | usb.ids file automatically.
|
---|
| 92 |
|
---|
| 93 | wget is used in the instructions below.
|
---|
| 94 | -->
|
---|
[76cfd80] | 95 | </para>
|
---|
[1ed12e2d] | 96 |
|
---|
[1a424644] | 97 | <!-- lsusb.py has been ported to Python 3, and it is the only Python user
|
---|
[f22356bf] | 98 | <bridgehead renderas="sect4">Required Runtime</bridgehead>
|
---|
[1051f94e] | 99 | <para role="required">
|
---|
| 100 | <xref role="runtime" linkend="python2"/>
|
---|
| 101 | </para>
|
---|
[5093a1f9] | 102 | -->
|
---|
[1ed12e2d] | 103 | <para condition="html" role="usernotes">User Notes:
|
---|
[564851b] | 104 | <ulink url="&blfs-wiki;/usbutils"/>
|
---|
| 105 | </para>
|
---|
[1ed12e2d] | 106 | </sect2>
|
---|
| 107 |
|
---|
| 108 | <sect2 role="installation">
|
---|
[564851b] | 109 | <title>Installation of USB Utils</title>
|
---|
[1ed12e2d] | 110 |
|
---|
[564851b] | 111 | <para>
|
---|
| 112 | Install <application>USB Utils</application> by
|
---|
| 113 | running the following commands:
|
---|
| 114 | </para>
|
---|
[1ed12e2d] | 115 |
|
---|
[1a424644] | 116 | <screen><userinput>./autogen.sh --prefix=/usr --datadir=/usr/share/hwdata &&
|
---|
[1ed12e2d] | 117 | make</userinput></screen>
|
---|
| 118 |
|
---|
[564851b] | 119 | <para>
|
---|
| 120 | This package does not come with a test suite.
|
---|
| 121 | </para>
|
---|
[1ed12e2d] | 122 |
|
---|
[564851b] | 123 | <para>
|
---|
| 124 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 125 | </para>
|
---|
[1ed12e2d] | 126 |
|
---|
[2882ec4b] | 127 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[1ed12e2d] | 128 |
|
---|
[b1092d9] | 129 | <para>
|
---|
| 130 | To install the <filename>usb.ids</filename> data file, using
|
---|
| 131 | <xref linkend="wget"/>, run, as the
|
---|
| 132 | <systemitem class="username">root</systemitem> user:
|
---|
| 133 | </para>
|
---|
| 134 |
|
---|
| 135 | <screen role="root"><userinput>install -dm755 /usr/share/hwdata/ &&
|
---|
| 136 | wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids</userinput></screen>
|
---|
| 137 |
|
---|
[f22356bf] | 138 | <para>
|
---|
| 139 | The script <command>lsusb.py</command> displays information in a more
|
---|
| 140 | easily readable form than <command>lsusb</command>. To find the options,
|
---|
| 141 | use <command>lsusb.py -h</command>. One form of use recommended by the
|
---|
| 142 | developer is <command>lsusb.py -ciu</command>.
|
---|
| 143 | </para>
|
---|
| 144 |
|
---|
[1ed12e2d] | 145 | </sect2>
|
---|
[0e463f49] | 146 | <!-- No longer needed
|
---|
[1ed12e2d] | 147 | <sect2 role="commands">
|
---|
| 148 | <title>Command Explanations</title>
|
---|
| 149 |
|
---|
[564851b] | 150 | <para>
|
---|
[2882ec4b] | 151 | <command>sed ... lsusb.py</command>: Instructs lsusb.py where to search
|
---|
| 152 | <filename>usb.ids</filename>.
|
---|
[564851b] | 153 | </para>
|
---|
[1ed12e2d] | 154 |
|
---|
| 155 | </sect2>
|
---|
[0e463f49] | 156 | -->
|
---|
[1ed12e2d] | 157 | <sect2 role="configuration">
|
---|
[564851b] | 158 | <title>Configuring USB Utils</title>
|
---|
| 159 |
|
---|
[ac8c7d4] | 160 | <para revision="sysv">
|
---|
[3c4997d] | 161 | The <filename>usb.ids</filename> data file is constantly being updated.
|
---|
[b1092d9] | 162 | To get a current version of this file, using <xref linkend="wget"/>,
|
---|
| 163 | periodically run again, as the
|
---|
| 164 | <systemitem class="username">root</systemitem> user:
|
---|
| 165 | </para>
|
---|
[838cd0f] | 166 |
|
---|
[ac8c7d4] | 167 | <screen role="root" revision="sysv"><userinput>wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids</userinput></screen>
|
---|
[564851b] | 168 |
|
---|
[b471f6a] | 169 | <para>
|
---|
[ac8c7d4] | 170 | You should update the <filename>/usr/share/hwdata/usb.ids</filename> file
|
---|
[b471f6a] | 171 | periodically. <phrase revision="sysv">If you've installed
|
---|
| 172 | <xref linkend="fcron"/> and completed the section on periodic jobs,
|
---|
| 173 | execute</phrase><phrase revision="systemd">Execute</phrase> the following commands, as the <systemitem class="username">root</systemitem> user,
|
---|
| 174 | to create a <phrase revision="sysv">weekly cron job:</phrase>
|
---|
| 175 | <phrase revision="systemd">systemd timer to update it weekly on Sundays
|
---|
| 176 | at 2:30 A.M. (local time):</phrase>
|
---|
[ac8c7d4] | 177 | </para>
|
---|
| 178 |
|
---|
[914dd13] | 179 | <screen role="nodump" revision="sysv"><userinput>cat > /etc/cron.weekly/update-usbids.sh << "EOF" &&
|
---|
[b471f6a] | 180 | <literal>#!/bin/bash
|
---|
| 181 | /usr/bin/wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids</literal>
|
---|
| 182 | EOF
|
---|
[02e3bbc8] | 183 | chmod 754 /etc/cron.weekly/update-usbids.sh</userinput></screen>
|
---|
[b471f6a] | 184 |
|
---|
[ac8c7d4] | 185 | <screen role="root" revision="systemd"><userinput>cat > /lib/systemd/system/update-usbids.service << "EOF" &&
|
---|
| 186 | <literal>[Unit]
|
---|
| 187 | Description=Update usb.ids file
|
---|
[f5a82e9c] | 188 | Documentation=man:lsusb(8)
|
---|
[ac8c7d4] | 189 | DefaultDependencies=no
|
---|
[a5b9f1e] | 190 | After=local-fs.target network-online.target
|
---|
[ac8c7d4] | 191 | Before=shutdown.target
|
---|
| 192 |
|
---|
| 193 | [Service]
|
---|
| 194 | Type=oneshot
|
---|
| 195 | RemainAfterExit=yes
|
---|
| 196 | ExecStart=/usr/bin/wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids</literal>
|
---|
| 197 | EOF
|
---|
| 198 | cat > /lib/systemd/system/update-usbids.timer << "EOF" &&
|
---|
| 199 | <literal>[Unit]
|
---|
| 200 | Description=Update usb.ids file weekly
|
---|
| 201 |
|
---|
| 202 | [Timer]
|
---|
| 203 | OnCalendar=Sun 03:00:00
|
---|
| 204 | Persistent=true
|
---|
| 205 |
|
---|
| 206 | [Install]
|
---|
| 207 | WantedBy=timers.target</literal>
|
---|
| 208 | EOF
|
---|
| 209 | systemctl enable update-usbids.timer</userinput></screen>
|
---|
| 210 |
|
---|
[838cd0f] | 211 | </sect2>
|
---|
[1ed12e2d] | 212 |
|
---|
| 213 | <sect2 role="content">
|
---|
| 214 | <title>Contents</title>
|
---|
| 215 |
|
---|
| 216 | <segmentedlist>
|
---|
| 217 | <segtitle>Installed Programs</segtitle>
|
---|
[c3c56b2] | 218 | <segtitle>Installed Libraries</segtitle>
|
---|
| 219 | <segtitle>Installed Directories</segtitle>
|
---|
[1ed12e2d] | 220 |
|
---|
| 221 | <seglistitem>
|
---|
[564851b] | 222 | <seg>
|
---|
[2882ec4b] | 223 | lsusb, lsusb.py, usb-devices, and usbhid-dump
|
---|
[564851b] | 224 | </seg>
|
---|
[c3c56b2] | 225 | <seg>
|
---|
| 226 | None
|
---|
| 227 | </seg>
|
---|
| 228 | <seg>
|
---|
| 229 | None
|
---|
| 230 | </seg>
|
---|
[1ed12e2d] | 231 | </seglistitem>
|
---|
| 232 | </segmentedlist>
|
---|
| 233 |
|
---|
| 234 | <variablelist>
|
---|
| 235 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 236 | <?dbfo list-presentation="list"?>
|
---|
| 237 | <?dbhtml list-presentation="table"?>
|
---|
| 238 |
|
---|
| 239 | <varlistentry id="lsusb">
|
---|
| 240 | <term><command>lsusb</command></term>
|
---|
| 241 | <listitem>
|
---|
[564851b] | 242 | <para>
|
---|
[73fe507] | 243 | is a utility for displaying information about all USB buses
|
---|
[f22356bf] | 244 | in the system and all devices connected to them, but not in human
|
---|
| 245 | friendly form.
|
---|
[564851b] | 246 | </para>
|
---|
[1ed12e2d] | 247 | <indexterm zone="usbutils lsusb">
|
---|
| 248 | <primary sortas="b-lsusb">lsusb</primary>
|
---|
| 249 | </indexterm>
|
---|
| 250 | </listitem>
|
---|
| 251 | </varlistentry>
|
---|
| 252 |
|
---|
[2882ec4b] | 253 | <varlistentry id="lsusb.py">
|
---|
| 254 | <term><command>lsusb.py</command></term>
|
---|
[1ed12e2d] | 255 | <listitem>
|
---|
[564851b] | 256 | <para>
|
---|
[f22356bf] | 257 | displays information about all USB buses in the system and all
|
---|
| 258 | devices connected to them in reasonable human friendly form.
|
---|
[564851b] | 259 | </para>
|
---|
[2882ec4b] | 260 | <indexterm zone="usbutils lsusb.py">
|
---|
| 261 | <primary sortas="b-lsusb.py">lsusb.py</primary>
|
---|
[1ed12e2d] | 262 | </indexterm>
|
---|
| 263 | </listitem>
|
---|
| 264 | </varlistentry>
|
---|
[75c492d] | 265 |
|
---|
| 266 | <varlistentry id="usb-devices">
|
---|
| 267 | <term><command>usb-devices</command></term>
|
---|
| 268 | <listitem>
|
---|
[564851b] | 269 | <para>
|
---|
| 270 | is a shell script that displays details of USB buses and devices
|
---|
| 271 | connected to them. It is designed to be used if /proc/bus/usb/devices
|
---|
| 272 | is not available on your system.
|
---|
| 273 | </para>
|
---|
[75c492d] | 274 | <indexterm zone="usbutils usb-devices">
|
---|
| 275 | <primary sortas="b-usb-devices">usb-devices</primary>
|
---|
| 276 | </indexterm>
|
---|
| 277 | </listitem>
|
---|
| 278 | </varlistentry>
|
---|
| 279 |
|
---|
[564851b] | 280 | <varlistentry id="usbhid-dump">
|
---|
| 281 | <term><command>usbhid-dump</command></term>
|
---|
| 282 | <listitem>
|
---|
| 283 | <para>
|
---|
| 284 | is used to dump report descriptors and streams from HID
|
---|
| 285 | (human interface device) interfaces of USB devices.
|
---|
| 286 | </para>
|
---|
| 287 | <indexterm zone="usbutils usbhid-dump">
|
---|
| 288 | <primary sortas="b-usbhid-dump">usbhid-dump</primary>
|
---|
| 289 | </indexterm>
|
---|
| 290 | </listitem>
|
---|
| 291 | </varlistentry>
|
---|
| 292 |
|
---|
[1ed12e2d] | 293 | </variablelist>
|
---|
| 294 |
|
---|
| 295 | </sect2>
|
---|
| 296 |
|
---|
| 297 | </sect1>
|
---|