source: general/sysutils/usbutils.xml@ 14891a90

12.0 12.1 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 14891a90 was 14891a90, checked in by Xi Ruoyao <xry111@…>, 11 months ago

treewide: More "User Notes" clean up

Remove links to pages w/o real contents.

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