From 12d51b2ed178f940621adbd526c4f5e92c009ace Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 10 Jan 2014 14:10:44 +0200 Subject: [PATCH] emulator/bthost: Add support for enabling SSP mode --- emulator/bthost.c | 5 +++++ emulator/bthost.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/emulator/bthost.c b/emulator/bthost.c index 4ce720ebe..99537acd4 100644 --- a/emulator/bthost.c +++ b/emulator/bthost.c @@ -1359,6 +1359,11 @@ void bthost_set_adv_enable(struct bthost *bthost, uint8_t enable) send_command(bthost, BT_HCI_CMD_LE_SET_ADV_ENABLE, &enable, 1); } +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_le_start_encrypt(struct bthost *bthost, uint16_t handle, const uint8_t ltk[16]) { diff --git a/emulator/bthost.h b/emulator/bthost.h index 7458d5eb9..36b8c9216 100644 --- a/emulator/bthost.h +++ b/emulator/bthost.h @@ -72,6 +72,8 @@ void bthost_write_scan_enable(struct bthost *bthost, uint8_t scan); void bthost_set_adv_enable(struct bthost *bthost, uint8_t enable); +void bthost_write_ssp_mode(struct bthost *bthost, uint8_t mode); + void bthost_le_start_encrypt(struct bthost *bthost, uint16_t handle, const uint8_t ltk[16]); typedef void (*bthost_l2cap_connect_cb) (uint16_t handle, uint16_t cid, -- 2.47.3