--- android/gatt.c | 10 ++++++++++ android/gatt.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/android/gatt.c b/android/gatt.c index 7061924..9471eaf 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -6286,3 +6286,13 @@ bool bt_gatt_disconnect_app(unsigned int id, const bdaddr_t *addr) return true; } + +void bt_gatt_set_security(const bdaddr_t *addr, int sec_level) +{ + struct gatt_device *dev = find_device_by_addr(addr); + + if (!dev) + return; + + set_security_level(dev, sec_level); +} diff --git a/android/gatt.h b/android/gatt.h index 5ba9161..d4f8a8e 100644 --- a/android/gatt.h +++ b/android/gatt.h @@ -38,3 +38,5 @@ bool bt_gatt_unregister_app(unsigned int id); bool bt_gatt_connect_app(unsigned int id, const bdaddr_t *addr); bool bt_gatt_disconnect_app(unsigned int id, const bdaddr_t *addr); + +void bt_gatt_set_security(const bdaddr_t *addr, int sec_level); -- 1.8.4 -- 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