From e2705e6da4d6f448d5b3ae435b1459443bcd1177 Mon Sep 17 00:00:00 2001 From: Marcin Kraglak Date: Wed, 30 Jul 2014 11:38:48 +0200 Subject: [PATCH] anroid/hidhost: Set security to MEDIUM after connect According to spec connection with HoG device should always be encrypted. --- android/hidhost.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/hidhost.c b/android/hidhost.c index 4b718c6d8..da5f81891 100644 --- a/android/hidhost.c +++ b/android/hidhost.c @@ -802,6 +802,11 @@ static void hog_conn_cb(const bdaddr_t *addr, int err, void *attrib) goto fail; } + if (!bt_gatt_set_security(addr, BT_IO_SEC_MEDIUM)) { + error("Failed to set security level"); + goto fail; + } + DBG(""); bt_hid_notify_state(dev, HAL_HIDHOST_STATE_CONNECTED); -- 2.47.3