Linux bluetooth development
 help / color / mirror / Atom feed
From: Sebastian <seb.witt@googlemail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Sebastian <seb.witt@googlemail.com>
Subject: [PATCH v3 0/6] Accept HoG Report Map longer than 512 octets
Date: Thu,  3 Dec 2026 16:34:02 +0100	[thread overview]
Message-ID: <20261203153408.31769-1-seb.witt@googlemail.com> (raw)
In-Reply-To: <CABBYNZ+GNO-eVNC5B_4SqCdHOE+OHmXUaW0NwStd_BsbUzx35A@mail.gmail.com>

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.

As discussed, accepting them is now controlled by a LongReportMap
option in a new [Input] section of main.conf, enabled by default and
disabled when Testing is, so the limit is enforced for qualification.
shared/hog itself keeps reading at most 512 octets unless told
otherwise with bt_hog_set_long_report_map.

The default depends on Testing as set from main.conf or with -T, also
when there is no main.conf.

I took [Input] to mean a new section of main.conf, like [AVRCP], rather
than one in input.conf; I can move it there if you prefer.

This series was developed with the help of Claude, an AI assistant.

v2:
 - Add the LongReportMap option to [Input] in main.conf
 - Keep the 512 octet limit by default in shared/hog, add
   bt_hog_set_long_report_map
 - Rebase on master

v3:
 - Refuse long reads starting beyond the maximum length, as the length
   appended would otherwise underflow
 - Apply the default depending on Testing without main.conf too
 - Add tests for long reads in unit/test-gatt and for long Report Maps
   in unit/test-hog
 - Use static const char * const for input_options
 - Use Closes: for the GitHub issue
 - Drop non-standard trailers flagged by checkpatch

Sebastian (6):
  shared/gatt-client: Add bt_gatt_client_read_long_value_max_len
  main.conf: Add LongReportMap option to [Input]
  shared/hog: Add bt_hog_set_long_report_map
  input/hog: Accept Report Map longer than 512 octets
  unit/test-gatt: Add tests for long reads beyond 512 octets
  unit/test-hog: Add tests for long Report Map

 profiles/input/hog.c     |  8 +++-
 src/btd.h                |  5 +++
 src/main.c               | 26 ++++++++++-
 src/main.conf            |  7 +++
 src/shared/gatt-client.c | 46 +++++++++++++++++--
 src/shared/gatt-client.h |  7 +++
 src/shared/hog.c         | 43 ++++++++++++++++--
 src/shared/hog.h         |  5 +++
 unit/test-gatt.c         | 96 ++++++++++++++++++++++++++++++++++++++++
 unit/test-hog.c          | 79 ++++++++++++++++++++++++++++++++-
 10 files changed, 310 insertions(+), 12 deletions(-)

-- 
2.56.1


  parent reply	other threads:[~2026-12-03 15:34 UTC|newest]

Thread overview: 14+ 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-12-01  0:02     ` Accept HoG Report Map longer than 512 octets bluez.test.bot
2026-12-02 16:13       ` Luiz Augusto von Dentz
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   ` [PATCH v2 4/4] input/hog: Accept Report Map longer than 512 octets Sebastian
2026-12-03 15:34 ` Sebastian [this message]
2026-12-03 15:34   ` [PATCH v3 1/6] shared/gatt-client: Add bt_gatt_client_read_long_value_max_len Sebastian
2026-12-03 15:34   ` [PATCH v3 2/6] main.conf: Add LongReportMap option to [Input] Sebastian
2026-12-03 15:34   ` [PATCH v3 3/6] shared/hog: Add bt_hog_set_long_report_map Sebastian
2026-12-03 15:34   ` [PATCH v3 4/6] input/hog: Accept Report Map longer than 512 octets Sebastian
2026-12-03 15:34   ` [PATCH v3 5/6] unit/test-gatt: Add tests for long reads beyond " Sebastian
2026-12-03 15:34   ` [PATCH v3 6/6] unit/test-hog: Add tests for long Report Map Sebastian

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=20261203153408.31769-1-seb.witt@googlemail.com \
    --to=seb.witt@googlemail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /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