Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] client/btpclient: Improve GATT read
@ 2026-09-01 12:54 Frédéric Danis
  2026-09-01 15:04 ` [BlueZ] " bluez.test.bot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Frédéric Danis @ 2026-09-01 12:54 UTC (permalink / raw)
  To: linux-bluetooth

BAP/UCL/CGITT/* tests request to read the different Sink/Source
Audio Stream Endpoint characteristics.
The first ReadValue call triggers read of the other characteristics
and PTS, which tracks the read requests, may disconnect before the
following explicit ReadValue has been replied.

First try to read the characteristic value from the proxy cache
before calling ReadValue explicitly.
---
 client/btpclient/gatt.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/client/btpclient/gatt.c b/client/btpclient/gatt.c
index d384b9c74..bd9145173 100644
--- a/client/btpclient/gatt.c
+++ b/client/btpclient/gatt.c
@@ -376,6 +376,7 @@ static void btp_gatt_read(uint8_t index, const void *param,
 	uint8_t status = BTP_ERROR_FAIL;
 	bool prop;
 	struct gatt_attribute *characteristic;
+	struct l_dbus_message_iter iter;
 
 	if (!adapter) {
 		status = BTP_ERROR_INVALID_INDEX;
@@ -399,6 +400,30 @@ static void btp_gatt_read(uint8_t index, const void *param,
 	if (!characteristic)
 		goto failed;
 
+	/* First try to read the property value from the proxy cache */
+	if (l_dbus_proxy_get_property(characteristic->proxy, "Value", "ay",
+								&iter)) {
+		uint8_t *data;
+		uint32_t n;
+
+		if (l_dbus_message_iter_get_fixed_array(&iter, &data, &n) &&
+								n > 0) {
+			struct btp_gatt_read_rp *rp;
+
+			rp = malloc(sizeof(struct btp_gatt_read_rp) + n);
+			rp->response = 0;
+			rp->len = n;
+			memcpy(rp->data, data, n);
+
+			btp_send(btp, BTP_GATT_SERVICE, BTP_OP_GATT_READ,
+				adapter->index,
+				sizeof(struct btp_gatt_read_rp) + n, rp);
+
+			free(rp);
+			return;
+		}
+	}
+
 	l_dbus_proxy_method_call(characteristic->proxy, "ReadValue",
 					gatt_read_setup, gatt_read_reply,
 					adapter, NULL);
-- 
2.43.0


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

* RE: [BlueZ] client/btpclient: Improve GATT read
  2026-09-01 12:54 [PATCH BlueZ] client/btpclient: Improve GATT read Frédéric Danis
@ 2026-09-01 15:04 ` bluez.test.bot
  2026-09-16 14:21 ` bluez.test.bot
  2026-09-23 19:30 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2026-09-01 15:04 UTC (permalink / raw)
  To: linux-bluetooth, frederic.danis

[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1155344

---Test result---

Test Summary:
CheckPatch                    PASS      0.95 seconds
GitLint                       PASS      0.21 seconds
BuildEll                      PASS      21.05 seconds
BluezMake                     PASS      630.53 seconds
CheckSmatch                   WARNING   330.70 seconds
bluezmakeextell               PASS      105.59 seconds
IncrementalBuild              PASS      635.85 seconds
ScanBuild                     PASS      1031.83 seconds

Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
client/btpclient/gatt.c: note: in included file:./src/shared/btp.h:335:41: warning: array of flexible structures./src/shared/btp.h:340:55: warning: array of flexible structures./src/shared/btp.h:363:47: warning: array of flexible structures./src/shared/btp.h:392:42: warning: array of flexible structures


https://github.com/bluez/bluez/pull/2465

---
Regards,
Linux Bluetooth


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

* RE: [BlueZ] client/btpclient: Improve GATT read
  2026-09-01 12:54 [PATCH BlueZ] client/btpclient: Improve GATT read Frédéric Danis
  2026-09-01 15:04 ` [BlueZ] " bluez.test.bot
@ 2026-09-16 14:21 ` bluez.test.bot
  2026-09-23 19:30 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2026-09-16 14:21 UTC (permalink / raw)
  To: linux-bluetooth, frederic.danis

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

This is an automated email and please do not reply to this email.

Dear Submitter,

This series was picked up by the CI more than 2 weeks ago and the pull
request created for it is still open, which means the series was never
applied to the tree.

   Series:       [BlueZ] client/btpclient: Improve GATT read
   Pull Request: https://github.com/bluez/bluez/pull/2465
   Created:      2026-09-01 14:17:22+00:00

The pull request has been closed and no further action is taken on this
series.

If the change should still be considered, it must be resent to the Linux
Bluetooth mailing list (linux-bluetooth@vger.kernel.org) so that it is
picked up again.

---
Regards,
Linux Bluetooth

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

* Re: [PATCH BlueZ] client/btpclient: Improve GATT read
  2026-09-01 12:54 [PATCH BlueZ] client/btpclient: Improve GATT read Frédéric Danis
  2026-09-01 15:04 ` [BlueZ] " bluez.test.bot
  2026-09-16 14:21 ` bluez.test.bot
@ 2026-09-23 19:30 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2026-09-23 19:30 UTC (permalink / raw)
  To: =?utf-8?b?RnLDqWTDqXJpYyBEYW5pcyA8ZnJlZGVyaWMuZGFuaXNAY29sbGFib3JhLmNvbT4=?=
  Cc: linux-bluetooth

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Tue,  1 Sep 2026 14:54:40 +0200 you wrote:
> BAP/UCL/CGITT/* tests request to read the different Sink/Source
> Audio Stream Endpoint characteristics.
> The first ReadValue call triggers read of the other characteristics
> and PTS, which tracks the read requests, may disconnect before the
> following explicit ReadValue has been replied.
> 
> First try to read the characteristic value from the proxy cache
> before calling ReadValue explicitly.
> 
> [...]

Here is the summary with links:
  - [BlueZ] client/btpclient: Improve GATT read
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=97431abc432f

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2026-09-23 19:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-01 12:54 [PATCH BlueZ] client/btpclient: Improve GATT read Frédéric Danis
2026-09-01 15:04 ` [BlueZ] " bluez.test.bot
2026-09-16 14:21 ` bluez.test.bot
2026-09-23 19:30 ` [PATCH BlueZ] " patchwork-bot+bluetooth

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