Manual: btmon
btmon(1) Linux System Administration btmon(1)
Name
btmon - Bluetooth monitor
SYNOPSIS
btmon [OPTIONS ...]
DESCRIPTION
The btmon(1) command provides access to the Bluetooth subsystem monitor infrastructure for reading HCI traces.
OPTIONS
-r FILE, --read FILE
Read traces in btsnoop format from FILE.
-w FILE, --write FILE
Save traces in btsnoop format to FILE.
-a FILE, --analyze FILE
Analyze traces in btsnoop format from FILE. It displays the devices found in the FILE with its packets by
type. If gnuplot is installed on the system it also attempts to plot packet latency graph.
-s SOCKET, --server SOCKET
Start monitor server socket.
-p PRIORITY, --priority PRIORITY
Show only priority or lower for user log.
ββββββββββββ¬ββββββββββββββββββββββββββββ
β PRIORITY β NAME β
ββββββββββββΌββββββββββββββββββββββββββββ€
β 3 β Error β
ββββββββββββΌββββββββββββββββββββββββββββ€
β 4 β Warning β
ββββββββββββΌββββββββββββββββββββββββββββ€
β 6 β Information (Default) β
ββββββββββββΌββββββββββββββββββββββββββββ€
β 7 β Debug. debug can be used. β
ββββββββββββ΄ββββββββββββββββββββββββββββ
-i NUM, --index NUM
Show only specified controller. hciNUM is also acceptable. This is useful to capture the traces from the speβ
cific controller when the multiple controllers are presented.
-d TTY, --tty TTY
Read data from TTY.
-B SPEED, --rate SPEED
Set TTY speed. The default SPEED is 115300
-V COMPID, --vendor COMPID
Set the default company identifier. The COMPID is a unique number assigned by the Bluetooth SIG to a member
company and can be found/searched from the Bluetooth SIG webpage.
For example, Intel is 2 and Realtek is 93.
-M, --mgmt
Open channel for mgmt events.
-K, --kernel
Open kmsg for kernel messages.
-t, --time
Show a time instead of time offset.
-T, --date
Show a time and date information instead of time offset.
-S, --sco
Dump SCO traffic in raw hex format.
-A, --a2dp
Dump A2DP stream traffic in a raw hex format.
-E IP, --ellisys IP
Send Ellisys HCI Injection.
-P, --no-pager
Disable pager usage while reading the log file.
-J OPTIONS, --jlink OPTIONS
Read data from RTT. Each options are comma(,) separated without spaces.
βββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ
β OPTIONS β Description β
βββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββ€
β DEVICE β Required. Set the target device. β
βββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββ€
β SERIALNO β (Optional) Set the USB serial number. Deβ β
β β fault is 0. β
βββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββ€
β INTERFACE β (Optional) Target interface. Default is β
β β swd. β
βββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββ€
β SPEED β (Optional) Set target interface speed in β
β β kHz. Default is 1000. β
βββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββ
-R OPTIONS, --rtt OPTIONS
RTT control block parameters. Each options are comma(,) separated without spaces.
βββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ
β OPTIONS β Description β
βββββββββββΌββββββββββββββββββββββββββββββββββββββββββββ€
β ADDRESS β (Optional) Address of RTT buffer. Default β
β β is 0x00 β
βββββββββββΌββββββββββββββββββββββββββββββββββββββββββββ€
β AREA β (Optional) Size of range to search in RTT β
β β buffer. Default is 0 β
βββββββββββΌββββββββββββββββββββββββββββββββββββββββββββ€
β NAME β (Optional) Buffer name. Default is btmonβ β
β β itor β
βββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββ
-C WIDTH, --columns WIDTH
Output width if not a terminal
-c MODE, --color MODE
Set output color. The possible MODE values are: auto|always|never.
Default value is auto
-v, --version
Show version
-h, --help
Show help options
EXAMPLES
Capture the traces from hci0 to hcidump.log file
$ btmon -i hci0 -w hcidump.log
Open the trace file
$ btmon -r hcidump.log
RESOURCES
REPORTING BUGS
Author
Marcel Holtmann , Tedd Ho-Jeong An
Copyright
Free use of this software is granted under the terms of the GNU Lesser General Public Licenses (LGPL).
BlueZ April 2021 btmon(1)