Diff between 4ea78ff34b8fc793678e392a7544fe01d36dc556 and f881e165ec09b45ff683bac4e5c84db66025a9ac
Changed Files
| File | Additions | Deletions | Status |
| emulator/bthost.c | +6 | -0 | modified |
Full Patch
diff --git a/emulator/bthost.c b/emulator/bthost.c
index 96d375f..5afc11e 100644
--- a/emulator/bthost.c
+++ b/emulator/bthost.c
@@ -682,9 +682,15 @@ static void evt_auth_complete(struct bthost *bthost, const void *data,
uint8_t len)
{
const struct bt_hci_evt_auth_complete *ev = data;
+ struct bt_hci_cmd_set_conn_encrypt cp;
if (len < sizeof(*ev))
return;
+
+ cp.handle = ev->handle;
+ cp.encr_mode = 0x01;
+
+ send_command(bthost, BT_HCI_CMD_SET_CONN_ENCRYPT, &cp, sizeof(cp));
}
static void evt_pin_code_request(struct bthost *bthost, const void *data,