* [PATCH BlueZ v2 02/12] doc/btmon: Add dedicate sections for timestamp and frame number
2026-02-20 17:31 [PATCH BlueZ v2 01/12] doc/btmon: Add missing documentation Luiz Augusto von Dentz
@ 2026-02-20 17:31 ` Luiz Augusto von Dentz
2026-02-20 17:31 ` [PATCH BlueZ v2 03/12] doc/btmon: Add connection tracking section Luiz Augusto von Dentz
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2026-02-20 17:31 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds sections for how timestamp and frame numbers are generated
and explaim the difference between a frame number and a line number.
---
doc/btmon.rst | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/doc/btmon.rst b/doc/btmon.rst
index e51001921ab1..de05a5fcd6df 100644
--- a/doc/btmon.rst
+++ b/doc/btmon.rst
@@ -442,6 +442,41 @@ Example of protocol layering in ACL data::
Authentication requirement: Bonding, MITM, SC (0x2d)
Max encryption key size: 16
+Timestamp Notes
+---------------
+
+When reading btsnoop files with ``-t`` or ``-T``, timestamps reflect the
+wall-clock time recorded in the btsnoop file. The precision depends on
+the source:
+
+- **Live capture** (``btmon`` monitor channel): Microsecond precision
+ from the kernel.
+- **btsnoop files**: The btsnoop format stores timestamps as
+ microseconds since epoch, so full microsecond precision is
+ preserved. Trailing zeros in the display (e.g., ``14:38:46.589000``)
+ indicate the original capture source had millisecond granularity.
+
+The default timestamp mode shows seconds elapsed since the first
+packet in the trace, which is useful for measuring intervals between
+events without needing to know the absolute time.
+
+Frame Numbers vs Line Numbers
+-----------------------------
+
+btmon assigns sequential **frame numbers** (``#N``) to HCI packets.
+These are stable identifiers for specific packets regardless of output
+formatting. However, when processing btmon text output with tools like
+``grep`` or ``sed``, the relevant unit is **line numbers** in the output
+file. The two are unrelated:
+
+- A single frame may produce many output lines (header + decoded
+ fields).
+- Frame numbers only apply to HCI traffic (``<`` and ``>``). MGMT
+ (``@``) and system notes (``=``) do not have frame numbers.
+- When referencing specific packets, prefer frame numbers (``#487``)
+ over line numbers, as frame numbers are stable across different
+ terminal widths and formatting options.
+
Practical Reading Guide
-----------------------
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH BlueZ v2 03/12] doc/btmon: Add connection tracking section
2026-02-20 17:31 [PATCH BlueZ v2 01/12] doc/btmon: Add missing documentation Luiz Augusto von Dentz
2026-02-20 17:31 ` [PATCH BlueZ v2 02/12] doc/btmon: Add dedicate sections for timestamp and frame number Luiz Augusto von Dentz
@ 2026-02-20 17:31 ` Luiz Augusto von Dentz
2026-02-20 17:31 ` [PATCH BlueZ v2 04/12] doc/btmon: Add a dedicated section for analyze mode Luiz Augusto von Dentz
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2026-02-20 17:31 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds connection tracking section which explains how connections
and buffers are tracked.
---
doc/btmon.rst | 141 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 141 insertions(+)
diff --git a/doc/btmon.rst b/doc/btmon.rst
index de05a5fcd6df..d93aa34a9412 100644
--- a/doc/btmon.rst
+++ b/doc/btmon.rst
@@ -531,6 +531,147 @@ The kernel forwarded this as a MGMT Device Connected event. bluetoothd
logged its ``connected_callback()``. Then data exchange began -- an L2CAP
parameter update and ATT MTU negotiation over the new ACL connection.
+CONNECTION TRACKING
+===================
+
+HCI uses **connection handles** (16-bit integers) to identify individual
+connections. Understanding how handles map to devices is essential for
+reading traces.
+
+Handle Types
+------------
+
+Different connection types use different handle ranges, but these ranges
+are controller-specific and not standardized. The connection type can be
+determined by looking at the event that created the handle:
+
+.. list-table::
+ :header-rows: 1
+ :widths: 15 25 60
+
+ * - Type
+ - Creation Event
+ - Description
+ * - BR/EDR ACL
+ - Connection Complete
+ - Classic Bluetooth data connection
+ * - LE ACL
+ - LE (Enhanced) Connection Complete
+ - Low Energy data connection
+ * - CIS
+ - LE CIS Established
+ - Connected Isochronous Stream (LE Audio)
+ * - BIS
+ - LE BIG Complete
+ - Broadcast Isochronous Stream (LE Audio)
+ * - SCO/eSCO
+ - Synchronous Connection Complete
+ - Voice/audio synchronous connection (classic)
+
+A single device may have multiple handles simultaneously. For example,
+an LE Audio device will have an LE ACL handle for control traffic and
+one or more CIS handles for audio streams. The ``LE CIS Established``
+event includes the ACL connection handle that the CIS is associated
+with.
+
+Controller Buffer Tracking
+--------------------------
+
+Buffer tracking may show a indicator in square brackets::
+
+ < ACL Data TX: Handle 2048 [1/6] flags 0x00 dlen 16
+
+The ``[1/6]`` means this is buffer slot 1 of 6 available controller
+ACL buffers. This reflects the host-side HCI flow control: the host
+tracks how many buffers the controller has available and shows the
+current usage. When the controller sends ``Number of Completed Packets``
+events, buffers are freed and the count decreases.
+
+HCI ERROR AND DISCONNECT REASON CODES
+======================================
+
+HCI status and disconnect reason codes use the same code space. These
+appear in ``Status:`` and ``Reason:`` fields throughout the trace.
+btmon decodes them automatically, but the hex values are useful for
+searching and filtering.
+
+Common Disconnect Reasons
+-------------------------
+
+.. list-table::
+ :header-rows: 1
+ :widths: 8 40 52
+
+ * - Code
+ - Name
+ - Diagnostic Meaning
+ * - 0x05
+ - Authentication Failure
+ - Pairing or encryption setup failed. Key may be
+ stale or devices have mismatched security databases.
+ * - 0x08
+ - Connection Timeout
+ - The supervision timer expired. The remote device
+ moved out of range or stopped responding. This is
+ an RF link loss.
+ * - 0x13
+ - Remote User Terminated Connection
+ - The remote device intentionally disconnected.
+ This is the normal graceful disconnect.
+ * - 0x14
+ - Remote Device Terminated due to Low Resources
+ - The remote device ran out of resources (memory,
+ connection slots).
+ * - 0x15
+ - Remote Device Terminated due to Power Off
+ - The remote device is powering down.
+ * - 0x16
+ - Connection Terminated By Local Host
+ - The local BlueZ stack intentionally disconnected.
+ Normal when bluetoothd initiates disconnect.
+ * - 0x1f
+ - Unspecified Error
+ - Generic error. Often indicates a firmware issue.
+ * - 0x22
+ - LMP/LL Response Timeout
+ - Link layer procedure timed out. The remote device
+ stopped responding to LL control PDUs.
+ * - 0x28
+ - Instant Passed
+ - A timing-critical operation missed its deadline.
+ Often seen with connection parameter updates.
+ * - 0x2f
+ - Insufficient Security
+ - The required security level (encryption, MITM
+ protection) was not met.
+ * - 0x3b
+ - Unacceptable Connection Parameters
+ - The remote rejected a connection parameter update.
+ * - 0x3d
+ - Connection Terminated due to MIC Failure
+ - Encryption integrity check failed. Possible key
+ mismatch or corruption.
+ * - 0x3e
+ - Connection Failed to be Established
+ - Connection attempt failed entirely (e.g., the
+ remote device did not respond to connection
+ requests).
+ * - 0x3f
+ - MAC Connection Failed
+ - MAC-level connection failure.
+ * - 0x44
+ - Operation Cancelled by Host
+ - The host cancelled the operation before it
+ completed.
+
+Full Error Code Table
+---------------------
+
+The complete set of HCI error codes (0x00-0x45) is defined in the
+Bluetooth Core Specification, Volume 1, Part F. btmon decodes all
+of them automatically in ``Status:`` and ``Reason:`` fields. The
+source mapping is in ``monitor/packet.c`` (``error2str_table``).
+
EXAMPLES
========
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH BlueZ v2 04/12] doc/btmon: Add a dedicated section for analyze mode
2026-02-20 17:31 [PATCH BlueZ v2 01/12] doc/btmon: Add missing documentation Luiz Augusto von Dentz
2026-02-20 17:31 ` [PATCH BlueZ v2 02/12] doc/btmon: Add dedicate sections for timestamp and frame number Luiz Augusto von Dentz
2026-02-20 17:31 ` [PATCH BlueZ v2 03/12] doc/btmon: Add connection tracking section Luiz Augusto von Dentz
@ 2026-02-20 17:31 ` Luiz Augusto von Dentz
2026-02-20 17:31 ` [PATCH BlueZ v2 05/12] doc/btmon: Add a section for automated trace analysis Luiz Augusto von Dentz
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2026-02-20 17:31 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds a dedicated section for analyze mode.
---
doc/btmon.rst | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/doc/btmon.rst b/doc/btmon.rst
index d93aa34a9412..66a97859a49e 100644
--- a/doc/btmon.rst
+++ b/doc/btmon.rst
@@ -672,6 +672,43 @@ Bluetooth Core Specification, Volume 1, Part F. btmon decodes all
of them automatically in ``Status:`` and ``Reason:`` fields. The
source mapping is in ``monitor/packet.c`` (``error2str_table``).
+ANALYZE MODE
+============
+
+The ``-a`` (``--analyze``) option reads a btsnoop file and produces a
+statistical summary instead of the full decoded trace.
+
+Usage
+-----
+
+.. code-block::
+
+ $ btmon -a hcidump.log
+
+Output Contents
+---------------
+
+Analyze mode reports, for each controller found in the trace:
+
+- **Packet counts**: Total HCI packets broken down by type (commands,
+ events, ACL, SCO, ISO, vendor diagnostics, system notes, user
+ logs, control messages).
+
+- **Per-connection statistics**: For each connection handle found:
+
+ - Connection type (BR-ACL, LE-ACL, BR-SCO, BR-ESCO, LE-ISO)
+ - Device address
+ - TX and RX packet counts and completion counts
+ - Latency statistics (min, max, median) in milliseconds
+ - Packet size statistics (min, max, average) in octets
+ - Throughput estimate in Kb/s
+
+- **Per-channel statistics**: For each L2CAP channel within a
+ connection, the same packet/latency/size statistics.
+
+- **Latency plots**: If ``gnuplot`` is installed, ASCII-art latency
+ distribution plots are rendered in the terminal.
+
EXAMPLES
========
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH BlueZ v2 05/12] doc/btmon: Add a section for automated trace analysis
2026-02-20 17:31 [PATCH BlueZ v2 01/12] doc/btmon: Add missing documentation Luiz Augusto von Dentz
` (2 preceding siblings ...)
2026-02-20 17:31 ` [PATCH BlueZ v2 04/12] doc/btmon: Add a dedicated section for analyze mode Luiz Augusto von Dentz
@ 2026-02-20 17:31 ` Luiz Augusto von Dentz
2026-02-20 17:31 ` [PATCH BlueZ v2 06/12] doc: add btsnoop protocol manpage Luiz Augusto von Dentz
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2026-02-20 17:31 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds a section dedicated for automated trace analysis which can be
used for analysing traces programmatically or with use of AI assistance.
---
doc/btmon.rst | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
diff --git a/doc/btmon.rst b/doc/btmon.rst
index 66a97859a49e..70cdb90e37ab 100644
--- a/doc/btmon.rst
+++ b/doc/btmon.rst
@@ -740,6 +740,81 @@ Open the trace file with full date and time
$ btmon -T -r hcidump.log
+AUTOMATED TRACE ANALYSIS
+=========================
+
+This section provides guidance for analyzing btmon traces
+programmatically or with AI assistance.
+
+Recommended Workflow
+--------------------
+
+1. **Get an overview**: Start with ``btmon -a <file>`` to see packet
+ counts, connection handles, device addresses, and traffic volumes.
+
+2. **Decode with timestamps**: Use ``btmon -t -r <file> > output.txt``
+ to produce a text file with wall-clock timestamps for analysis.
+
+3. **Identify connections**: Search for connection establishment events
+ to build a handle-to-address mapping::
+
+ grep -n "Connection Complete\|Enhanced Connection Complete\|CIS Established" output.txt
+
+4. **Track disconnections**: Search for disconnect events and their
+ reasons::
+
+ grep -n "Disconnect Complete" output.txt
+
+ Then examine the lines following each match for the ``Reason:``
+ field.
+
+5. **Identify LE Audio**: Search for ASCS and CIS activity::
+
+ grep -n "ASE Control Point\|CIG Parameters\|Create Connected Isochronous\|CIS Established\|Setup ISO Data Path" output.txt
+
+6. **Check for errors**: Search for non-success status codes::
+
+ grep -n "Status:" output.txt | grep -v "Success"
+
+Key Patterns for Connection Lifecycle
+-------------------------------------
+
+A complete connection lifecycle for an LE ACL connection follows this
+pattern in the trace:
+
+1. ``LE Enhanced Connection Complete`` -- connection established,
+ note the Handle and Peer address
+2. ``LE Connection Update Complete`` -- connection parameters changed
+ (may occur zero or more times)
+3. ``Encryption Change`` -- link encrypted (may show encryption
+ algorithm)
+4. ACL Data with ATT/SMP/L2CAP -- service discovery and data exchange
+5. ``Disconnect Complete`` -- connection ended, check Reason field
+
+For LE Audio connections, additional steps appear between 3 and 5:
+
+- ATT operations on PACS/ASCS characteristics (codec negotiation)
+- ``LE Set CIG Parameters`` command and response
+- ``LE Create CIS`` command
+- ``LE CIS Established`` event (note the CIS handle)
+- ``LE Setup ISO Data Path`` command
+- ISO Data TX/RX (audio streaming)
+- ``Disconnect Complete`` on CIS handle (stream ended)
+- ``LE Remove CIG`` (group removed)
+
+Vendor-Specific Events
+----------------------
+
+Vendor-specific HCI events (event code 0xFF) contain
+controller-manufacturer diagnostic data. btmon decodes some vendor
+events for known manufacturers (Intel, Broadcom, etc.) but many
+sub-events show as ``Unknown`` with raw hex data. These are expected
+and generally not actionable without vendor documentation.
+
+Intel controllers emit extended telemetry events (subevent 0x8780)
+that include connection quality metrics, error counters, and firmware
+state. Partial decoding is available in ``monitor/intel.c``.
+
RESOURCES
=========
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH BlueZ v2 06/12] doc: add btsnoop protocol manpage
2026-02-20 17:31 [PATCH BlueZ v2 01/12] doc/btmon: Add missing documentation Luiz Augusto von Dentz
` (3 preceding siblings ...)
2026-02-20 17:31 ` [PATCH BlueZ v2 05/12] doc/btmon: Add a section for automated trace analysis Luiz Augusto von Dentz
@ 2026-02-20 17:31 ` Luiz Augusto von Dentz
2026-02-20 17:31 ` [PATCH BlueZ v2 07/12] doc/btmon: Add reference to btsnoop documention Luiz Augusto von Dentz
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2026-02-20 17:31 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Add manpage-style RST doc/btsnoop-protocol.rst and synchronize opcodes
with src/shared/btsnoop.h.
---
Makefile.am | 7 +-
doc/btsnoop-protocol.rst | 221 +++++++++++++++++++++++++++++++++++++++
doc/btsnoop.txt | 178 -------------------------------
3 files changed, 225 insertions(+), 181 deletions(-)
create mode 100644 doc/btsnoop-protocol.rst
delete mode 100644 doc/btsnoop.txt
diff --git a/Makefile.am b/Makefile.am
index 064ee91698e2..dee6aa6d0d9b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -367,7 +367,8 @@ CLEANFILES += $(builtin_files)
if MANPAGES
man_MANS += doc/bluetoothd.8
-man_MANS += doc/hci.7 doc/mgmt.7 doc/l2cap.7 doc/rfcomm.7 doc/sco.7 doc/iso.7
+man_MANS += doc/hci.7 doc/mgmt.7 doc/l2cap.7 doc/rfcomm.7 doc/sco.7 doc/iso.7 \
+ doc/btsnoop.7
man_MANS += doc/org.bluez.Adapter.5 doc/org.bluez.Device.5 \
doc/org.bluez.Bearer.LE.5 doc/org.bluez.Bearer.BREDR.5 \
doc/org.bluez.DeviceSet.5 doc/org.bluez.AgentManager.5 \
@@ -407,7 +408,7 @@ man_MANS += doc/org.bluez.ThermometerManager.5 \
endif
manual_pages += doc/bluetoothd.8
manual_pages += doc/hci.7 doc/mgmt.7 doc/l2cap.7 doc/rfcomm.7 doc/sco.7 \
- doc/iso.7
+ doc/iso.7 doc/btsnoop.7
manual_pages += doc/org.bluez.Adapter.5 doc/org.bluez.Device.5 \
doc/org.bluez.Bearer.LE.5 doc/org.bluez.Bearer.BREDR.5 \
doc/org.bluez.DeviceSet.5 doc/org.bluez.AgentManager.5 \
@@ -535,7 +536,7 @@ EXTRA_DIST += doc/org.bluez.ThermometerManager.rst \
EXTRA_DIST += doc/pics-opp.txt doc/pixit-opp.txt \
doc/pts-opp.txt
-EXTRA_DIST += doc/btsnoop.txt
+EXTRA_DIST += doc/btsnoop-protocol.rst
EXTRA_DIST += tools/magic.btsnoop
diff --git a/doc/btsnoop-protocol.rst b/doc/btsnoop-protocol.rst
new file mode 100644
index 000000000000..a875db63a9dd
--- /dev/null
+++ b/doc/btsnoop-protocol.rst
@@ -0,0 +1,221 @@
+=======
+btsnoop
+=======
+
+-------------------------------------------
+BTSnoop/Monitor protocol documentation
+-------------------------------------------
+
+:Version: BlueZ
+:Copyright: Free use of this software is granted under the terms of the GNU
+ Lesser General Public Licenses (LGPL).
+:Date: February 2026
+:Manual section: 7
+:Manual group: Linux System Administration
+
+SYNOPSIS
+========
+
+This document describes the BTSnoop/Monitor formats used to record and
+transport HCI/PHY traffic. The formats are used by tools such as btmon and the
+BlueZ btsnoop implementation.
+
+DESCRIPTION
+===========
+
+Opcode definitions
+------------------
+
+The following opcodes are used by the BTSnoop/Monitor formats. The numeric
+values match the definitions in ``src/shared/btsnoop.h``.
+
+.. list-table:: BTSnoop opcodes
+ :header-rows: 1
+
+ * - Name
+ - Code (dec)
+ - Code (hex)
+ - Meaning
+ * - BTSNOOP_OPCODE_NEW_INDEX
+ - 0
+ - 0x0000
+ - New controller index (parameters: type, bus, bdaddr, name)
+ * - BTSNOOP_OPCODE_DEL_INDEX
+ - 1
+ - 0x0001
+ - Deleted controller index
+ * - BTSNOOP_OPCODE_COMMAND_PKT
+ - 2
+ - 0x0002
+ - HCI Command packet
+ * - BTSNOOP_OPCODE_EVENT_PKT
+ - 3
+ - 0x0003
+ - HCI Event packet
+ * - BTSNOOP_OPCODE_ACL_TX_PKT
+ - 4
+ - 0x0004
+ - Outgoing ACL packet
+ * - BTSNOOP_OPCODE_ACL_RX_PKT
+ - 5
+ - 0x0005
+ - Incoming ACL packet
+ * - BTSNOOP_OPCODE_SCO_TX_PKT
+ - 6
+ - 0x0006
+ - Outgoing SCO packet
+ * - BTSNOOP_OPCODE_SCO_RX_PKT
+ - 7
+ - 0x0007
+ - Incoming SCO packet
+ * - BTSNOOP_OPCODE_OPEN_INDEX
+ - 8
+ - 0x0008
+ - HCI transport for the specified controller opened
+ * - BTSNOOP_OPCODE_CLOSE_INDEX
+ - 9
+ - 0x0009
+ - HCI transport for the specified controller closed
+ * - BTSNOOP_OPCODE_INDEX_INFO
+ - 10
+ - 0x000a
+ - Index information (parameters: bdaddr, manufacturer)
+ * - BTSNOOP_OPCODE_VENDOR_DIAG
+ - 11
+ - 0x000b
+ - Vendor diagnostic information
+ * - BTSNOOP_OPCODE_SYSTEM_NOTE
+ - 12
+ - 0x000c
+ - System note
+ * - BTSNOOP_OPCODE_USER_LOGGING
+ - 13
+ - 0x000d
+ - User logging (parameters: priority, ident_len, ident)
+ * - BTSNOOP_OPCODE_CTRL_OPEN
+ - 14
+ - 0x000e
+ - Control channel opened
+ * - BTSNOOP_OPCODE_CTRL_CLOSE
+ - 15
+ - 0x000f
+ - Control channel closed
+ * - BTSNOOP_OPCODE_CTRL_COMMAND
+ - 16
+ - 0x0010
+ - Control command packet
+ * - BTSNOOP_OPCODE_CTRL_EVENT
+ - 17
+ - 0x0011
+ - Control event packet
+ * - BTSNOOP_OPCODE_ISO_TX_PKT
+ - 18
+ - 0x0012
+ - Outgoing ISO packet
+ * - BTSNOOP_OPCODE_ISO_RX_PKT
+ - 19
+ - 0x0013
+ - Incoming ISO packet
+
+New Index
+---------
+
+Code: 0x0000
+
+Parameters:
+
+- Type (1 octet)
+- Bus (1 octet)
+- BD_Addr (6 octets)
+- Name (8 octets)
+
+This opcode indicates that a new controller instance with a given index was
+added. With some transports (for example a single TTY device) the index is
+implicitly 0.
+
+Deleted Index
+-------------
+
+Code: 0x0001
+
+Indicates that the controller with a specific index was removed.
+
+TTY-based protocol
+------------------
+
+The TTY protocol used by btmon with the ``--tty`` option is a little-endian
+packet format. Each packet uses this header::
+
+ struct tty_hdr {
+ uint16_t data_len;
+ uint16_t opcode;
+ uint8_t flags;
+ uint8_t hdr_len;
+ uint8_t ext_hdr[0];
+ } __attribute__ ((packed));
+
+The payload starts at ``ext_hdr + hdr_len`` and has length
+``data_len - 4 - hdr_len``.
+
+Extended header format
+----------------------
+
+Each extension field is encoded as::
+
+ struct {
+ uint8_t type;
+ uint8_t value[length];
+ };
+
+Defined types:
+
+.. list-table:: Extended header types
+ :header-rows: 1
+
+ * - Type
+ - Length
+ - Meaning
+ * - 1
+ - 1 byte
+ - Command drops (dropped HCI command packets)
+ * - 2
+ - 1 byte
+ - Event drops (dropped HCI event packets)
+ * - 3
+ - 1 byte
+ - ACL TX drops
+ * - 4
+ - 1 byte
+ - ACL RX drops
+ * - 5
+ - 1 byte
+ - SCO TX drops
+ * - 6
+ - 1 byte
+ - SCO RX drops
+ * - 7
+ - 1 byte
+ - Other drops
+ * - 8
+ - 4 bytes
+ - 32-bit timestamp (1/10th ms)
+
+The drops fields contain the number of packets the implementation had to drop
+since the last reported drop count. Extension fields must be sorted by
+increasing ``type`` so unknown types can be skipped and the payload location
+discovered.
+
+RESOURCES
+=========
+
+http://www.bluez.org
+
+REPORTING BUGS
+==============
+
+linux-bluetooth@vger.kernel.org
+
+SEE ALSO
+========
+
+btmon(1)
diff --git a/doc/btsnoop.txt b/doc/btsnoop.txt
deleted file mode 100644
index 975a53f6dd44..000000000000
--- a/doc/btsnoop.txt
+++ /dev/null
@@ -1,178 +0,0 @@
-BTSnoop/Monitor protocol formats
-********************************
-
-Opcode definitions
-==================
-
-New Index
----------
-
- Code: 0x0000
- Parameters: Type (1 Octet
- Bus (1 Octet)
- BD_Addr (6 Octets)
- Name (8 Octets)
-
- This opcode indicates that a new controller instance with a
- given index was added. With some protocols, like the TTY-based
- one there is only a single supported controller, meaning the
- index is implicitly 0.
-
-Deleted Index
--------------
-
- Code: 0x0001
-
- This opcode indicates that the controller with a specific index
- was removed.
-
-Command Packet
---------------
-
- Code: 0x0002
-
- HCI command packet.
-
-Event Packet
-------------
-
- Code: 0x0003
-
- HCI event packet.
-
-ACL TX Packet
--------------
-
- Code: 0x0004
-
- Outgoing ACL packet.
-
-ACL RX Packet
--------------
-
- Code: 0x0005
-
- Incoming ACL packet.
-
-SCO TX Packet
---------------
-
- Code: 0x0006
-
- Outgoing SCO packet.
-
-SCO RX Packet
--------------
-
- Code: 0x0007
-
- Incomnig SCO packet.
-
-Open Index
-----------
-
- Code: 0x0008
-
- The HCI transport for the specified controller has been opened.
-
-Close Index
------------
-
- Code: 0x0009
-
- The HCI transport for the specified controller has been closed.
-
-Index Information
------------------
-
- Code: 0x000a
- Parameters: BD_Addr (6 Octets)
- Manufacturer (2 Octets)
-
- Information about a specific controller.
-
-Vendor Diagnostics
-------------------
-
- Code: 0x000b
-
- Vendor diagnostic information.
-
-System Note
------------
-
- Code: 0x000c
-
- System note.
-
-User Logging
-------------
-
- Code: 0x000d
- Parameters: Priority (1 Octet)
- Ident_Length (1 Octet)
- Ident (Ident_Length Octets)
-
- User logging information.
-
-
-TTY-based protocol
-==================
-
-This section covers the protocol that can be parsed by btmon when
-passing it the --tty parameter. The protocol is little endian, packet
-based, and has the following header for each packet:
-
-struct tty_hdr {
- uint16_t data_len;
- uint16_t opcode;
- uint8_t flags;
- uint8_t hdr_len;
- uint8_t ext_hdr[0];
-} __attribute__ ((packed));
-
-The actual payload starts at ext_hdr + hdr_len and has the length of
-data_len - 4 - hdr_len. Each field of the header is defined as follows:
-
-data_len:
- This is the total length of the entire packet, excuding the
- data_len field itself.
-
-opcode:
- The BTSnoop opcode
-
-flags:
- Special flags for the packet. Currently no flags are defined.
-
-hdr_len:
- Length of the extended header.
-
-ext_hdr:
- This is a sequence of header extension fields formatted as:
-
- struct {
- uint8_t type;
- uint8_t value[length];
- }
-
- The length of the value is dependent on the type. Currently the
- following types are defined:
-
- Type Length Meaning
- ----------------------------------------------------------------
- 1 Command drops 1 byte Dropped HCI command packets
- 2 Event drops 1 byte Dropped HCI event packets
- 3 ACL TX drops 1 byte Dropped ACL TX packets
- 4 ACL RX drops 1 byte Dropped ACL RX packets
- 5 SCO TX drops 1 byte Dropped SCO TX packets
- 6 SCO RX drops 1 byte Dropped SCO RX packets
- 7 Other drops 1 byte Dropped other packets
- 8 32-bit timestamp 4 bytes Timestamp in 1/10th ms
-
- The drops fields indicate the number of packets that the
- implementation had to drop (e.g. due to lack of buffers) since
- the last reported drop count.
-
- The fields of the extended header must be sorted by increasing
- type. This is essential so that unknown types can be ignored and
- the parser can jump to processing the payload.
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH BlueZ v2 07/12] doc/btmon: Add reference to btsnoop documention
2026-02-20 17:31 [PATCH BlueZ v2 01/12] doc/btmon: Add missing documentation Luiz Augusto von Dentz
` (4 preceding siblings ...)
2026-02-20 17:31 ` [PATCH BlueZ v2 06/12] doc: add btsnoop protocol manpage Luiz Augusto von Dentz
@ 2026-02-20 17:31 ` Luiz Augusto von Dentz
2026-02-20 17:31 ` [PATCH BlueZ v2 08/12] monitor: Annotate ACL/SCO/ISO data with device address Luiz Augusto von Dentz
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2026-02-20 17:31 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds SEE ALSO section mentioning btsnoop documentation.
---
doc/btmon.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/doc/btmon.rst b/doc/btmon.rst
index 70cdb90e37ab..c1616318a004 100644
--- a/doc/btmon.rst
+++ b/doc/btmon.rst
@@ -824,3 +824,8 @@ REPORTING BUGS
==============
linux-bluetooth@vger.kernel.org
+
+SEE ALSO
+========
+
+btsnoop(7)
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH BlueZ v2 08/12] monitor: Annotate ACL/SCO/ISO data with device address
2026-02-20 17:31 [PATCH BlueZ v2 01/12] doc/btmon: Add missing documentation Luiz Augusto von Dentz
` (5 preceding siblings ...)
2026-02-20 17:31 ` [PATCH BlueZ v2 07/12] doc/btmon: Add reference to btsnoop documention Luiz Augusto von Dentz
@ 2026-02-20 17:31 ` Luiz Augusto von Dentz
2026-02-20 17:31 ` [PATCH BlueZ v2 09/12] monitor: Print connection type in Disconnect Complete Luiz Augusto von Dentz
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2026-02-20 17:31 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Add the remote device address to ACL, SCO and ISO data packet output
so each data packet line shows which device it belongs to. This makes
it much easier to follow multi-device traces without having to
cross-reference handle numbers with earlier connection events:
< ACL Data TX: Handle 2048 [1/6] [42:96:D7:49:78:CC (Resolvable)] flags 0x00 dlen 7
ATT: Exchange MTU Request (0x02) len 2
Client RX MTU: 527
> ACL Data RX: Handle 256 [20:32:C6:09:FF:6C (Apple, Inc.)] flags 0x02 dlen 16
L2CAP: Connection Response (0x03) ident 33 len 8
Destination CID: 17169
Source CID: 64
Result: Connection successful (0x0000)
Status: No further information available (0x0000)
Also fix the connection lookup in packet_hci_acldata() to use
acl_handle() to mask off the flags bits, matching what assign_handle()
stores.
---
monitor/packet.c | 92 +++++++++++++++++++++++++++++++++++++++++++++---
monitor/packet.h | 4 +++
2 files changed, 92 insertions(+), 4 deletions(-)
diff --git a/monitor/packet.c b/monitor/packet.c
index 3ba33f8f3afa..b8a48bb549af 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -322,6 +322,43 @@ static void assign_handle(uint16_t index, uint16_t handle, uint8_t type,
memcpy(conn->dst, dst, sizeof(conn->dst));
conn->dst_type = dst_type;
}
+
+ switch (conn->dst_type) {
+ case 0x00:
+ case 0x02:
+ /* If address public set dst_oui */
+ hwdb_get_company(conn->dst, &conn->dst_oui);
+ break;
+ case 0x01:
+ case 0x03:
+ /* Attempt to resolve the identity if resolvable */
+ if ((conn->dst[5] & 0xc0) == 0x40) {
+ keys_resolve_identity(conn->dst, conn->dst,
+ &conn->dst_type);
+ /* If identity address is public set dst_out */
+ if (conn->dst_type == 0x00 || conn->dst_type == 0x02) {
+ hwdb_get_company(conn->dst, &conn->dst_oui);
+ break;
+ }
+ }
+
+ /* Set the random type */
+ switch ((conn->dst[5] & 0xc0) >> 6) {
+ case 0x00:
+ conn->dst_rtype = strdup("Non-Resolvable");
+ break;
+ case 0x01:
+ conn->dst_rtype = strdup("Resolvable");
+ break;
+ case 0x03:
+ conn->dst_rtype = strdup("Static");
+ break;
+ default:
+ conn->dst_rtype = strdup("Reserved");
+ break;
+ }
+ break;
+ }
}
struct packet_conn_data *packet_get_conn_data(uint16_t handle)
@@ -329,7 +366,7 @@ struct packet_conn_data *packet_get_conn_data(uint16_t handle)
int i;
for (i = 0; i < MAX_CONN; i++) {
- if (conn_list[i].handle == handle)
+ if (conn_list[i].handle == acl_handle(handle))
return &conn_list[i];
}
@@ -14047,6 +14084,43 @@ static void packet_enqueue_tx(struct timeval *tv, uint16_t handle,
queue_push_tail(conn->tx_q, frame);
}
+static void handle_str_append_addr(char *handle_str,
+ struct packet_conn_data *conn)
+{
+ if (!conn)
+ return;
+
+ switch (conn->dst_type) {
+ case 0x00:
+ case 0x02:
+ if (conn->dst_oui) {
+ sprintf(handle_str + strlen(handle_str),
+ " [%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X (%.16s)]",
+ conn->dst[5], conn->dst[4], conn->dst[3],
+ conn->dst[2], conn->dst[1], conn->dst[0],
+ conn->dst_oui);
+ return;
+ }
+ break;
+ case 0x01:
+ case 0x03:
+ if (conn->dst_rtype) {
+ sprintf(handle_str + strlen(handle_str),
+ " [%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X (%.16s)]",
+ conn->dst[5], conn->dst[4], conn->dst[3],
+ conn->dst[2], conn->dst[1], conn->dst[0],
+ conn->dst_rtype);
+ return;
+ }
+ break;
+ }
+
+ sprintf(handle_str + strlen(handle_str),
+ " [%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X]",
+ conn->dst[5], conn->dst[4], conn->dst[3],
+ conn->dst[2], conn->dst[1], conn->dst[0]);
+}
+
void packet_hci_acldata(struct timeval *tv, struct ucred *cred, uint16_t index,
bool in, const void *data, uint16_t size)
{
@@ -14054,7 +14128,7 @@ void packet_hci_acldata(struct timeval *tv, struct ucred *cred, uint16_t index,
uint16_t handle = le16_to_cpu(hdr->handle);
uint16_t dlen = le16_to_cpu(hdr->dlen);
uint8_t flags = acl_flags(handle);
- char handle_str[22], extra_str[32];
+ char handle_str[58], extra_str[32];
struct packet_conn_data *conn;
struct index_buf_pool *pool = &index_list[index].acl;
@@ -14089,6 +14163,8 @@ void packet_hci_acldata(struct timeval *tv, struct ucred *cred, uint16_t index,
else
sprintf(handle_str, "Handle %d", acl_handle(handle));
+ handle_str_append_addr(handle_str, conn);
+
sprintf(extra_str, "flags 0x%2.2x dlen %d", flags, dlen);
print_packet(tv, cred, in ? '>' : '<', index, NULL, COLOR_HCI_ACLDATA,
@@ -14118,7 +14194,8 @@ void packet_hci_scodata(struct timeval *tv, struct ucred *cred, uint16_t index,
const hci_sco_hdr *hdr = data;
uint16_t handle = le16_to_cpu(hdr->handle);
uint8_t flags = acl_flags(handle);
- char handle_str[22], extra_str[32];
+ char handle_str[42], extra_str[32];
+ struct packet_conn_data *conn;
if (index >= MAX_INDEX) {
print_field("Invalid index (%d).", index);
@@ -14140,6 +14217,7 @@ void packet_hci_scodata(struct timeval *tv, struct ucred *cred, uint16_t index,
data += HCI_SCO_HDR_SIZE;
size -= HCI_SCO_HDR_SIZE;
+ conn = packet_get_conn_data(handle);
if (index_list[index].sco.total && !in)
sprintf(handle_str, "Handle %d [%u/%u]", acl_handle(handle),
@@ -14147,6 +14225,8 @@ void packet_hci_scodata(struct timeval *tv, struct ucred *cred, uint16_t index,
else
sprintf(handle_str, "Handle %d", acl_handle(handle));
+ handle_str_append_addr(handle_str, conn);
+
sprintf(extra_str, "flags 0x%2.2x dlen %d", flags, hdr->dlen);
print_packet(tv, cred, in ? '>' : '<', index, NULL, COLOR_HCI_SCODATA,
@@ -14175,8 +14255,9 @@ void packet_hci_isodata(struct timeval *tv, struct ucred *cred, uint16_t index,
const struct bt_hci_iso_data_start *start;
uint16_t handle = le16_to_cpu(hdr->handle);
uint8_t flags = acl_flags(handle);
- char handle_str[36], extra_str[50], ts_str[16] = { 0 };
+ char handle_str[56], extra_str[50], ts_str[16] = { 0 };
struct index_buf_pool *pool = &index_list[index].iso;
+ struct packet_conn_data *conn;
size_t ts_size = 0;
if (index >= MAX_INDEX) {
@@ -14206,6 +14287,7 @@ void packet_hci_isodata(struct timeval *tv, struct ucred *cred, uint16_t index,
}
start = data;
+ conn = packet_get_conn_data(handle);
if (!in && pool->total)
sprintf(handle_str, "Handle %d [%u/%u] SN %u",
@@ -14214,6 +14296,8 @@ void packet_hci_isodata(struct timeval *tv, struct ucred *cred, uint16_t index,
sprintf(handle_str, "Handle %u SN %u", acl_handle(handle),
start->sn);
+ handle_str_append_addr(handle_str, conn);
+
sprintf(extra_str, "flags 0x%2.2x dlen %u slen %u%s", flags, hdr->dlen,
start->slen, ts_str);
diff --git a/monitor/packet.h b/monitor/packet.h
index 2990b795bd3e..f6547ec9b594 100644
--- a/monitor/packet.h
+++ b/monitor/packet.h
@@ -47,6 +47,10 @@ struct packet_conn_data {
uint8_t type;
uint8_t dst[6];
uint8_t dst_type;
+ union {
+ char *dst_oui;
+ char *dst_rtype;
+ };
struct queue *tx_q;
struct queue *chan_q;
struct packet_latency tx_l;
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH BlueZ v2 09/12] monitor: Print connection type in Disconnect Complete
2026-02-20 17:31 [PATCH BlueZ v2 01/12] doc/btmon: Add missing documentation Luiz Augusto von Dentz
` (6 preceding siblings ...)
2026-02-20 17:31 ` [PATCH BlueZ v2 08/12] monitor: Annotate ACL/SCO/ISO data with device address Luiz Augusto von Dentz
@ 2026-02-20 17:31 ` Luiz Augusto von Dentz
2026-02-20 17:31 ` [PATCH BlueZ v2 10/12] monitor: Add connection lifecycle to analyze summary Luiz Augusto von Dentz
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2026-02-20 17:31 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Print the connection type (BR-ACL, LE-ACL, BR-SCO, BR-ESCO, LE-CIS,
LE-BIS) alongside the handle in Disconnect Complete events so the type
of link being torn down is immediately visible without cross-referencing
earlier connection events:
> HCI Event: Disconnect Complete (0x05) plen 4
Status: Success (0x00)
Handle: 2050 (LE-ACL) Address: 6A:59:B2:90:5E:AB (Resolvable)
Reason: Remote User Terminated Connection (0x13)
> HCI Event: Disconnect Complete (0x05) plen 4
Status: Success (0x00)
Handle: 2304 (LE-CIS) Address: 65:0D:7B:2F:D6:E7 (Resolvable)
Reason: Connection Terminated By Local Host (0x16)
---
monitor/analyze.c | 53 +++++++++++++++++++++++-------------------
monitor/packet.c | 59 ++++++++++++++++++++++++++++++++++-------------
monitor/packet.h | 9 ++++++++
3 files changed, 81 insertions(+), 40 deletions(-)
diff --git a/monitor/analyze.c b/monitor/analyze.c
index 268ea10e29e6..2cf42f903b61 100644
--- a/monitor/analyze.c
+++ b/monitor/analyze.c
@@ -53,12 +53,6 @@ struct hci_dev {
struct queue *conn_list;
};
-#define CONN_BR_ACL 0x01
-#define CONN_BR_SCO 0x02
-#define CONN_BR_ESCO 0x03
-#define CONN_LE_ACL 0x04
-#define CONN_LE_ISO 0x05
-
struct hci_stats {
size_t bytes;
size_t num;
@@ -223,20 +217,23 @@ static void conn_destroy(void *data)
const char *str;
switch (conn->type) {
- case CONN_BR_ACL:
+ case BTMON_CONN_ACL:
str = "BR-ACL";
break;
- case CONN_BR_SCO:
+ case BTMON_CONN_LE:
str = "BR-SCO";
break;
- case CONN_BR_ESCO:
+ case BTMON_CONN_SCO:
str = "BR-ESCO";
break;
- case CONN_LE_ACL:
+ case BTMON_CONN_ESCO:
str = "LE-ACL";
break;
- case CONN_LE_ISO:
- str = "LE-ISO";
+ case BTMON_CONN_CIS:
+ str = "LE-CIS";
+ break;
+ case BTMON_CONN_BIS:
+ str = "LE-BIS";
break;
default:
str = "unknown";
@@ -476,7 +473,7 @@ static void evt_conn_complete(struct hci_dev *dev, struct timeval *tv,
if (evt->status)
return;
- conn = conn_lookup_type(dev, le16_to_cpu(evt->handle), CONN_BR_ACL);
+ conn = conn_lookup_type(dev, le16_to_cpu(evt->handle), BTMON_CONN_ACL);
if (!conn)
return;
@@ -567,7 +564,7 @@ static void evt_le_conn_complete(struct hci_dev *dev, struct timeval *tv,
if (!evt || evt->status)
return;
- conn = conn_lookup_type(dev, le16_to_cpu(evt->handle), CONN_LE_ACL);
+ conn = conn_lookup_type(dev, le16_to_cpu(evt->handle), BTMON_CONN_LE);
if (!conn)
return;
@@ -585,7 +582,7 @@ static void evt_le_enh_conn_complete(struct hci_dev *dev, struct timeval *tv,
if (!evt || evt->status)
return;
- conn = conn_lookup_type(dev, le16_to_cpu(evt->handle), CONN_LE_ACL);
+ conn = conn_lookup_type(dev, le16_to_cpu(evt->handle), BTMON_CONN_LE);
if (!conn)
return;
@@ -670,7 +667,7 @@ static void evt_le_cis_established(struct hci_dev *dev, struct timeval *tv,
return;
conn = conn_lookup_type(dev, le16_to_cpu(evt->conn_handle),
- CONN_LE_ISO);
+ BTMON_CONN_CIS);
if (!conn)
return;
@@ -715,7 +712,7 @@ static void evt_le_big_complete(struct hci_dev *dev, struct timeval *tv,
if (!util_iov_pull_le16(iov, &handle))
return;
- conn = conn_lookup_type(dev, handle, CONN_LE_ISO);
+ conn = conn_lookup_type(dev, handle, BTMON_CONN_BIS);
if (conn)
conn->setup_seen = true;
}
@@ -738,7 +735,7 @@ static void evt_le_big_sync_established(struct hci_dev *dev, struct timeval *tv,
if (!util_iov_pull_le16(iov, &handle))
return;
- conn = conn_lookup_type(dev, handle, CONN_LE_ISO);
+ conn = conn_lookup_type(dev, handle, BTMON_CONN_BIS);
if (conn)
conn->setup_seen = true;
}
@@ -928,9 +925,13 @@ static void sco_pkt(struct timeval *tv, uint16_t index, bool out,
dev->num_sco++;
conn = conn_lookup_type(dev, le16_to_cpu(hdr->handle) & 0x0fff,
- CONN_BR_SCO);
- if (!conn)
- return;
+ BTMON_CONN_SCO);
+ if (!conn) {
+ conn = conn_lookup_type(dev, le16_to_cpu(hdr->handle) & 0x0fff,
+ BTMON_CONN_ESCO);
+ if (!conn)
+ return;
+ }
if (out) {
conn_pkt_tx(conn, tv, size - sizeof(*hdr), NULL);
@@ -1015,9 +1016,13 @@ static void iso_pkt(struct timeval *tv, uint16_t index, bool out,
dev->num_iso++;
conn = conn_lookup_type(dev, le16_to_cpu(hdr->handle) & 0x0fff,
- CONN_LE_ISO);
- if (!conn)
- return;
+ BTMON_CONN_CIS);
+ if (!conn) {
+ conn = conn_lookup_type(dev, le16_to_cpu(hdr->handle) & 0x0fff,
+ BTMON_CONN_BIS);
+ if (!conn)
+ return;
+ }
if (out) {
conn_pkt_tx(conn, tv, size - sizeof(*hdr), NULL);
diff --git a/monitor/packet.c b/monitor/packet.c
index b8a48bb549af..a4930c855144 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -221,22 +221,24 @@ static struct index_buf_pool *get_pool(uint16_t index, uint8_t type)
return NULL;
switch (type) {
- case 0x00:
+ case BTMON_CONN_ACL:
if (index_list[index].acl.total)
return &index_list[index].acl;
break;
- case 0x01:
+ case BTMON_CONN_LE:
if (index_list[index].le.total)
return &index_list[index].le;
break;
- case 0x05:
- if (index_list[index].iso.total)
- return &index_list[index].iso;
- break;
- default:
+ case BTMON_CONN_SCO:
+ case BTMON_CONN_ESCO:
if (index_list[index].sco.total)
return &index_list[index].sco;
break;
+ case BTMON_CONN_CIS:
+ case BTMON_CONN_BIS:
+ if (index_list[index].iso.total)
+ return &index_list[index].iso;
+ break;
}
return NULL;
@@ -922,10 +924,30 @@ static void print_lt_addr(uint8_t lt_addr)
print_field("LT address: %d", lt_addr);
}
+static const char *conn_type_str(uint8_t type)
+{
+ switch (type) {
+ case BTMON_CONN_ACL:
+ return "BR-ACL";
+ case BTMON_CONN_LE:
+ return "LE-ACL";
+ case BTMON_CONN_SCO:
+ return "BR-SCO";
+ case BTMON_CONN_ESCO:
+ return "BR-ESCO";
+ case BTMON_CONN_CIS:
+ return "LE-CIS";
+ case BTMON_CONN_BIS:
+ return "LE-BIS";
+ default:
+ return "unknown";
+ }
+}
+
static void print_handle_native(uint16_t handle)
{
struct packet_conn_data *conn;
- char label[25];
+ char label[32];
conn = packet_get_conn_data(handle);
if (!conn) {
@@ -933,7 +955,8 @@ static void print_handle_native(uint16_t handle)
return;
}
- sprintf(label, "Handle: %d Address", handle);
+ sprintf(label, "Handle: %d (%s) Address", handle,
+ conn_type_str(conn->type));
print_addr(label, conn->dst, conn->dst_type);
}
@@ -10996,7 +11019,7 @@ static void conn_complete_evt(struct timeval *tv, uint16_t index,
print_enable("Encryption", evt->encr_mode);
if (evt->status == 0x00)
- assign_handle(index, le16_to_cpu(evt->handle), 0x00,
+ assign_handle(index, le16_to_cpu(evt->handle), BTMON_CONN_ACL,
(void *)evt->bdaddr, BDADDR_BREDR);
}
@@ -11583,7 +11606,9 @@ static void sync_conn_complete_evt(struct timeval *tv, uint16_t index,
print_air_mode(evt->air_mode);
if (evt->status == 0x00)
- assign_handle(index, le16_to_cpu(evt->handle), evt->link_type,
+ assign_handle(index, le16_to_cpu(evt->handle),
+ evt->link_type ? BTMON_CONN_ESCO :
+ BTMON_CONN_SCO,
(void *)evt->bdaddr, BDADDR_BREDR);
}
@@ -12014,7 +12039,7 @@ static void le_conn_complete_evt(struct timeval *tv, uint16_t index,
print_field("Central clock accuracy: 0x%2.2x", evt->clock_accuracy);
if (evt->status == 0x00)
- assign_handle(index, le16_to_cpu(evt->handle), 0x01,
+ assign_handle(index, le16_to_cpu(evt->handle), BTMON_CONN_LE,
(void *)evt->peer_addr, evt->peer_addr_type);
}
@@ -12145,7 +12170,7 @@ static void le_enhanced_conn_complete_evt(struct timeval *tv, uint16_t index,
print_field("Central clock accuracy: 0x%2.2x", evt->clock_accuracy);
if (evt->status == 0x00)
- assign_handle(index, le16_to_cpu(evt->handle), 0x01,
+ assign_handle(index, le16_to_cpu(evt->handle), BTMON_CONN_LE,
(void *)evt->peer_addr, evt->peer_addr_type);
}
@@ -12545,7 +12570,8 @@ static void le_cis_established_evt(struct timeval *tv, uint16_t index,
print_slot_125("ISO Interval", evt->interval);
if (!evt->status)
- assign_handle(index, le16_to_cpu(evt->conn_handle), 0x05,
+ assign_handle(index, le16_to_cpu(evt->conn_handle),
+ BTMON_CONN_CIS,
NULL, BDADDR_LE_PUBLIC);
}
@@ -12596,7 +12622,8 @@ static void le_big_complete_evt(struct timeval *tv, uint16_t index,
for (i = 0; i < evt->num_bis; i++)
assign_handle(index, le16_to_cpu(evt->bis_handle[i]),
- 0x05, NULL, BDADDR_LE_PUBLIC);
+ BTMON_CONN_BIS, NULL,
+ BDADDR_LE_PUBLIC);
}
}
@@ -12631,7 +12658,7 @@ static void le_big_sync_estabilished_evt(struct timeval *tv, uint16_t index,
for (i = 0; i < evt->num_bis; i++)
assign_handle(index, le16_to_cpu(evt->bis[i]),
- 0x05, NULL, BDADDR_LE_PUBLIC);
+ BTMON_CONN_BIS, NULL, BDADDR_LE_PUBLIC);
}
}
diff --git a/monitor/packet.h b/monitor/packet.h
index f6547ec9b594..38f3f5514dba 100644
--- a/monitor/packet.h
+++ b/monitor/packet.h
@@ -39,6 +39,15 @@ struct packet_frame {
size_t len;
};
+enum {
+ BTMON_CONN_ACL = 0x00,
+ BTMON_CONN_LE,
+ BTMON_CONN_SCO,
+ BTMON_CONN_ESCO,
+ BTMON_CONN_CIS,
+ BTMON_CONN_BIS
+};
+
struct packet_conn_data {
uint16_t index;
uint8_t src[6];
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH BlueZ v2 10/12] monitor: Add connection lifecycle to analyze summary
2026-02-20 17:31 [PATCH BlueZ v2 01/12] doc/btmon: Add missing documentation Luiz Augusto von Dentz
` (7 preceding siblings ...)
2026-02-20 17:31 ` [PATCH BlueZ v2 09/12] monitor: Print connection type in Disconnect Complete Luiz Augusto von Dentz
@ 2026-02-20 17:31 ` Luiz Augusto von Dentz
2026-02-20 17:31 ` [PATCH BlueZ v2 11/12] monitor: Prefix data packets with proper type Luiz Augusto von Dentz
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2026-02-20 17:31 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Record the frame number at connection and disconnection time for each
connection. Print the connected and disconnected frame numbers in the
per-connection summary produced by analyze mode so that users can
cross-reference with the btmon trace output:
Found LE-ACL connection with handle 2051
Address: 66:B0:26:F1:D3:BC (Resolvable)
RX packets: 48/48
RX Latency: 1-7604 msec (~74 msec)
RX size: 5-51 octets (~13 octets)
RX speed: ~0 Kb/s
TX packets: 39/37
TX Latency: 12-426 msec (~43 msec)
TX size: 5-97 octets (~15 octets)
TX speed: ~1 Kb/s
Connected: #52044
Disconnected: #53069
Disconnect Reason: 0x08
Also fix the TODO in conn_destroy() that was passing a hardcoded 0x00
address type by using the stored bdaddr_type from the LE connection
complete events.
---
monitor/analyze.c | 73 ++++++++++++++++++++++++++++++++++++++---------
1 file changed, 59 insertions(+), 14 deletions(-)
diff --git a/monitor/analyze.c b/monitor/analyze.c
index 2cf42f903b61..1db1e7898132 100644
--- a/monitor/analyze.c
+++ b/monitor/analyze.c
@@ -68,8 +68,12 @@ struct hci_conn {
uint16_t link;
uint8_t type;
uint8_t bdaddr[6];
+ uint8_t bdaddr_type;
bool setup_seen;
bool terminated;
+ uint8_t disconnect_reason;
+ unsigned long frame_connected;
+ unsigned long frame_disconnected;
struct queue *tx_queue;
struct timeval last_rx;
struct queue *chan_list;
@@ -241,13 +245,22 @@ static void conn_destroy(void *data)
}
printf(" Found %s connection with handle %u\n", str, conn->handle);
- /* TODO: Store address type */
- packet_print_addr("Address", conn->bdaddr, 0x00);
+ packet_print_addr("Address", conn->bdaddr, conn->bdaddr_type);
if (!conn->setup_seen)
print_field("Connection setup missing");
print_stats(&conn->rx, "RX");
print_stats(&conn->tx, "TX");
+ if (conn->setup_seen) {
+ print_field("Connected: #%lu", conn->frame_connected);
+ if (conn->terminated) {
+ print_field("Disconnected: #%lu",
+ conn->frame_disconnected);
+ print_field("Disconnect Reason: 0x%02x",
+ conn->disconnect_reason);
+ }
+ }
+
queue_destroy(conn->rx.plot, free);
queue_destroy(conn->tx.plot, free);
queue_destroy(conn->chan_list, chan_destroy);
@@ -465,6 +478,7 @@ static void command_pkt(struct timeval *tv, uint16_t index,
}
static void evt_conn_complete(struct hci_dev *dev, struct timeval *tv,
+ unsigned long frame,
const void *data, uint16_t size)
{
const struct bt_hci_evt_conn_complete *evt = data;
@@ -478,10 +492,12 @@ static void evt_conn_complete(struct hci_dev *dev, struct timeval *tv,
return;
memcpy(conn->bdaddr, evt->bdaddr, 6);
+ conn->frame_connected = frame;
conn->setup_seen = true;
}
static void evt_disconnect_complete(struct hci_dev *dev, struct timeval *tv,
+ unsigned long frame,
const void *data, uint16_t size)
{
const struct bt_hci_evt_disconnect_complete *evt = data;
@@ -494,6 +510,8 @@ static void evt_disconnect_complete(struct hci_dev *dev, struct timeval *tv,
if (!conn)
return;
+ conn->frame_disconnected = frame;
+ conn->disconnect_reason = evt->reason;
conn->terminated = true;
}
@@ -555,6 +573,7 @@ static void plot_add(struct queue *queue, struct timeval *latency,
}
static void evt_le_conn_complete(struct hci_dev *dev, struct timeval *tv,
+ unsigned long frame,
struct iovec *iov)
{
const struct bt_hci_evt_le_conn_complete *evt;
@@ -569,10 +588,13 @@ static void evt_le_conn_complete(struct hci_dev *dev, struct timeval *tv,
return;
memcpy(conn->bdaddr, evt->peer_addr, 6);
+ conn->bdaddr_type = evt->peer_addr_type;
+ conn->frame_connected = frame;
conn->setup_seen = true;
}
static void evt_le_enh_conn_complete(struct hci_dev *dev, struct timeval *tv,
+ unsigned long frame,
struct iovec *iov)
{
const struct bt_hci_evt_le_enhanced_conn_complete *evt;
@@ -587,6 +609,8 @@ static void evt_le_enh_conn_complete(struct hci_dev *dev, struct timeval *tv,
return;
memcpy(conn->bdaddr, evt->peer_addr, 6);
+ conn->bdaddr_type = evt->peer_addr_type;
+ conn->frame_connected = frame;
conn->setup_seen = true;
}
@@ -640,6 +664,7 @@ static void evt_num_completed_packets(struct hci_dev *dev, struct timeval *tv,
}
static void evt_sync_conn_complete(struct hci_dev *dev, struct timeval *tv,
+ unsigned long frame,
const void *data, uint16_t size)
{
const struct bt_hci_evt_sync_conn_complete *evt = data;
@@ -653,10 +678,12 @@ static void evt_sync_conn_complete(struct hci_dev *dev, struct timeval *tv,
return;
memcpy(conn->bdaddr, evt->bdaddr, 6);
+ conn->frame_connected = frame;
conn->setup_seen = true;
}
static void evt_le_cis_established(struct hci_dev *dev, struct timeval *tv,
+ unsigned long frame,
struct iovec *iov)
{
const struct bt_hci_evt_le_cis_established *evt;
@@ -671,6 +698,7 @@ static void evt_le_cis_established(struct hci_dev *dev, struct timeval *tv,
if (!conn)
return;
+ conn->frame_connected = frame;
conn->setup_seen = true;
link = link_lookup(dev, conn->handle);
@@ -696,6 +724,7 @@ static void evt_le_cis_req(struct hci_dev *dev, struct timeval *tv,
}
static void evt_le_big_complete(struct hci_dev *dev, struct timeval *tv,
+ unsigned long frame,
struct iovec *iov)
{
const struct bt_hci_evt_le_big_complete *evt;
@@ -713,12 +742,15 @@ static void evt_le_big_complete(struct hci_dev *dev, struct timeval *tv,
return;
conn = conn_lookup_type(dev, handle, BTMON_CONN_BIS);
- if (conn)
+ if (conn) {
conn->setup_seen = true;
+ conn->frame_connected = frame;
+ }
}
}
static void evt_le_big_sync_established(struct hci_dev *dev, struct timeval *tv,
+ unsigned long frame,
struct iovec *iov)
{
const struct bt_hci_evt_le_big_sync_estabilished *evt;
@@ -736,12 +768,15 @@ static void evt_le_big_sync_established(struct hci_dev *dev, struct timeval *tv,
return;
conn = conn_lookup_type(dev, handle, BTMON_CONN_BIS);
- if (conn)
+ if (conn) {
conn->setup_seen = true;
+ conn->frame_connected = frame;
+ }
}
}
static void evt_le_meta_event(struct hci_dev *dev, struct timeval *tv,
+ unsigned long frame,
const void *data, uint16_t size)
{
struct iovec iov = {
@@ -755,27 +790,28 @@ static void evt_le_meta_event(struct hci_dev *dev, struct timeval *tv,
switch (subevt) {
case BT_HCI_EVT_LE_CONN_COMPLETE:
- evt_le_conn_complete(dev, tv, &iov);
+ evt_le_conn_complete(dev, tv, frame, &iov);
break;
case BT_HCI_EVT_LE_ENHANCED_CONN_COMPLETE:
- evt_le_enh_conn_complete(dev, tv, &iov);
+ evt_le_enh_conn_complete(dev, tv, frame, &iov);
break;
case BT_HCI_EVT_LE_CIS_ESTABLISHED:
- evt_le_cis_established(dev, tv, &iov);
+ evt_le_cis_established(dev, tv, frame, &iov);
break;
case BT_HCI_EVT_LE_CIS_REQ:
evt_le_cis_req(dev, tv, &iov);
break;
case BT_HCI_EVT_LE_BIG_COMPLETE:
- evt_le_big_complete(dev, tv, &iov);
+ evt_le_big_complete(dev, tv, frame, &iov);
break;
case BT_HCI_EVT_LE_BIG_SYNC_ESTABILISHED:
- evt_le_big_sync_established(dev, tv, &iov);
+ evt_le_big_sync_established(dev, tv, frame, &iov);
break;
}
}
static void event_pkt(struct timeval *tv, uint16_t index,
+ unsigned long frame,
const void *data, uint16_t size)
{
const struct bt_hci_evt_hdr *hdr = data;
@@ -793,10 +829,10 @@ static void event_pkt(struct timeval *tv, uint16_t index,
switch (hdr->evt) {
case BT_HCI_EVT_CONN_COMPLETE:
- evt_conn_complete(dev, tv, data, size);
+ evt_conn_complete(dev, tv, frame, data, size);
break;
case BT_HCI_EVT_DISCONNECT_COMPLETE:
- evt_disconnect_complete(dev, tv, data, size);
+ evt_disconnect_complete(dev, tv, frame, data, size);
break;
case BT_HCI_EVT_CMD_COMPLETE:
evt_cmd_complete(dev, tv, data, size);
@@ -805,10 +841,10 @@ static void event_pkt(struct timeval *tv, uint16_t index,
evt_num_completed_packets(dev, tv, data, size);
break;
case BT_HCI_EVT_SYNC_CONN_COMPLETE:
- evt_sync_conn_complete(dev, tv, data, size);
+ evt_sync_conn_complete(dev, tv, frame, data, size);
break;
case BT_HCI_EVT_LE_META_EVENT:
- evt_le_meta_event(dev, tv, data, size);
+ evt_le_meta_event(dev, tv, frame, data, size);
break;
}
}
@@ -1047,6 +1083,7 @@ void analyze_trace(const char *path)
{
struct btsnoop *btsnoop_file;
unsigned long num_packets = 0;
+ unsigned long num_frames = 0;
uint32_t format;
btsnoop_file = btsnoop_open(path, BTSNOOP_FLAG_PKLG_SUPPORT);
@@ -1084,21 +1121,27 @@ void analyze_trace(const char *path)
del_index(&tv, index, buf, pktlen);
break;
case BTSNOOP_OPCODE_COMMAND_PKT:
+ num_frames++;
command_pkt(&tv, index, buf, pktlen);
break;
case BTSNOOP_OPCODE_EVENT_PKT:
- event_pkt(&tv, index, buf, pktlen);
+ num_frames++;
+ event_pkt(&tv, index, num_frames, buf, pktlen);
break;
case BTSNOOP_OPCODE_ACL_TX_PKT:
+ num_frames++;
acl_pkt(&tv, index, true, buf, pktlen);
break;
case BTSNOOP_OPCODE_ACL_RX_PKT:
+ num_frames++;
acl_pkt(&tv, index, false, buf, pktlen);
break;
case BTSNOOP_OPCODE_SCO_TX_PKT:
+ num_frames++;
sco_pkt(&tv, index, true, buf, pktlen);
break;
case BTSNOOP_OPCODE_SCO_RX_PKT:
+ num_frames++;
sco_pkt(&tv, index, false, buf, pktlen);
break;
case BTSNOOP_OPCODE_OPEN_INDEX:
@@ -1123,9 +1166,11 @@ void analyze_trace(const char *path)
ctrl_msg(&tv, index, buf, pktlen);
break;
case BTSNOOP_OPCODE_ISO_TX_PKT:
+ num_frames++;
iso_pkt(&tv, index, true, buf, pktlen);
break;
case BTSNOOP_OPCODE_ISO_RX_PKT:
+ num_frames++;
iso_pkt(&tv, index, false, buf, pktlen);
break;
default:
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH BlueZ v2 11/12] monitor: Prefix data packets with proper type
2026-02-20 17:31 [PATCH BlueZ v2 01/12] doc/btmon: Add missing documentation Luiz Augusto von Dentz
` (8 preceding siblings ...)
2026-02-20 17:31 ` [PATCH BlueZ v2 10/12] monitor: Add connection lifecycle to analyze summary Luiz Augusto von Dentz
@ 2026-02-20 17:31 ` Luiz Augusto von Dentz
2026-02-20 17:31 ` [PATCH BlueZ v2 12/12] doc/btmon: Update documentation to reflect lastest changes Luiz Augusto von Dentz
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2026-02-20 17:31 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This attemps to prefix data packets using conn_type_str so it
properly differentiate BR and LE bearers and CIS from BIS and also
eliminate "Data TX/RX" labels as they are implicit from the direction
marker:
< LE-CIS: Handle 2304 [8/8] SN 15 ...
> LE-ACL: Handle 2048 ...
---
monitor/packet.c | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/monitor/packet.c b/monitor/packet.c
index a4930c855144..fbe773ffbdfe 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -14155,6 +14155,7 @@ void packet_hci_acldata(struct timeval *tv, struct ucred *cred, uint16_t index,
uint16_t handle = le16_to_cpu(hdr->handle);
uint16_t dlen = le16_to_cpu(hdr->dlen);
uint8_t flags = acl_flags(handle);
+ char label[8];
char handle_str[58], extra_str[32];
struct packet_conn_data *conn;
struct index_buf_pool *pool = &index_list[index].acl;
@@ -14194,9 +14195,13 @@ void packet_hci_acldata(struct timeval *tv, struct ucred *cred, uint16_t index,
sprintf(extra_str, "flags 0x%2.2x dlen %d", flags, dlen);
+ if (conn)
+ sprintf(label, "%s", conn_type_str(conn->type));
+ else
+ sprintf(label, "ACL");
+
print_packet(tv, cred, in ? '>' : '<', index, NULL, COLOR_HCI_ACLDATA,
- in ? "ACL Data RX" : "ACL Data TX",
- handle_str, extra_str);
+ label, handle_str, extra_str);
if (!in)
packet_enqueue_tx(tv, acl_handle(handle),
@@ -14221,6 +14226,7 @@ void packet_hci_scodata(struct timeval *tv, struct ucred *cred, uint16_t index,
const hci_sco_hdr *hdr = data;
uint16_t handle = le16_to_cpu(hdr->handle);
uint8_t flags = acl_flags(handle);
+ char label[8];
char handle_str[42], extra_str[32];
struct packet_conn_data *conn;
@@ -14256,9 +14262,13 @@ void packet_hci_scodata(struct timeval *tv, struct ucred *cred, uint16_t index,
sprintf(extra_str, "flags 0x%2.2x dlen %d", flags, hdr->dlen);
+ if (conn)
+ sprintf(label, "%s", conn_type_str(conn->type));
+ else
+ sprintf(label, "SCO");
+
print_packet(tv, cred, in ? '>' : '<', index, NULL, COLOR_HCI_SCODATA,
- in ? "SCO Data RX" : "SCO Data TX",
- handle_str, extra_str);
+ label, handle_str, extra_str);
if (!in)
packet_enqueue_tx(tv, acl_handle(handle),
@@ -14282,6 +14292,7 @@ void packet_hci_isodata(struct timeval *tv, struct ucred *cred, uint16_t index,
const struct bt_hci_iso_data_start *start;
uint16_t handle = le16_to_cpu(hdr->handle);
uint8_t flags = acl_flags(handle);
+ char label[8];
char handle_str[56], extra_str[50], ts_str[16] = { 0 };
struct index_buf_pool *pool = &index_list[index].iso;
struct packet_conn_data *conn;
@@ -14328,9 +14339,13 @@ void packet_hci_isodata(struct timeval *tv, struct ucred *cred, uint16_t index,
sprintf(extra_str, "flags 0x%2.2x dlen %u slen %u%s", flags, hdr->dlen,
start->slen, ts_str);
+ if (conn)
+ sprintf(label, "%s", conn_type_str(conn->type));
+ else
+ sprintf(label, "ISO");
+
print_packet(tv, cred, in ? '>' : '<', index, NULL, COLOR_HCI_ISODATA,
- in ? "ISO Data RX" : "ISO Data TX",
- handle_str, extra_str);
+ label, handle_str, extra_str);
if (!in)
packet_enqueue_tx(tv, acl_handle(handle),
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH BlueZ v2 12/12] doc/btmon: Update documentation to reflect lastest changes
2026-02-20 17:31 [PATCH BlueZ v2 01/12] doc/btmon: Add missing documentation Luiz Augusto von Dentz
` (9 preceding siblings ...)
2026-02-20 17:31 ` [PATCH BlueZ v2 11/12] monitor: Prefix data packets with proper type Luiz Augusto von Dentz
@ 2026-02-20 17:31 ` Luiz Augusto von Dentz
2026-02-20 18:25 ` [BlueZ,v2,01/12] doc/btmon: Add missing documentation bluez.test.bot
2026-02-20 20:20 ` [PATCH BlueZ v2 01/12] " patchwork-bot+bluetooth
12 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2026-02-20 17:31 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This update the diagram showing where each information is displayed to
include the connection type and peer address.
---
doc/btmon.rst | 33 ++++++++++++++++++---------------
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/doc/btmon.rst b/doc/btmon.rst
index c1616318a004..e1e362b7c1b6 100644
--- a/doc/btmon.rst
+++ b/doc/btmon.rst
@@ -255,23 +255,26 @@ completes and the result status.
**ACL Data** shows data plane traffic with handle and protocol decoding::
- < ACL Data TX: Handle 2048 [1.. flags 0x00 dlen 16 #493 [hci0] 12:36:18.977915
- │ │ │ │ │ │ │
- │ │ │ │ │ │ └─ Timestamp
- │ │ │ │ │ └─ Controller
- │ │ │ │ └─ Frame number
- │ │ │ └─ Data length
- │ │ └─ Fragment info / flags
- │ └─ Connection handle
- └─ Direction: TX = outgoing, RX = incoming
+ < LE-ACL: Handle 2048 [66:B0:26:F1:D3:BC] [1/6] flags 0x00 dlen 16 #493 [hci0] 12:36:18.977915
+ │ │ │ │ │ │ │ │ │ │
+ │ │ │ │ │ │ │ │ │ └─ Timestamp
+ │ │ │ │ │ │ │ │ └─ Controller
+ │ │ │ │ │ │ │ └─ Frame number
+ │ │ │ │ │ │ └─ Data length
+ │ │ │ │ │ └─ flags
+ │ │ │ │ └─ Buffer tracking (optional)
+ │ │ │ └─ Peer address (optional)
+ │ │ └─ Handle number
+ │ └─ Connection-type-aware label (e.g. BR-ACL, LE-ACL, BR-SCO, LE-ISO)
+ └─ Direction marker: '<' = host->controller (TX), '>' = controller->host (RX)
ACL data is automatically decoded into higher-layer protocols::
- < ACL Data TX: Handle 2048 [2/6] flags 0x00 dlen 7 #494 [hci0] 12:36:18.978488
+ < LE-ACL: Handle 2048 [2/6] flags 0x00 dlen 7 #494 [hci0] 12:36:18.978488
ATT: Exchange MTU Request (0x02) len 2
Client RX MTU: 517
- > ACL Data RX: Handle 2048 flags 0x02 dlen 11 #497 [hci0] 12:36:19.000048
+ > LE-ACL: Handle 2048 flags 0x02 dlen 11 #497 [hci0] 12:36:19.000048
SMP: Pairing Request (0x01) len 6
IO capability: NoInputNoOutput (0x03)
OOB data: Authentication data not present (0x00)
@@ -435,7 +438,7 @@ frame. The indentation level indicates the protocol layer:
Example of protocol layering in ACL data::
- > ACL Data RX: Handle 2048 flags 0x02 dlen 11 #497 [hci0] 12:36:19.000048
+ > ACL: Handle 2048 flags 0x02 dlen 11 #497 [hci0] 12:36:19.000048
SMP: Pairing Request (0x01) len 6 ← L2CAP/SMP layer
IO capability: NoInputNoOutput (0x03) ← SMP fields
OOB data: Authentication data not present (0x00)
@@ -520,9 +523,9 @@ MGMT Command Complete event back to bluetoothd.
Peer address: AA:BB:CC:DD:EE:FF (OUI Company)
@ MGMT Event: Device Connec.. (0x000b) plen 13 {0x0001} [hci0] 12:36:18.974319
= bluetoothd: src/adapter.c:connected_callback() hci0 devic.. 12:36:18.975307
- < ACL Data TX: Handle 2048 [1.. flags 0x00 dlen 16 #493 [hci0] 12:36:18.977915
+ < ACL: Handle 2048 [1.. flags 0x00 dlen 16 #493 [hci0] 12:36:18.977915
LE L2CAP: Connection Parameter Update Request (0x12) ident 1 len 8
- < ACL Data TX: Handle 2048 [2/6] flags 0x00 dlen 7 #494 [hci0] 12:36:18.978488
+ < ACL: Handle 2048 [2/6] flags 0x00 dlen 7 #494 [hci0] 12:36:18.978488
ATT: Exchange MTU Request (0x02) len 2
Client RX MTU: 517
@@ -579,7 +582,7 @@ Controller Buffer Tracking
Buffer tracking may show a indicator in square brackets::
- < ACL Data TX: Handle 2048 [1/6] flags 0x00 dlen 16
+ < ACL: Handle 2048 [1/6] flags 0x00 dlen 16
The ``[1/6]`` means this is buffer slot 1 of 6 available controller
ACL buffers. This reflects the host-side HCI flow control: the host
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* RE: [BlueZ,v2,01/12] doc/btmon: Add missing documentation
2026-02-20 17:31 [PATCH BlueZ v2 01/12] doc/btmon: Add missing documentation Luiz Augusto von Dentz
` (10 preceding siblings ...)
2026-02-20 17:31 ` [PATCH BlueZ v2 12/12] doc/btmon: Update documentation to reflect lastest changes Luiz Augusto von Dentz
@ 2026-02-20 18:25 ` bluez.test.bot
2026-02-20 20:20 ` [PATCH BlueZ v2 01/12] " patchwork-bot+bluetooth
12 siblings, 0 replies; 14+ messages in thread
From: bluez.test.bot @ 2026-02-20 18:25 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 2036 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1055976
---Test result---
Test Summary:
CheckPatch PENDING 0.39 seconds
GitLint PENDING 0.34 seconds
BuildEll PASS 20.66 seconds
BluezMake PASS 652.64 seconds
MakeCheck PASS 18.11 seconds
MakeDistcheck PASS 242.90 seconds
CheckValgrind PASS 301.09 seconds
CheckSmatch WARNING 352.89 seconds
bluezmakeextell PASS 181.43 seconds
IncrementalBuild PENDING 0.34 seconds
ScanBuild PASS 1012.95 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
monitor/packet.c:1993:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3866:52: warning: array of flexible structuresmonitor/bt.h:3854:40: warning: array of flexible structuresmonitor/packet.c:1993:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3866:52: warning: array of flexible structuresmonitor/bt.h:3854:40: warning: array of flexible structuresmonitor/packet.c:1993:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3866:52: warning: array of flexible structuresmonitor/bt.h:3854:40: warning: array of flexible structures
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCH BlueZ v2 01/12] doc/btmon: Add missing documentation
2026-02-20 17:31 [PATCH BlueZ v2 01/12] doc/btmon: Add missing documentation Luiz Augusto von Dentz
` (11 preceding siblings ...)
2026-02-20 18:25 ` [BlueZ,v2,01/12] doc/btmon: Add missing documentation bluez.test.bot
@ 2026-02-20 20:20 ` patchwork-bot+bluetooth
12 siblings, 0 replies; 14+ messages in thread
From: patchwork-bot+bluetooth @ 2026-02-20 20:20 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Fri, 20 Feb 2026 12:31:05 -0500 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> This adds missing documentation for -I/--iso and -N/--no-time options.
> ---
> doc/btmon.rst | 5 +++++
> 1 file changed, 5 insertions(+)
Here is the summary with links:
- [BlueZ,v2,01/12] doc/btmon: Add missing documentation
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=5958e4492990
- [BlueZ,v2,02/12] doc/btmon: Add dedicate sections for timestamp and frame number
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=36197cc3965d
- [BlueZ,v2,03/12] doc/btmon: Add connection tracking section
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=3ddbc4f499c6
- [BlueZ,v2,04/12] doc/btmon: Add a dedicated section for analyze mode
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=c25a8de27137
- [BlueZ,v2,05/12] doc/btmon: Add a section for automated trace analysis
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=197f1d2a86c1
- [BlueZ,v2,06/12] doc: add btsnoop protocol manpage
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=076e705fdb52
- [BlueZ,v2,07/12] doc/btmon: Add reference to btsnoop documention
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=791a7bb024c1
- [BlueZ,v2,08/12] monitor: Annotate ACL/SCO/ISO data with device address
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=611f84a0ff0e
- [BlueZ,v2,09/12] monitor: Print connection type in Disconnect Complete
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=8157e2fde5d3
- [BlueZ,v2,10/12] monitor: Add connection lifecycle to analyze summary
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=13cf50b6607e
- [BlueZ,v2,11/12] monitor: Prefix data packets with proper type
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=25ba1ab49f34
- [BlueZ,v2,12/12] doc/btmon: Update documentation to reflect lastest changes
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=d84a8fb8db97
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 14+ messages in thread