If there is any bonded device stored then on bluetooth enable we should send notification with its properties. --- android/bluetooth.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/android/bluetooth.c b/android/bluetooth.c index e0673bb..9da988b 100644 --- a/android/bluetooth.c +++ b/android/bluetooth.c @@ -2636,6 +2636,18 @@ static void get_remote_device_props(struct device *dev) get_device_timestamp(dev); } +static void send_bonded_devices_props(void) +{ + GSList *l; + + for (l = devices; l; l = g_slist_next(l)) { + struct device *dev = l->data; + + if (dev->bond_state == HAL_BOND_STATE_BONDED) + get_remote_device_props(dev); + } +} + static void handle_enable_cmd(const void *buf, uint16_t len) { uint8_t status; @@ -2644,6 +2656,9 @@ static void handle_enable_cmd(const void *buf, uint16_t len) * enabling adapter */ get_adapter_properties(); + /* Sent also properties of bonded devices */ + send_bonded_devices_props(); + if (adapter.current_settings & MGMT_SETTING_POWERED) { status = HAL_STATUS_DONE; goto failed; -- 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