Diff between 7dfc7e96144150b0fa4f286d8d351ee96baf7db8 and f072c7573b760154c8c76c2ef31744d3b73333d6

Changed Files

File Additions Deletions Status
emulator/bthost.c +9 -0 modified
emulator/bthost.h +2 -0 modified

Full Patch

diff --git a/emulator/bthost.c b/emulator/bthost.c
index 1bdc1b2..0dd7c67 100644
--- a/emulator/bthost.c
+++ b/emulator/bthost.c
@@ -1495,6 +1495,15 @@ 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_request_auth(struct bthost *bthost, uint16_t handle)
+{
+	struct bt_hci_cmd_auth_requested cp;
+
+	cp.handle = cpu_to_le16(handle);
+
+	send_command(bthost, BT_HCI_CMD_AUTH_REQUESTED, &cp, sizeof(cp));
+}
+
 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 8d007ac..5fb7ad4 100644
--- a/emulator/bthost.h
+++ b/emulator/bthost.h
@@ -74,6 +74,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_request_auth(struct bthost *bthost, uint16_t handle);
+
 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,