From d9b71705bc4091a380139d340549c9bf85960a49 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 7 Nov 2025 10:06:57 -0500 Subject: [PATCH] bthost: Add support for terminating a BIG This adds support for sending BT_HCI_CMD_LE_TERM_BIG via bthost_terminate_big. --- emulator/bthost.c | 11 +++++++++++ emulator/bthost.h | 1 + 2 files changed, 12 insertions(+) diff --git a/emulator/bthost.c b/emulator/bthost.c index faabbaa36..9f9538d0d 100644 --- a/emulator/bthost.c +++ b/emulator/bthost.c @@ -3780,6 +3780,17 @@ void bthost_create_big(struct bthost *bthost, uint8_t num_bis, send_command(bthost, BT_HCI_CMD_LE_CREATE_BIG, &cp, sizeof(cp)); } +void bthost_terminate_big(struct bthost *bthost, uint8_t reason) +{ + struct bt_hci_cmd_le_term_big cp; + + memset(&cp, 0, sizeof(cp)); + cp.handle = 0x01; + cp.reason = reason; + + send_command(bthost, BT_HCI_CMD_LE_TERM_BIG, &cp, sizeof(cp)); +} + bool bthost_search_ext_adv_addr(struct bthost *bthost, const uint8_t *addr) { const struct queue_entry *entry; diff --git a/emulator/bthost.h b/emulator/bthost.h index 4061c0be5..ce6bd820f 100644 --- a/emulator/bthost.h +++ b/emulator/bthost.h @@ -128,6 +128,7 @@ void bthost_set_pa_enable(struct bthost *bthost, uint8_t enable); void bthost_past_set_info(struct bthost *bthost, uint16_t handle); void bthost_create_big(struct bthost *bthost, uint8_t num_bis, uint8_t enc, const uint8_t *bcode); +void bthost_terminate_big(struct bthost *bthost, uint8_t reason); bool bthost_search_ext_adv_addr(struct bthost *bthost, const uint8_t *addr); void bthost_set_cig_params(struct bthost *bthost, uint8_t cig_id, -- 2.47.3