From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> The spec state that a secondary needs to referenced by at least one primary, Version 4.2 [Vol 1, Part A] page 101: 'A secondary service is a service that provides auxiliary functionality of a device and is referenced from at least one primary service on the device.' --- src/shared/gatt-client.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c index 724fc53..7e9d550 100644 --- a/src/shared/gatt-client.c +++ b/src/shared/gatt-client.c @@ -1009,6 +1009,15 @@ static void discover_primary_cb(bool success, uint8_t att_ecode, } secondary: + /* + * Version 4.2 [Vol 1, Part A] page 101: + * A secondary service is a service that provides auxiliary + * functionality of a device and is referenced from at least one + * primary service on the device. + */ + if (queue_isempty(op->pending_svcs)) + goto done; + /* Discover secondary services */ client->discovery_req = bt_gatt_discover_secondary_services(client->att, NULL, op->start, op->end, -- 2.1.0 -- 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