From: Sebastian <seb.witt@googlemail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Sebastian <seb.witt@googlemail.com>,
"Claude Opus 5.5" <noreply@anthropic.com>
Subject: [PATCH v2 4/4] input/hog: Accept Report Map longer than 512 octets
Date: Mon, 30 Nov 2026 21:45:56 +0100 [thread overview]
Message-ID: <20261130204556.357834-5-seb.witt@googlemail.com> (raw)
In-Reply-To: <20261130204556.357834-1-seb.witt@googlemail.com>
Some HID over GATT devices expose a Report Map longer than 512 octets,
such as the Inateck KB05113 keyboard with touchpad (3373:7713), which
sends 637 octets. Since 5.88 it is truncated when read, the kernel then
fails to parse it and no input device is created:
hid-generic 0005:3373:7713.0005: item fetching failed at offset 509/512
hid-generic 0005:3373:7713.0005: probe with driver hid-generic failed
Other Inateck keyboards, the HP 720 keyboard and the Sanwa MA-PB521GM
touchpad, with Report Maps of 612 to 902 octets, are reported to fail
the same way.
This is a regression: commit 952c08ff50c5 ("hog-lib: Don't restrict
Report MAP size") made hog-lib read Report Maps of any size, since other
operating systems don't enforce the limit and many devices exceed it.
Since commit 96f1201f5ac2 ("input/hog: Use shared/hog") the Report Map
is read with bt_gatt_client_read_value, which truncates to
BT_ATT_MAX_VALUE_LEN.
Accept them according to the LongReportMap option of [Input] in
main.conf, which is enabled unless Testing is.
Fixes: 96f1201f5ac2 ("input/hog: Use shared/hog")
Fixes: https://github.com/bluez/bluez/issues/2814
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---
profiles/input/hog.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/profiles/input/hog.c b/profiles/input/hog.c
index 0f6224990..b7c293eee 100644
--- a/profiles/input/hog.c
+++ b/profiles/input/hog.c
@@ -29,6 +29,7 @@
#include "bluetooth/uuid.h"
#include "src/log.h"
+#include "src/btd.h"
#include "src/adapter.h"
#include "src/device.h"
#include "src/profile.h"
@@ -81,8 +82,11 @@ static void hog_device_accept(struct hog_device *dev, struct gatt_db *db)
product, version);
dev->hog = bt_hog_new_default(name, vendor, product, version, type, db);
- if (dev->hog)
- bt_hog_set_debug(dev->hog, hog_debug, NULL, NULL);
+ if (!dev->hog)
+ return;
+
+ bt_hog_set_debug(dev->hog, hog_debug, NULL, NULL);
+ bt_hog_set_long_report_map(dev->hog, btd_opts.input.long_report_map);
}
static struct hog_device *hog_device_new(struct btd_device *device)
--
2.56.1
prev parent reply other threads:[~2026-11-30 20:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CABBYNZ+GNO-eVNC5B_4SqCdHOE+OHmXUaW0NwStd_BsbUzx35A@mail.gmail.com>
2026-11-30 20:45 ` [PATCH v2 0/4] Accept HoG Report Map longer than 512 octets Sebastian
2026-11-30 20:45 ` [PATCH v2 1/4] shared/gatt-client: Add bt_gatt_client_read_long_value_max_len Sebastian
2026-11-30 20:45 ` [PATCH v2 2/4] main.conf: Add LongReportMap option to [Input] Sebastian
2026-11-30 20:45 ` [PATCH v2 3/4] shared/hog: Add bt_hog_set_long_report_map Sebastian
2026-11-30 20:45 ` Sebastian [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130204556.357834-5-seb.witt@googlemail.com \
--to=seb.witt@googlemail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=noreply@anthropic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox