From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> Always use medium security when connecting devices already paired since some profiles like HoG do require encryption. --- android/gatt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/gatt.c b/android/gatt.c index d63efc9..5505cd0 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -1430,8 +1430,8 @@ static int connect_le(struct gatt_device *dev) DBG("Connection attempt to: %s", addr); - /* TODO: If we are bonded then we should use higier sec level */ - sec_level = BT_IO_SEC_LOW; + sec_level = bt_device_is_bonded(&dev->bdaddr) ? BT_IO_SEC_MEDIUM : + BT_IO_SEC_LOW; /* * This connection will help us catch any PDUs that comes before -- 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