[PATCH 3/5] anroid/hidhost: Set security to MEDUIM after connect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 4b718c6..da5f818 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);
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux