From: Archie Pusaka <apusaka@google.com>
To: linux-bluetooth <linux-bluetooth@vger.kernel.org>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: CrosBT Upstreaming <chromeos-bluetooth-upstreaming@chromium.org>,
Archie Pusaka <apusaka@chromium.org>
Subject: [PATCH BlueZ] monitor: Add support for HCI Event Encryption Change v2
Date: Fri, 22 May 2026 19:15:12 +0800 [thread overview]
Message-ID: <20260522111540.581113-1-apusaka@google.com> (raw)
From: Archie Pusaka <apusaka@chromium.org>
> HCI Event: Encryption Change v2 (0x59) plen 5
Status: Success (0x00)
Handle: 256 (BR-ACL) Address: 00:11:22:34:56:78
Encryption: Enabled with E0 (0x01)
Key size: 16
---
monitor/bt.h | 8 ++++++++
monitor/packet.c | 13 +++++++++++++
2 files changed, 21 insertions(+)
diff --git a/monitor/bt.h b/monitor/bt.h
index 147b76537..eac6b5ed7 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -3696,6 +3696,14 @@ struct bt_hci_evt_auth_payload_timeout_expired {
uint16_t handle;
} __attribute__ ((packed));
+#define BT_HCI_EVT_ENCRYPT_CHANGE_V2 0x59
+struct bt_hci_evt_encrypt_change_v2 {
+ uint8_t status;
+ uint16_t handle;
+ uint8_t encr_mode;
+ uint8_t encr_key_size;
+} __attribute__ ((packed));
+
#define BT_HCI_EVT_LE_CONN_COMPLETE 0x01
struct bt_hci_evt_le_conn_complete {
uint8_t status;
diff --git a/monitor/packet.c b/monitor/packet.c
index ff0b1cac2..0de7e6f57 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -12008,6 +12008,17 @@ static void auth_payload_timeout_expired_evt(struct timeval *tv, uint16_t index,
print_handle(evt->handle);
}
+static void encrypt_change_evt_v2(struct timeval *tv, uint16_t index,
+ const void *data, uint8_t size)
+{
+ const struct bt_hci_evt_encrypt_change_v2 *evt = data;
+
+ print_status(evt->status);
+ print_handle(evt->handle);
+ print_encr_mode_change(evt->encr_mode, evt->handle);
+ print_key_size(evt->encr_key_size);
+}
+
static void le_conn_complete_evt(struct timeval *tv, uint16_t index,
const void *data, uint8_t size)
{
@@ -13737,6 +13748,8 @@ static const struct event_data event_table[] = {
{ 0x57, "Authenticated Payload Timeout Expired",
auth_payload_timeout_expired_evt, 2, true },
{ 0x58, "SAM Status Change" },
+ { 0x59, "Encryption Change v2",
+ encrypt_change_evt_v2, 5, true },
{ 0xfe, "Testing" },
{ 0xff, "Vendor", vendor_evt, 0, false },
{ }
--
2.54.0.746.g67dd491aae-goog
next reply other threads:[~2026-05-22 11:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 11:15 Archie Pusaka [this message]
2026-05-22 14:15 ` [BlueZ] monitor: Add support for HCI Event Encryption Change v2 bluez.test.bot
2026-05-26 15:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260522111540.581113-1-apusaka@google.com \
--to=apusaka@google.com \
--cc=apusaka@chromium.org \
--cc=chromeos-bluetooth-upstreaming@chromium.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox