diff --git a/src/device.c b/src/device.c
index 9f9c478..72f18b3 100644
--- a/src/device.c
+++ b/src/device.c
return TRUE;
}
+static gboolean property_get_address_type(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *user_data)
+{
+ struct btd_device *device = user_data;
+ const char *str;
+
+ if (device->le && device->bdaddr_type == BDADDR_LE_RANDOM)
+ str = "random";
+ else
+ str = "public";
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &str);
+
+ return TRUE;
+}
+
static gboolean dev_property_get_name(const GDBusPropertyTable *property,
DBusMessageIter *iter, void *data)
{
static const GDBusPropertyTable device_properties[] = {
{ "Address", "s", dev_property_get_address },
+ { "AddressType", "s", property_get_address_type },
{ "Name", "s", dev_property_get_name, NULL, dev_property_exists_name },
{ "Alias", "s", dev_property_get_alias, dev_property_set_alias },
{ "Class", "u", dev_property_get_class, NULL,
g_dbus_emit_property_changed(dbus_conn, device->path,
DEVICE_INTERFACE, "Address");
+ g_dbus_emit_property_changed(dbus_conn, device->path,
+ DEVICE_INTERFACE, "AddressType");
}
void device_set_bredr_support(struct btd_device *device)