Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ v2 00/20] obexd/pbap: Update PSE support from PBAP 1.1 to 1.2
@ 2026-11-11  9:44 Jinwang Li
  2026-11-11  9:44 ` [PATCH BlueZ v2 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-11  9:44 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 that have already been 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.

Patch overview:

 1. Fix the PRODID property name in the PBAP property tables and mask.
 2. Fix the PRODID property name in the PhonebookAccess documentation.
 3. Skip a missing dummy vCard callback when counting missed calls.
 4. Keep Tracker contact grouping state within each request.
 5. Include Tracker telephone numbers bound directly to contacts.
 6. Reject an empty PullvCardListing Name in the telecom folder.
 7. Omit PHOTO from dummy responses when PropertySelector excludes it.
 8. Rebuild the cache for each vCard listing request.
 9. Restrict NewMissedCalls to the first packet of mch responses.
10. Pass backend missed call counts to vCard listing responses.
11. Separate vCard entry response handling from phonebook responses.
12. Make CONNECT application parameters available to service plugins.
13. Parse and negotiate PbapSupportedFeatures during CONNECT.
14. Generate and persist the dummy Database Identifier.
15. Include Database Identifier in phonebook, listing and entry
    responses.
16. Maintain primary and secondary folder version counters in dummy.
17. Include negotiated folder version counters in phonebook and listing
    responses.
18. Apply vCardSelector filtering, counting and pagination in all
    backends.
19. Send only PHOTO properties in the Contact Image Default Format and
    advertise it in the PSE feature mask.
20. Update the SDP supported features and PBAP profile version.

Changes for 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 the 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 PullvCardListing 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                   | 565 ++++++++++++++++++++++---
 obexd/plugins/phonebook-dummy.c        | 548 ++++++++++++++++++++++--
 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, 1808 insertions(+), 286 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 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-11 15:50 UTC | newest]

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