1BTMON(1)                  Linux System Administration                 BTMON(1)
2
3
4

NAME

6       btmon - Bluetooth monitor
7

SYNOPSYS

9       btmon [OPTIONS ...]
10

DESCRIPTION

12       The   btmon(1)  command   provides   access  to the Bluetooth subsystem
13       monitor infrastructure for reading HCI traces.
14

OPTIONS

16       -r FILE, --read FILE
17              Read traces in btsnoop format from FILE.
18
19       -w FILE, --write FILE
20              Save traces in btsnoop format to FILE.
21
22       -a FILE, --analyze FILE
23              Analyze traces in btsnoop format from FILE.  It displays the de‐
24              vices found in the FILE with its packets by type.
25
26       -s SOCKET, --server SOCKET
27              Start monitor server socket.
28
29       -p PRIORITY, --priority PRIORITY
30              Show only priority or lower for user log.
31
32                       ┌─────────┬───────────────────────────┐
33PRIORITY │ NAME                      │
34                       ├─────────┼───────────────────────────┤
353        │ Error                     │
36                       ├─────────┼───────────────────────────┤
374        │ Warning                   │
38                       ├─────────┼───────────────────────────┤
396        │ Information (Default)     │
40                       ├─────────┼───────────────────────────┤
417        │ Debug. debug can be used. │
42                       └─────────┴───────────────────────────┘
43
44       -i NUM, --index NUM
45              Show  only specified controller. hciNUM is also acceptable. This
46              is useful to capture the traces  from  the  specific  controller
47              when the multiple controllers are presented.
48
49       -d TTY, --tty TTY
50              Read data from TTY.
51
52       -B SPEED, --rate SPEED
53              Set TTY speed. The default SPEED is 115300
54
55       -V COMPID, --vendor COMPID
56              Set  the default company identifier. The COMPID is a unique num‐
57              ber assigned by the Bluetooth SIG to a member company and can be
58              found/searched from the Bluetooth SIG webpage.
59
60              For example, Intel is 2 and Realtek is 93.
61
62       -M, --mgmt
63              Open channel for mgmt events.
64
65       -t, --time
66              Show a time instead of time offset.
67
68       -T, --date
69              Show a time and date information instead of time offset.
70
71       -S, --sco
72              Dump SCO traffic in raw hex format.
73
74       -A, --a2dp
75              Dump A2DP stream traffic in a raw hex format.
76
77       -E IP, --ellisys IP
78              Send Ellisys HCI Injection.
79
80       -P, --no-pager
81              Disable pager usage while reading the log file.
82
83       -J OPTIONS, --jlink OPTIONS
84              Read  data from RTT.  Each options are comma(,) seprated without
85              spaces.
86
87                      ┌──────────┬────────────────────────────┐
88OPTIONS   │ Description                │
89                      ├──────────┼────────────────────────────┤
90DEVICE    │ Required. Set  the  target │
91                      │          │ device.                    │
92                      ├──────────┼────────────────────────────┤
93SERIALNO  │ (Optional) Set the USB se‐ │
94                      │          │ rial number. Default is 0. │
95                      ├──────────┼────────────────────────────┤
96INTERFACE │ (Optional)  Target  inter‐ │
97                      │          │ face. Default is swd.      │
98                      ├──────────┼────────────────────────────┤
99SPEED     │ (Optional)  Set target in‐ │
100                      │          │ terface speed in kHz.  De‐ │
101                      │          │ fault is 1000.             │
102                      └──────────┴────────────────────────────┘
103
104       -R OPTIONS, --rtt OPTIONS
105              RTT control block parameters. Each options are comma(,) seprated
106              without spaces.
107
108                       ┌────────┬────────────────────────────┐
109OPTIONS │ Description                │
110                       ├────────┼────────────────────────────┤
111ADDRESS │ (Optional) Address of  RTT │
112                       │        │ buffer. Default is 0x00    
113                       ├────────┼────────────────────────────┤
114AREA    │ (Optional)  Size  of range │
115                       │        │ to search in  RTT  buffer. │
116                       │        │ Default is 0               
117                       ├────────┼────────────────────────────┤
118NAME    │ (Optional)   Buffer  name. │
119                       │        │ Default is btmonitor       
120                       └────────┴────────────────────────────┘
121
122       -C WIDTH, --columns WIDTH
123              Output width if not a terminal
124
125       -c MODE, --color MODE
126              Set  output  color.  The  possible  MODE  values  are:  auto|al‐
127              ways|never.
128
129              Default value is auto
130
131       -v, --version
132              Show version
133
134       -h, --help
135              Show help options
136

EXAMPLES

138   Capture the traces from hci0 to hcidump.log file
139          $ btmon -i hci0 -w hcidump.log
140
141   Open the trace file
142          $ btmon -r hcidump.log
143

RESOURCES

145       http://www.bluez.org
146

REPORTING BUGS

148       linux-bluetooth@vger.kernel.org
149

AUTHOR

151       Marcel  Holtmann  <marcel@holtmann.org>,  Tedd Ho-Jeong An <tedd.an@in‐
152       tel.com>
153
155       Free use of this software is granted under ther terms of the GNU Lesser
156       General Public Licenses (LGPL).
157
158
159
160
161BlueZ                             April 2021                          BTMON(1)
Impressum