From 12a21d40294330e60b748da488658740254ba2ea Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Thu, 13 Apr 2017 13:09:48 +0900 Subject: [PATCH] Add the dbus interface for LE OOB pairing To use LE OOB pairing, we should assign BD address type in kernel MGMT. This patchset adds BD address type in the remote oob data setting dbus API. Change-Id: Ie1c47e43ce8dab9878977aea450b5c2d2e1a5401 Signed-off-by: DoHyun Pyun --- plugins/dbusoob.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/dbusoob.c b/plugins/dbusoob.c index 8948d5d..f8f3551 100755 --- a/plugins/dbusoob.c +++ b/plugins/dbusoob.c @@ -153,11 +153,12 @@ static DBusMessage *add_remote_data(DBusConnection *conn, DBusMessage *msg, int32_t h256_len = 0; int32_t r256_len = 0; bdaddr_t bdaddr; - uint8_t addr_type = 0; + uint8_t addr_type = BDADDR_BREDR; bool valid_len; if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &addr, + DBUS_TYPE_BYTE, &addr_type, DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &hash192, &h192_len, DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &randomizer192, &r192_len, DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &hash256, &h256_len, @@ -165,6 +166,8 @@ static DBusMessage *add_remote_data(DBusConnection *conn, DBusMessage *msg, DBUS_TYPE_INVALID)) return btd_error_invalid_args(msg); + DBG("address type: %d", addr_type); + valid_len = (h192_len == 16 && r192_len == 16) || (h256_len == 16 && r256_len == 16); @@ -207,6 +210,7 @@ static DBusMessage *remove_remote_data(DBusConnection *conn, DBusMessage *msg, static const GDBusMethodTable oob_methods[] = { { GDBUS_METHOD("AddRemoteData", GDBUS_ARGS({ "address", "s" }, + { "address_type", "y" }, { "hash192", "ay" }, { "randomizer192", "ay" }, { "hash256", "ay" }, { "randomizer256", "ay" }), NULL, -- 2.7.4