device: Set disconnect timer to zero for fast disconnection
[platform/upstream/bluez.git] / monitor / btmon.rst
1 =====
2 btmon
3 =====
4
5 -----------------
6 Bluetooth monitor
7 -----------------
8
9 :Authors: - Marcel Holtmann <marcel@holtmann.org>
10           - Tedd Ho-Jeong An <tedd.an@intel.com>
11 :Copyright: Free use of this software is granted under ther terms of the GNU
12             Lesser General Public Licenses (LGPL).
13 :Version: BlueZ
14 :Date: April 2021
15 :Manual section: 1
16 :Manual group: Linux System Administration
17
18 SYNOPSYS
19 ========
20
21 **btmon** [*OPTIONS* ...]
22
23 DESCRIPTION
24 ===========
25
26 The  btmon(1) command  provides  access  to the Bluetooth subsystem monitor
27 infrastructure for reading HCI traces.
28
29 OPTIONS
30 =======
31
32 -r FILE, --read FILE        Read traces in btsnoop format from *FILE*.
33 -w FILE, --write FILE       Save traces in btsnoop format to *FILE*.
34 -a FILE, --analyze FILE     Analyze traces in btsnoop format from *FILE*.
35                             It displays the devices found in the *FILE* with
36                             its packets by type. If gnuplot is installed on
37                             the system it also attempts to plot packet latency
38                             graph.
39 -s SOCKET, --server SOCKET  Start monitor server socket.
40 -p PRIORITY, --priority PRIORITY  Show only priority or lower for user log.
41
42 .. list-table::
43    :header-rows: 1
44    :widths: auto
45    :stub-columns: 1
46
47    * - *PRIORITY*
48      - NAME
49
50    * - **3**
51      - Error
52
53    * - **4**
54      - Warning
55
56    * - **6**
57      - Information (Default)
58
59    * - **7**
60      - Debug. **debug** can be used.
61
62 -i NUM, --index NUM         Show only specified controller. *hciNUM* is also
63                             acceptable. This is useful to capture the traces
64                             from the specific controller when the multiple
65                             controllers are presented.
66
67 -d TTY, --tty TTY           Read data from *TTY*.
68
69 -B SPEED, --rate SPEED      Set TTY speed. The default *SPEED* is 115300
70
71 -V COMPID, --vendor COMPID  Set the default company identifier. The *COMPID* is
72                             a unique number assigned by the Bluetooth SIG to
73                             a member company and can be found/searched from the
74                             Bluetooth SIG webpage.
75
76                             For example, Intel is 2 and Realtek is 93.
77
78 -M, --mgmt                  Open channel for mgmt events.
79
80 -t, --time                  Show a time instead of time offset.
81
82 -T, --date                  Show a time and date information instead of
83                             time offset.
84
85 -S, --sco                   Dump SCO traffic in raw hex format.
86
87 -A, --a2dp                  Dump A2DP stream traffic in a raw hex format.
88
89 -E IP, --ellisys IP         Send Ellisys HCI Injection.
90
91 -P, --no-pager              Disable pager usage while reading the log file.
92
93 -J OPTIONS, --jlink OPTIONS     Read data from RTT.  Each options are comma(,)
94                                 seprated without spaces.
95
96 .. list-table::
97    :header-rows: 1
98    :widths: auto
99    :stub-columns: 1
100
101    * - *OPTIONS*
102      - Description
103
104    * - **DEVICE**
105      - Required. Set the target device.
106
107    * - **SERIALNO**
108      - (Optional) Set the USB serial number. Default is **0**.
109
110    * - **INTERFACE**
111      - (Optional) Target interface. Default is **swd**.
112
113    * - **SPEED**
114      - (Optional) Set target interface speed in kHz. Default is **1000**.
115
116 -R OPTIONS, --rtt OPTIONS   RTT control block parameters. Each options are
117                             comma(,) seprated without spaces.
118
119 .. list-table::
120    :header-rows: 1
121    :widths: auto
122    :stub-columns: 1
123
124    * - *OPTIONS*
125      - Description
126
127    * - **ADDRESS**
128      - (Optional) Address of RTT buffer. Default is **0x00**
129
130    * - **AREA**
131      - (Optional) Size of range to search in RTT buffer. Default is **0**
132
133    * - **NAME**
134      - (Optional) Buffer name. Default is **btmonitor**
135
136 -C WIDTH, --columns WIDTH   Output width if not a terminal
137
138 -c MODE, --color MODE       Set output color. The possible *MODE* values are:
139                             **auto|always|never**.
140
141                             Default value is **auto**
142
143 -v, --version               Show version
144
145 -h, --help                  Show help options
146
147 EXAMPLES
148 ========
149
150 Capture the traces from hci0 to hcidump.log file
151 ------------------------------------------------
152
153 .. code-block::
154
155    $ btmon -i hci0 -w hcidump.log
156
157 Open the trace file
158 -------------------
159
160 .. code-block::
161
162    $ btmon -r hcidump.log
163
164
165 RESOURCES
166 =========
167
168 http://www.bluez.org
169
170 REPORTING BUGS
171 ==============
172
173 linux-bluetooth@vger.kernel.org