STANNIX Community


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)