Diff between a1939bd51e0faba9a8550eea2590d99cb63a33c1 and c535623a713c340031daf56d0798829644a92532

Changed Files

File Additions Deletions Status
profiles/input/hog-lib.c +8 -1 modified

Full Patch

diff --git a/profiles/input/hog-lib.c b/profiles/input/hog-lib.c
index b611f6b..e69ea1b 100644
--- a/profiles/input/hog-lib.c
+++ b/profiles/input/hog-lib.c
@@ -348,7 +348,14 @@ static void report_value_cb(const guint8 *pdu, guint16 len, gpointer user_data)
 	ev.type = UHID_INPUT;
 	buf = ev.u.input.data;
 
-	if (report->numbered) {
+	/* BLUETOOTH SPECIFICATION Page 16 of 26
+	 * HID Service Specification
+	 *
+	 * Report ID shall be nonzero in a Report Reference characteristic
+	 * descriptor where there is more than one instance of the Report
+	 * characteristic for any given Report Type.
+	 */
+	if (report->numbered && report->id) {
 		buf[0] = report->id;
 		len = MIN(len, sizeof(ev.u.input.data) - 1);
 		memcpy(buf + 1, pdu, len);