PTS test HOGP/RH/HGRF/BV-01-I fails as inconclusive after waiting for second report map read request with message 'Please send ReadRequest to read Report Map characteristic with handle = 0x00E7'. Handle which has already been read, as it can be seen in btmon traces. This commit change the recursion order to read instance characteristics before recurring to next instances. Closes: https://github.com/bluez/bluez/issues/657 --- profiles/input/hog-lib.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/profiles/input/hog-lib.c b/profiles/input/hog-lib.c index 7ff1ede3d..db62a3c9f 100644 --- a/profiles/input/hog-lib.c +++ b/profiles/input/hog-lib.c @@ -1780,12 +1780,6 @@ bool bt_hog_attach(struct bt_hog *hog, void *gatt) queue_foreach(hog->bas, (void *) bt_bas_attach, gatt); - for (l = hog->instances; l; l = l->next) { - struct bt_hog *instance = l->data; - - bt_hog_attach(instance, gatt); - } - if (!hog->uhid_created) { DBG("HoG discovering characteristics"); if (hog->attr) @@ -1798,6 +1792,12 @@ bool bt_hog_attach(struct bt_hog *hog, void *gatt) char_discovered_cb, hog); } + for (l = hog->instances; l; l = l->next) { + struct bt_hog *instance = l->data; + + bt_hog_attach(instance, gatt); + } + if (!hog->uhid_created) return true; -- 2.34.1