This prevents against the situation when notification is received before uhid is created. Otherwise bt_uhid error message appears. --- android/hog.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/android/hog.c b/android/hog.c index b5b772c..9276d40 100644 --- a/android/hog.c +++ b/android/hog.c @@ -210,8 +210,6 @@ static void report_reference_cb(bool success, uint8_t status, report->id = value[0]; report->type = value[1]; DBG("Report ID: 0x%02x Report type: 0x%02x", value[0], value[1]); - - report_enable_notif(report, NULL); } static void external_report_reference_cb(bool success, uint8_t status, @@ -717,6 +715,7 @@ static bool uhid_create(struct bt_hog *hog, const uint8_t *value, uint16_t vlen) return false; } + queue_foreach(hog->reports, report_enable_notif, NULL); bt_uhid_register(hog->uhid, UHID_OUTPUT, forward_report, hog); bt_uhid_register(hog->uhid, UHID_FEATURE, get_feature, hog); bt_uhid_register(hog->uhid, UHID_GET_REPORT, get_report, hog); -- 1.9.1 -- 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