diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-01-13 12:57:58 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-01-13 12:58:16 +0200 |
commit | f881e165ec09b45ff683bac4e5c84db66025a9ac (patch) | |
tree | 1501cc153752925ee12102819bc10e2ef6d86e9b /emulator | |
parent | 4ea78ff34b8fc793678e392a7544fe01d36dc556 (diff) | |
download | bluez-f881e165ec09b45ff683bac4e5c84db66025a9ac.tar.gz |
emulator/bthost: Request encryption when authentication completes
Diffstat (limited to 'emulator')
-rw-r--r-- | emulator/bthost.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/emulator/bthost.c b/emulator/bthost.c index 96d375f23..5afc11ee5 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, |