From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.46 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796071590; b=HUto7nHXKDr84VSYukj+lyJKoiq53xhdzsTZohTW+T9clxAXtsoNEQd50Ws8+XIK5irY OOHeJUgN0MbuEtLFInU5lQXVIFIeI4s9du7ht5TzP3HVs+eCTBCBHfwvqehBn2RMkUm4l PZxiqv35huLn3Y0RhmDaLllxh/rWkk3wzAKdUSdSXEoibTrRELGugg5Hd/7fQQV8GYT5m 81ivZlkhPM+YpXu6UtoSKTRRtBHxV1GdFyZupZMSPH2MtSpmG4iOo6TjjfKmmi8ILaFFp jjd22nOVl9EPXJBSfTtMi2DULnssZb8xcddGPoa49xmxk1zZ8ps+9BZIQzruGQBfBWQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796071590; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=GF2+2vd1yAvrNb4NaM8fhUSqbSKFKFgMiVeOo76sxtw=; b=Db1tArGXgSXr37MNEnWJTFeCLXb5Aea2CXTIb8SdnCWhiHBTZ9CYubVrW5pSVAHNZSAT +IYhqGME3wq2+W6G7pTz0jEmex1gLVa+qcnjmTEbyiopGQxJvZQGZzvY8Y3EORWs4uqhc Fi+Y53WrkS9NRBSd/RR5fpE4p2+4ibkyRHDsMhVAPE7sshJ9q9c2AkbmqfPInmbXqtoBD 0GFXAEOgCXvNHdMubkbrcwLqMAPpQT3JGMcsOo7lmv8XXnrYgMz5Esogl1jk6WPG2qoBc /lj4B/y2/WCReF4vjvhpCl1CQOPDbUUop4gN2JeEq8KybZ2jHbaDjbsvc916dhBgClQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=googlemail.com; spf=pass smtp.mailfrom=googlemail.com; dkim=pass header.d=googlemail.com header.i=@googlemail.com header.a=rsa-sha256 header.s=20260707 header.b=HThPMjMF; arc=none smtp.remote-ip=209.85.221.46 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE30A606A325 for ; Mon, 30 Nov 2026 20:46:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CE30A606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=googlemail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.a=rsa-sha256 header.s=20260707 header.b=HThPMjMF Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-490c3ae81d3so6998705f8f.2 for ; Mon, 30 Nov 2026 12:46:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20260707; t=1796071588; x=1796676388; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=GF2+2vd1yAvrNb4NaM8fhUSqbSKFKFgMiVeOo76sxtw=; b=HThPMjMFSBeIW2n/rFK43T4oYC38as7TK+12PeUHBq22+LCzJyOQ68qNcwGwN+8m5Z 6t4HFMvz2a3i7aUuCHSBD7ZZXNwF2EayP8DhzeL9MF1TrXh2VvwfHUQuS2GW0TMFHDrz ilaUWQs7tRoM/yQTj0k+FV68e9018k++alZgH1qjJhhG1cOWZx9TrCvnaYtOEj++dR21 Pkjxh4P88HNEPvDy6yleBSVZVMt5Gv1XHcmNcT3Wn+3NNiVR2cGcYAQK8WbdSFot1KuV cOVeo2t/WP55hvtPTRXc7Ff9mmWjZPnWxzGZcmK93rzEmdrnpGRIPe8l2GJBeLQeNNez /i0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796071588; x=1796676388; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=GF2+2vd1yAvrNb4NaM8fhUSqbSKFKFgMiVeOo76sxtw=; b=e/73BypIPopZW/zwX3w1SFqXazF7c/2jnNRdjiQuoMDSQ3PqeD+gNweXCipx1YUZGZ oQiOkPaoCYiirRerok5396NvFJPMYRJ9PaaouPF942U7HI2vwWWgmgFn2H0tDAJcVvKv vrSShay8F5X/CUBgNE+eUkXON2Jv3XmRkMqBhuDu6mYLdU5deiPLqIck6mbz5CtbizmR +CETCiIH6bPMJQ+bvf8PVAQmVMmP99jDcCyVR39GLgR09ZqAw9eqC9H2A23ikI/59/YD kwSbUnugZRBm0kfekAW1OwuWwQ1kenOOVCuF6APlHaO0LJA58Nen73m6bMXIKpcsHZIZ GBdw== X-Gm-Message-State: APuU4Z/84kHvNXaaWgA20OlLV6VWRetE2XMh9S82uVM3w15mYaHY/RQK sbtHs45eZTSguwM9qzHO9jGf+a+RiXQ1QDDzLIRxTMnjkkW6dHO1U2vCFm71GCTY1iY= X-Gm-Gg: AZFdTZcdE/WUltAVz3kHZ1pQ9LWbYnOb7csoCnd8OLcsYwKnPUw+/p25qwBFqiMgNng Q5LOz0XuaLvUyPiLNL56NLeIFmd84V9Aa5NWCBpdFYjwF4ZCuFR8OK83WgX55zfdlE9Wf5kfbRD g2bQwZNg1lgdcSRb00G6rP8gIa8OLw0M6Kn9SAnZ3BiXrSr22myngCLOUGWpSvqGznR94R9vJj3 h8CmZcf+AtB71OwBcevZO3+kLkb6dotwfTHx7+m4pXW+9Vhg2ViATNYZw2QqbafN8nF44t0jAVW AsvzR9sTtrrnYTmwY5w5PCgXw/2Y+ozLwBJVEywNqh4SQTUdeJKyZ6hMifb4ZTopmjZkihqLXyN J+xdcMDqCCdS7hp24I0dTymvTSe4d5+xLzYlxApeAPcNKByaaHkS5Pmmozb3bPcEuPb3B26TfGz KTspNUoLdh7sD6qlwYvCSsvh/LPjZ52J0Bj0EZj0ewah/HKvInpnP7oOkgxIQ8MXqyrTT7A5KRr LT7byVfqa/RXx623CK62Yf6GsBxvN6OH+GB1zgb0jjvelJlgRexYgeE/MD0oy//wO6sqf4wLttG wF4LbTjDcsZTj8dCLd8rXhD4IftoBgC3ohGb1Jbfo4hiBGfgi8zLJE+DlYvy0g8rWhseExT4Ecp bkcY= X-Received: by 2002:a05:6000:3113:b0:4c0:a100:dc7f with SMTP id ffacd0b85a97d-4c0a100dca2mr24130342f8f.43.1796071587890; Mon, 30 Nov 2026 12:46:27 -0800 (PST) Received: from sp8 (213-146-237-228.ptr.skytron.de. [213.146.237.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab6a680483sm67435844f8f.28.2026.11.30.12.46.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 12:46:27 -0800 (PST) From: Sebastian To: linux-bluetooth@vger.kernel.org Cc: Sebastian , "Claude Opus 5.5" Subject: [PATCH v2 2/4] main.conf: Add LongReportMap option to [Input] Date: Mon, 30 Nov 2026 21:45:54 +0100 Message-ID: <20261130204556.357834-3-seb.witt@googlemail.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261130204556.357834-1-seb.witt@googlemail.com> References: <20261130204556.357834-1-seb.witt@googlemail.com> X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add an option to accept HID over GATT Report Maps longer than the 512 octets an attribute value may have, as exposed by some non-compliant devices. It defaults to true, as other operating systems accept them, or to false when Testing is enabled so the limit is enforced for qualification. Co-Authored-By: Claude Opus 5.5 --- src/btd.h | 5 +++++ src/main.c | 20 ++++++++++++++++++++ src/main.conf | 7 +++++++ 3 files changed, 32 insertions(+) diff --git a/src/btd.h b/src/btd.h index 9bf310271..378c567c3 100644 --- a/src/btd.h +++ b/src/btd.h @@ -126,6 +126,10 @@ struct btd_avrcp_opts { bool volume_category; }; +struct btd_input_opts { + bool long_report_map; +}; + struct btd_advmon_opts { uint8_t rssi_sampling_period; }; @@ -172,6 +176,7 @@ struct btd_opts { struct btd_avdtp_opts avdtp; struct btd_avrcp_opts avrcp; + struct btd_input_opts input; uint8_t key_size; diff --git a/src/main.c b/src/main.c index 3a051c5a4..888fe42f6 100644 --- a/src/main.c +++ b/src/main.c @@ -185,6 +185,11 @@ static const char *avrcp_options[] = { NULL }; +static const char *input_options[] = { + "LongReportMap", + NULL +}; + static const char *advmon_options[] = { "RSSISamplingPeriod", NULL @@ -210,6 +215,7 @@ static const struct group_table { { "CSIS", csip_options }, { "AVDTP", avdtp_options }, { "AVRCP", avrcp_options }, + { "Input", input_options }, { "ChannelSounding", bcs_options }, { "AdvMon", advmon_options }, { "HDT", hdt_options }, @@ -1400,6 +1406,17 @@ static void parse_avrcp(GKeyFile *config) &btd_opts.avrcp.volume_category); } +static void parse_input(GKeyFile *config) +{ + /* Cap the Report Map to 512 octets by default when testing, e.g. + * for qualification. + */ + btd_opts.input.long_report_map = !btd_opts.testing; + + parse_config_bool(config, "Input", "LongReportMap", + &btd_opts.input.long_report_map); +} + static void parse_advmon(GKeyFile *config) { parse_config_u8(config, "AdvMon", "RSSISamplingPeriod", @@ -1457,6 +1474,7 @@ static void parse_config(GKeyFile *config) parse_csis(config); parse_avdtp(config); parse_avrcp(config); + parse_input(config); parse_le_cs_config(config); parse_advmon(config); parse_hdt(config); @@ -1514,6 +1532,8 @@ static void init_defaults(void) btd_opts.avrcp.volume_without_target = false; btd_opts.avrcp.volume_category = true; + btd_opts.input.long_report_map = true; + btd_opts.advmon.rssi_sampling_period = 0xFF; btd_opts.csis.encrypt = true; diff --git a/src/main.conf b/src/main.conf index c9906148d..451a5281f 100644 --- a/src/main.conf +++ b/src/main.conf @@ -419,6 +419,13 @@ # notifications. #VolumeCategory = true +[Input] +# Accept HID over GATT Report Maps longer than the 512 octets an attribute +# value may have, as exposed by some non-compliant devices, which other +# operating systems accept as well. +# Defaults to true, or false when Testing is enabled. +#LongReportMap = true + [Policy] # # The ReconnectUUIDs defines the set of remote services that should try -- 2.56.1