Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ v3 00/20] obexd/pbap: Update PSE support from PBAP 1.1 to 1.2
@ 2026-11-16  9:06 Jinwang Li
  2026-11-16  9:06 ` [PATCH v3 01/20] obexd/pbap: Fix PRODID property name Jinwang Li
                   ` (19 more replies)
  0 siblings, 20 replies; 28+ messages in thread
From: Jinwang Li @ 2026-11-16  9:06 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz
  Cc: cheng.jiang, wei.deng, shuai.zhang, jinwang.li, xiuzhuo.shang

This series updates the obexd PBAP Phone Book Server Equipment (PSE)
from PBAP 1.1 to PBAP 1.2, following the PBAP 1.2.3 specification.

It adds PbapSupportedFeatures negotiation, Database Identifier and
primary and secondary Folder Version Counter response parameters, and
vCardSelector filtering for phonebook and vCard listing requests. It
also advertises Contact Image Default Format and updates the SDP profile
version to 0x0102.

The dummy backend persists the Database Identifier and folder counters.
The ebook and Tracker backends report zero values to indicate that these
values are not persistent. vCardSelector is implemented in all three
backends.

The series also fixes phonebook backend and request handling issues,
refreshes the listing cache for each request, and adds NewMissedCalls to
vCard listing responses. NewMissedCalls is limited to mch responses.

Testing was performed on the OE-Core wrynose branch (Yocto Project 6.0),
together with prerequisite patches already merged upstream. The dummy,
ebook, and Tracker backends were all functionally tested. The dummy
backend was also tested against the PBAP PSE PTS test cases covered by
this series.

Changes in v3:
 - Rebased the series.
 - Patch 6: Shorten the subject without changing functionality.
 - Patch 7: Preserve quoted-printable PHOTO continuations and correctly
   parse quoted parameter values while filtering unselected photos.
 - Patch 16: Associate persisted metadata with each virtual phonebook
   folder and reject incomplete folder scans when computing digests.
 - Patch 17: Move folder-specific metadata handling into patch 16. Keep
   this response patch limited to emitting negotiated counters.
 - Patch 18: Apply vCardSelector when calculating a PullPhoneBook size
   response with MaxListCount set to zero.
 - Patch 19: Handle folded headers, quoted parameter values, and
   quoted-printable continuations when validating default-format photos.
   Clarify that returned photos must use the PBAP default image format.
 - V2 link:
   https://lore.kernel.org/all/20261111094425.1444893-1-jinwang.li@oss.qualcomm.com/

Changes in v2:
 - Rebased the patch.
 - Patches 1-2: Add the PRODID fixes.
 - Patch 7: Also remove the unindented BASE64 body of an unselected
   PHOTO property from dummy backend responses.
 - Patch 16: Do not refresh the folder version counters for
   PullvCardEntry.
 - Patch 18: Use PRODID in the vCardSelector property table.
 - Patch 19: Send only PHOTO properties that are BASE64 encoded JPEG
   images of at most 300x300 pixels and 50 KiB.
 - V1 link:
   https://lore.kernel.org/all/20261104083429.4111632-1-jinwang.li@oss.qualcomm.com/

Jinwang Li (20):
  obexd/pbap: Fix PRODID property name
  doc: Fix PRODID property name
  obexd/pbap: Fix crash counting vCards in dummy backend
  obexd/pbap: Fix Tracker contact grouping across requests
  obexd/pbap: Include directly bound Tracker telephone numbers
  obexd/pbap: Reject listing without Name in telecom folder
  obexd/pbap: Fix unselected PHOTO in dummy responses
  obexd/pbap: Refresh cache for each vCard listing
  obexd/pbap: Limit NewMissedCalls to mch responses
  obexd/pbap: Add NewMissedCalls to vCard listing responses
  obexd/pbap: Separate vCard entry response handling
  obexd: Parse application parameters in CONNECT request
  obexd/pbap: Parse PbapSupportedFeatures in connect request
  obexd/pbap: Add persistent database identifier
  obexd/pbap: Include database identifier in responses
  obexd/pbap: Add folder version counters
  obexd/pbap: Include folder version counters in responses
  obexd/pbap: Add vCardSelector support
  obexd/pbap: Support Contact Image Default Format
  profile: Update PBAP PSE version and features

 Makefile.obexd                         |   2 +
 doc/org.bluez.obex.PhonebookAccess.rst |   2 +-
 obexd/client/pbap.c                    |   2 +-
 obexd/plugins/pbap.c                   | 778 +++++++++++++++++++++++--
 obexd/plugins/phonebook-dummy.c        | 745 +++++++++++++++++++++--
 obexd/plugins/phonebook-ebook.c        |  88 ++-
 obexd/plugins/phonebook-metadata.c     | 257 ++++++++
 obexd/plugins/phonebook-metadata.h     |  52 ++
 obexd/plugins/phonebook-tracker.c      | 367 +++++++-----
 obexd/plugins/phonebook.c              |   8 +
 obexd/plugins/phonebook.h              |  84 ++-
 obexd/plugins/vcard.c                  |  71 ++-
 obexd/plugins/vcard.h                  |   2 +
 obexd/src/obex.c                       |  42 +-
 src/profile.c                          |   4 +-
 15 files changed, 2209 insertions(+), 295 deletions(-)
 create mode 100644 obexd/plugins/phonebook-metadata.c
 create mode 100644 obexd/plugins/phonebook-metadata.h

-- 
2.34.1


^ permalink raw reply	[flat|nested] 28+ messages in thread
* [PATCH BlueZ v2 01/20] obexd/pbap: Fix PRODID property name
@ 2026-11-11  9:44 Jinwang Li
  2026-11-11 12:15 ` obexd/pbap: Update PSE support from PBAP 1.1 to 1.2 bluez.test.bot
  0 siblings, 1 reply; 28+ messages in thread
From: Jinwang Li @ 2026-11-11  9:44 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz
  Cc: cheng.jiang, wei.deng, shuai.zhang, jinwang.li, xiuzhuo.shang

Use the standard PRODID spelling in the PBAP property tables and filter
mask so PropertySelector and vCardSelector bit 25 match the property.

Fixes: 3a1e6b3e8dc1 ("obexd: Implement Filter related function for PBAP client")
Fixes: 4f805f5e09f3 ("obexd: Add EVCard filter for PullPhoneBook")
Fixes: c8e98708ea3a ("obexd: Add support to all fields required by vCard 3.0")
Assisted-by: Claude:claude-sonnet-5-5
---
 obexd/client/pbap.c             | 2 +-
 obexd/plugins/phonebook-ebook.c | 2 +-
 obexd/plugins/vcard.c           | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c
index 1970d3357..fbd843a4a 100644
--- a/obexd/client/pbap.c
+++ b/obexd/client/pbap.c
@@ -107,7 +107,7 @@ static const char *filter_list[] = {
 	"KEY",
 	"NICKNAME",
 	"CATEGORIES",
-	"PROID",
+	"PRODID",
 	"CLASS",
 	"SORT-STRING",
 	"X-IRMC-CALL-DATETIME",
diff --git a/obexd/plugins/phonebook-ebook.c b/obexd/plugins/phonebook-ebook.c
index beb72b22b..d8621b8f9 100644
--- a/obexd/plugins/phonebook-ebook.c
+++ b/obexd/plugins/phonebook-ebook.c
@@ -81,7 +81,7 @@ static const char *attribute_mask[] = {
 		"KEY",
 		"NICKNAME",
 /* 24 */	"CATEGORIES",
-		"PROID",
+		"PRODID",
 		"CLASS",
 		"SORT-STRING",
 /* 28 */	"X-IRMC-CALL-DATETIME",
diff --git a/obexd/plugins/vcard.c b/obexd/plugins/vcard.c
index 0a727b729..3827602cc 100644
--- a/obexd/plugins/vcard.c
+++ b/obexd/plugins/vcard.c
@@ -54,7 +54,7 @@
 #define FILTER_KEY (1 << 22)
 #define FILTER_NICKNAME (1 << 23)
 #define FILTER_CATEGORIES (1 << 24)
-#define FILTER_PROID (1 << 25)
+#define FILTER_PRODID (1 << 25)
 #define FILTER_CLASS (1 << 26)
 #define FILTER_SORT_STRING (1 << 27)
 #define FILTER_X_IRMC_CALL_DATETIME (1 << 28)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [PATCH v1 01/18] obexd/pbap: Fix crash counting vCards in dummy backend
@ 2026-11-04  8:34 Jinwang Li
  2026-11-04 16:55 ` obexd/pbap: Update PSE support from PBAP 1.1 to 1.2 bluez.test.bot
  0 siblings, 1 reply; 28+ messages in thread
From: Jinwang Li @ 2026-11-04  8:34 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: cheng.jiang, quic_chezhou, wei.deng, shuai.zhang, mengshi.wu,
	jinwang.li, xiuzhuo.shang

Skip the vCard callback when none is given. Counting the vCards of the
missed calls folder passes none and crashed.

Fixes: f34bc5d924ec ("obexd: Add PBAP PullPhoneBook function for dummy back-end")
Assisted-by: Claude:claude-sonnet-5-5
---
 obexd/plugins/phonebook-dummy.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/obexd/plugins/phonebook-dummy.c b/obexd/plugins/phonebook-dummy.c
index 0a0ae24ff..14075b502 100644
--- a/obexd/plugins/phonebook-dummy.c
+++ b/obexd/plugins/phonebook-dummy.c
@@ -175,7 +175,9 @@ static int foreach_vcard(DIR *dp, vcard_func_t func, uint16_t offset,
 
 		v = Parse_MIME_FromFile(fp);
 		if (v != NULL) {
-			func(filename, v, user_data);
+			if (func)
+				func(filename, v, user_data);
+
 			deleteVObject(v);
 			n++;
 		}
-- 
2.34.1


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

end of thread, other threads:[~2026-11-16 22:07 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16  9:06 [PATCH BlueZ v3 00/20] obexd/pbap: Update PSE support from PBAP 1.1 to 1.2 Jinwang Li
2026-11-16  9:06 ` [PATCH v3 01/20] obexd/pbap: Fix PRODID property name Jinwang Li
2026-11-16 22:07   ` obexd/pbap: Update PSE support from PBAP 1.1 to 1.2 bluez.test.bot
2026-11-16  9:06 ` [PATCH v3 02/20] doc: Fix PRODID property name Jinwang Li
2026-11-16  9:06 ` [PATCH v3 03/20] obexd/pbap: Fix crash counting vCards in dummy backend Jinwang Li
2026-11-16  9:06 ` [PATCH v3 04/20] obexd/pbap: Fix Tracker contact grouping across requests Jinwang Li
2026-11-16  9:06 ` [PATCH v3 05/20] obexd/pbap: Include directly bound Tracker telephone numbers Jinwang Li
2026-11-16  9:06 ` [PATCH v3 06/20] obexd/pbap: Reject listing without Name in telecom folder Jinwang Li
2026-11-16  9:06 ` [PATCH v3 07/20] obexd/pbap: Fix unselected PHOTO in dummy responses Jinwang Li
2026-11-16  9:06 ` [PATCH v3 08/20] obexd/pbap: Refresh cache for each vCard listing Jinwang Li
2026-11-16  9:06 ` [PATCH v3 09/20] obexd/pbap: Limit NewMissedCalls to mch responses Jinwang Li
2026-11-16  9:06 ` [PATCH v3 10/20] obexd/pbap: Add NewMissedCalls to vCard listing responses Jinwang Li
2026-11-16  9:06 ` [PATCH v3 11/20] obexd/pbap: Separate vCard entry response handling Jinwang Li
2026-11-16  9:06 ` [PATCH v3 12/20] obexd: Parse application parameters in CONNECT request Jinwang Li
2026-11-16  9:06 ` [PATCH v3 13/20] obexd/pbap: Parse PbapSupportedFeatures in connect request Jinwang Li
2026-11-16  9:06 ` [PATCH v3 14/20] obexd/pbap: Add persistent database identifier Jinwang Li
2026-11-16  9:06 ` [PATCH v3 15/20] obexd/pbap: Include database identifier in responses Jinwang Li
2026-11-16  9:06 ` [PATCH v3 16/20] obexd/pbap: Add folder version counters Jinwang Li
2026-11-16  9:06 ` [PATCH v3 17/20] obexd/pbap: Include folder version counters in responses Jinwang Li
2026-11-16  9:06 ` [PATCH v3 18/20] obexd/pbap: Add vCardSelector support Jinwang Li
2026-11-16  9:06 ` [PATCH v3 19/20] obexd/pbap: Support Contact Image Default Format Jinwang Li
2026-11-16  9:06 ` [PATCH v3 20/20] profile: Update PBAP PSE version and features Jinwang Li
  -- strict thread matches above, loose matches on Subject: below --
2026-11-11  9:44 [PATCH BlueZ v2 01/20] obexd/pbap: Fix PRODID property name Jinwang Li
2026-11-11 12:15 ` obexd/pbap: Update PSE support from PBAP 1.1 to 1.2 bluez.test.bot
2026-11-04  8:34 [PATCH v1 01/18] obexd/pbap: Fix crash counting vCards in dummy backend Jinwang Li
2026-11-04 16:55 ` obexd/pbap: Update PSE support from PBAP 1.1 to 1.2 bluez.test.bot
2026-11-05 15:37   ` Luiz Augusto von Dentz
2026-11-09  9:34     ` Jinwang Li
2026-11-09 14:31       ` Luiz Augusto von Dentz
2026-11-10  2:00         ` Jinwang Li

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