From 905fe3f84cdf3513ca60756d0e8b179dbccb27c6 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 17 Dec 2014 12:44:16 +0200 Subject: [PATCH] emulator: Provide API to enable LE host support --- emulator/bthost.c | 7 +++++++ emulator/bthost.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/emulator/bthost.c b/emulator/bthost.c index c4d78696b..0dbaa2f63 100644 --- a/emulator/bthost.c +++ b/emulator/bthost.c @@ -815,6 +815,8 @@ static void evt_cmd_complete(struct bthost *bthost, const void *data, break; case BT_HCI_CMD_WRITE_SIMPLE_PAIRING_MODE: break; + case BT_HCI_CMD_WRITE_LE_HOST_SUPPORTED: + break; case BT_HCI_CMD_WRITE_SECURE_CONN_SUPPORT: break; case BT_HCI_CMD_IO_CAPABILITY_REQUEST_REPLY: @@ -2192,6 +2194,11 @@ void bthost_write_ssp_mode(struct bthost *bthost, uint8_t mode) send_command(bthost, BT_HCI_CMD_WRITE_SIMPLE_PAIRING_MODE, &mode, 1); } +void bthost_write_le_host_supported(struct bthost *bthost, uint8_t mode) +{ + send_command(bthost, BT_HCI_CMD_WRITE_LE_HOST_SUPPORTED, &mode, 1); +} + void bthost_request_auth(struct bthost *bthost, uint16_t handle) { struct btconn *conn; diff --git a/emulator/bthost.h b/emulator/bthost.h index 8193cdf14..e2d683bb6 100644 --- a/emulator/bthost.h +++ b/emulator/bthost.h @@ -84,6 +84,8 @@ void bthost_set_adv_enable(struct bthost *bthost, uint8_t enable, void bthost_write_ssp_mode(struct bthost *bthost, uint8_t mode); +void bthost_write_le_host_supported(struct bthost *bthost, uint8_t mode); + void bthost_request_auth(struct bthost *bthost, uint16_t handle); void bthost_le_start_encrypt(struct bthost *bthost, uint16_t handle, -- 2.47.3