Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 0/2] Accept HoG Report Map longer than 512 octets
@ 2026-11-30 19:03 Sebastian
  2026-11-30 19:03 ` [PATCH 1/2] shared/gatt-client: Add bt_gatt_client_read_long_value_max_len Sebastian
  2026-11-30 19:03 ` [PATCH 2/2] shared/hog: Accept Report Map longer than 512 octets Sebastian
  0 siblings, 2 replies; 4+ messages in thread
From: Sebastian @ 2026-11-30 19:03 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Sebastian

Since 5.88, HID over GATT devices with a Report Map longer than 512
octets no longer work: the Report Map is truncated, the kernel fails to
parse it and no input device is created. Several keyboards and
touchpads are affected, see https://github.com/bluez/bluez/issues/2814.
Mine, an Inateck KB05113, sends 637 octets.

Commit 952c08ff50c5 ("hog-lib: Don't restrict Report MAP size") made
hog-lib accept Report Maps of any size, since other operating systems
don't enforce the 512 octet limit. The limit came back with commit
96f1201f5ac2 ("input/hog: Use shared/hog"), as bt_gatt_client long
reads truncate to BT_ATT_MAX_VALUE_LEN.

Patch 1 adds an opt-in variant of bt_gatt_client_read_long_value with a
caller-chosen maximum length; the existing function keeps the 512 octet
limit. Patch 2 uses it for the Report Map only, up to the 4096 octets
UHID_CREATE2 accepts.

Raising the limit for the Report Map makes the Inateck KB05113 work
again: keyboard, mouse and touchpad input devices are created. All unit
tests pass.

Sebastian (2):
  shared/gatt-client: Add bt_gatt_client_read_long_value_max_len
  shared/hog: Accept Report Map longer than 512 octets

 src/shared/gatt-client.c | 40 ++++++++++++++++++++++++++++++++++++----
 src/shared/gatt-client.h |  7 +++++++
 src/shared/hog.c         | 24 ++++++++++++++++++++----
 3 files changed, 63 insertions(+), 8 deletions(-)

-- 
2.56.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-30 19:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 19:03 [PATCH 0/2] Accept HoG Report Map longer than 512 octets Sebastian
2026-11-30 19:03 ` [PATCH 1/2] shared/gatt-client: Add bt_gatt_client_read_long_value_max_len Sebastian
2026-11-30 19:03 ` [PATCH 2/2] shared/hog: Accept Report Map longer than 512 octets Sebastian
2026-11-30 19:32   ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox