Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Phone Book Access Profile (PBAP)

Phone Book Access Profile (PBAP). More...

Data Structures

struct  bt_pbap_pce_cb
 PBAP PCE (Phone Book Client Equipment) callback operations structure. More...
struct  bt_pbap_pce
 PBAP PCE (Phone Book Client Equipment) structure. More...
struct  bt_pbap_pse_cb
 PBAP PSE (Phone Book Server Equipment) callback operations structure. More...
struct  bt_pbap_pse_rfcomm
 PBAP PSE RFCOMM server structure. More...
struct  bt_pbap_pse_l2cap
 PBAP PSE L2CAP server structure. More...
struct  bt_pbap_pse
 PBAP PSE (Phone Book Server Equipment) structure. More...

Macros

#define BT_PBAP_UUID
 PBAP target UUID for service identification.
#define BT_PBAP_PULL_PHONE_BOOK_TYPE   "x-bt/phonebook"
 OBEX type header for pull phone book operation.
#define BT_PBAP_PULL_VCARD_LISTING_TYPE   "x-bt/vcard-listing"
 OBEX type header for pull vCard listing operation.
#define BT_PBAP_PULL_VCARD_ENTRY_TYPE   "x-bt/vcard"
 OBEX type header for pull vCard entry operation.
#define BT_PBAP_SET_PHONE_BOOK_FLAGS_UP   (BT_OBEX_SETPATH_FLAG_BACKUP | BT_OBEX_SETPATH_FLAG_NO_CREATE)
 Set phone book flags: Navigate up to parent directory.
#define BT_PBAP_SET_PHONE_BOOK_FLAGS_DOWN_OR_ROOT   BT_OBEX_SETPATH_FLAG_NO_CREATE
 Set phone book flags: Navigate down to child directory or to root.

Enumerations

enum  bt_pbap_rsp_code {
  BT_PBAP_RSP_CODE_CONTINUE = BT_OBEX_RSP_CODE_CONTINUE , BT_PBAP_RSP_CODE_OK = BT_OBEX_RSP_CODE_OK , BT_PBAP_RSP_CODE_SUCCESS = BT_OBEX_RSP_CODE_SUCCESS , BT_PBAP_RSP_CODE_BAD_REQ = BT_OBEX_RSP_CODE_BAD_REQ ,
  BT_PBAP_RSP_CODE_UNAUTH = BT_OBEX_RSP_CODE_UNAUTH , BT_PBAP_RSP_CODE_FORBIDDEN = BT_OBEX_RSP_CODE_FORBIDDEN , BT_PBAP_RSP_CODE_NOT_FOUND = BT_OBEX_RSP_CODE_NOT_FOUND , BT_PBAP_RSP_CODE_NOT_ACCEPT = BT_OBEX_RSP_CODE_NOT_ACCEPT ,
  BT_PBAP_RSP_CODE_PRECON_FAIL = BT_OBEX_RSP_CODE_PRECON_FAIL , BT_PBAP_RSP_CODE_NOT_IMPL = BT_OBEX_RSP_CODE_NOT_IMPL , BT_PBAP_RSP_CODE_UNAVAIL = BT_OBEX_RSP_CODE_UNAVAIL
}
 PBAP response codes. More...
enum  bt_pbap_appl_param_order { BT_PBAP_APPL_PARAM_ORDER_INDEXED = 0x00 , BT_PBAP_APPL_PARAM_ORDER_ALPHABETICAL = 0x01 , BT_PBAP_APPL_PARAM_ORDER_PHONETIC = 0x02 }
 PBAP application parameter Order parameter values. More...
enum  bt_pbap_appl_param_search_property { BT_PBAP_APPL_PARAM_SEARCH_PROPERTY_NAME = 0x00 , BT_PBAP_APPL_PARAM_SEARCH_PROPERTY_NUMBER = 0x01 , BT_PBAP_APPL_PARAM_SEARCH_PROPERTY_SOUND = 0x02 }
 PBAP application parameter Search Property parameter values. More...
enum  bt_pbap_appl_param_format { BT_PBAP_APPL_PARAM_FORMAT_2_1 = 0x00 , BT_PBAP_APPL_PARAM_FORMAT_3_0 = 0x01 }
 PBAP application parameter Format parameter values. More...
enum  bt_pbap_appl_param_vcard_selector_operator { BT_PBAP_APPL_PARAM_VCARD_SELECTOR_OPERATOR_OR = 0x00 , BT_PBAP_APPL_PARAM_VCARD_SELECTOR_OPERATOR_AND = 0x01 }
 PBAP application parameter vCard Selector Operator parameter values. More...
enum  bt_pbap_appl_param_reset_new_missed_calls { BT_PBAP_APPL_PARAM_RESET_NEW_MISSED_CALLS = 0x01 }
 PBAP application parameter reset neww missed calls parameter values. More...
enum  bt_pbap_appl_param_property_mask {
  BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_VERSION = BIT64(0) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_FN = BIT64(1) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_N = BIT64(2) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_PHOTO = BIT64(3) ,
  BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_BDAY = BIT64(4) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_ADR = BIT64(5) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_LABEL = BIT64(6) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_TEL = BIT64(7) ,
  BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_EMAIL = BIT64(8) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_MAILER = BIT64(9) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_TZ = BIT64(10) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_GEO = BIT64(11) ,
  BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_TITLE = BIT64(12) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_ROLE = BIT64(13) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_LOGO = BIT64(14) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_AGENT = BIT64(15) ,
  BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_ORG = BIT64(16) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_NOTE = BIT64(17) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_REV = BIT64(18) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_SOUND = BIT64(19) ,
  BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_URL = BIT64(20) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_UID = BIT64(21) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_KEY = BIT64(22) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_NICKNAME = BIT64(23) ,
  BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_CATEGORIES = BIT64(24) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_PRODID = BIT64(25) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_CLASS = BIT64(26) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_SORT_STRING = BIT64(27) ,
  BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_X_IRMC_CALL_DATETIME = BIT64(28) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_X_BT_SPEEDDIALKEY = BIT64(29) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_X_BT_UCI = BIT64(30) , BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_X_BT_UID = BIT64(31) ,
  BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_PROPRIETARY_FILTER = BIT64(39)
}
 PBAP property bitmask. More...
enum  bt_pbap_appl_param_tag_id {
  BT_PBAP_APPL_PARAM_TAG_ID_ORDER = 0x01 , BT_PBAP_APPL_PARAM_TAG_ID_SEARCH_VALUE = 0x02 , BT_PBAP_APPL_PARAM_TAG_ID_SEARCH_PROPERTY = 0x03 , BT_PBAP_APPL_PARAM_TAG_ID_MAX_LIST_COUNT = 0x04 ,
  BT_PBAP_APPL_PARAM_TAG_ID_LIST_START_OFFSET = 0x05 , BT_PBAP_APPL_PARAM_TAG_ID_PROPERTY_SELECTOR = 0x06 , BT_PBAP_APPL_PARAM_TAG_ID_FORMAT = 0x07 , BT_PBAP_APPL_PARAM_TAG_ID_PHONEBOOK_SIZE = 0x08 ,
  BT_PBAP_APPL_PARAM_TAG_ID_NEW_MISSED_CALLS = 0x09 , BT_PBAP_APPL_PARAM_TAG_ID_PRIMARY_FOLDER_VERSION = 0x0a , BT_PBAP_APPL_PARAM_TAG_ID_SECONDARY_FOLDER_VERSION = 0x0b , BT_PBAP_APPL_PARAM_TAG_ID_VCARD_SELECTOR = 0x0c ,
  BT_PBAP_APPL_PARAM_TAG_ID_DATABASE_IDENTIFIER = 0x0d , BT_PBAP_APPL_PARAM_TAG_ID_VCARD_SELECTOR_OPERATOR = 0x0e , BT_PBAP_APPL_PARAM_TAG_ID_RESET_NEW_MISSED_CALLS = 0x0f , BT_PBAP_APPL_PARAM_TAG_ID_SUPPORTED_FEATURES = 0x10
}
 PBAP application parameter tag IDs. More...
enum  bt_pbap_supported_feature {
  BT_PBAP_SUPPORTED_FEATURE_DOWNLOAD = BIT(0) , BT_PBAP_SUPPORTED_FEATURE_BROWSING = BIT(1) , BT_PBAP_SUPPORTED_FEATURE_DATABASE_IDENTIFIER = BIT(2) , BT_PBAP_SUPPORTED_FEATURE_FOLDER_VERSION_COUNTERS = BIT(3) ,
  BT_PBAP_SUPPORTED_FEATURE_VCARD_SELECTOR = BIT(4) , BT_PBAP_SUPPORTED_FEATURE_ENHANCED_MISSED_CALLS = BIT(5) , BT_PBAP_SUPPORTED_FEATURE_UCI_VCARD_PROPERTY = BIT(6) , BT_PBAP_SUPPORTED_FEATURE_UID_VCARD_PROPERTY = BIT(7) ,
  BT_PBAP_SUPPORTED_FEATURE_CONTACT_REFERENCING = BIT(8) , BT_PBAP_SUPPORTED_FEATURE_DEFAULT_CONTACT_IMAGE = BIT(9)
}
 PBAP supported features bitmask. More...
enum  bt_pbap_supported_repositories { BT_PBAP_SUPPORTED_REPOSITORIES_LOCAL_PHONE_BOOK = BIT(0) , BT_PBAP_SUPPORTED_REPOSITORIES_SIM = BIT(1) , BT_PBAP_SUPPORTED_REPOSITORIES_SPEED_DIAL = BIT(2) , BT_PBAP_SUPPORTED_REPOSITORIES_FAVORITES = BIT(3) }
 PBAP supported repositories bitmask. More...

Functions

int bt_pbap_pce_rfcomm_connect (struct bt_conn *conn, struct bt_pbap_pce *pbap_pce, struct bt_pbap_pce_cb *cb, uint8_t channel)
 PCE Connect to PSE over RFCOMM transport.
int bt_pbap_pce_rfcomm_disconnect (struct bt_pbap_pce *pbap_pce)
 Disconnect PBAP PCE RFCOMM transport.
int bt_pbap_pce_l2cap_connect (struct bt_conn *conn, struct bt_pbap_pce *pbap_pce, struct bt_pbap_pce_cb *cb, uint16_t psm)
 Connect PBAP PCE client over L2CAP transport.
int bt_pbap_pce_l2cap_disconnect (struct bt_pbap_pce *pbap_pce)
 Disconnect PBAP PCE L2CAP transport.
struct net_bufbt_pbap_pce_create_pdu (struct bt_pbap_pce *pbap_pce, struct net_buf_pool *pool)
 Allocate buffer from pool with reserved headroom for PBAP PCE.
int bt_pbap_pce_connect (struct bt_pbap_pce *pbap_pce, uint16_t mopl, struct net_buf *buf)
 Establish PBAP protocol connection from PCE client to PSE server.
int bt_pbap_pce_disconnect (struct bt_pbap_pce *pbap_pce, struct net_buf *buf)
 Disconnect PBAP connection from PBAP client PCE.
int bt_pbap_pce_pull_phone_book (struct bt_pbap_pce *pbap_pce, struct net_buf *buf)
 Pull phone book from PBAP server PSE.
int bt_pbap_pce_pull_vcard_listing (struct bt_pbap_pce *pbap_pce, struct net_buf *buf)
 Pull vCard listing from PBAP server PSE.
int bt_pbap_pce_pull_vcard_entry (struct bt_pbap_pce *pbap_pce, struct net_buf *buf)
 Pull specific vCard entry from PBAP server PSE.
int bt_pbap_pce_set_phone_book (struct bt_pbap_pce *pbap_pce, uint8_t flags, struct net_buf *buf)
 Set current phone book on PBAP server PSE.
int bt_pbap_pce_abort (struct bt_pbap_pce *pbap_pce, struct net_buf *buf)
 Abort current operation on PBAP server PSE.
struct net_bufbt_pbap_pse_create_pdu (struct bt_pbap_pse *pbap_pse, struct net_buf_pool *pool)
 Allocate buffer from pool with reserved headroom for PBAP PSE.
int bt_pbap_pse_rfcomm_register (struct bt_pbap_pse_rfcomm *server)
 Register PBAP PSE RFCOMM server.
int bt_pbap_pse_l2cap_register (struct bt_pbap_pse_l2cap *server)
 Register PBAP PSE L2CAP server.
int bt_pbap_pse_register (struct bt_pbap_pse *pbap_pse, struct bt_pbap_pse_cb *cb)
 Register PBAP PSE instance.
int bt_pbap_pse_connect_rsp (struct bt_pbap_pse *pbap_pse, uint16_t mopl, uint8_t rsp_code, struct net_buf *buf)
 Send connect response from PBAP PSE.
int bt_pbap_pse_disconnect_rsp (struct bt_pbap_pse *pbap_pse, uint8_t rsp_code, struct net_buf *buf)
 Send disconnect response from PBAP PSE.
int bt_pbap_pse_pull_phone_book_rsp (struct bt_pbap_pse *pbap_pse, uint8_t rsp_code, struct net_buf *buf)
 Send pull phone book response from PBAP PSE.
int bt_pbap_pse_pull_vcard_listing_rsp (struct bt_pbap_pse *pbap_pse, uint8_t rsp_code, struct net_buf *buf)
 Send pull vCard listing response from PBAP PSE.
int bt_pbap_pse_pull_vcard_entry_rsp (struct bt_pbap_pse *pbap_pse, uint8_t rsp_code, struct net_buf *buf)
 Send pull vCard entry response from PBAP PSE.
int bt_pbap_pse_set_phone_book_rsp (struct bt_pbap_pse *pbap_pse, uint8_t rsp_code, struct net_buf *buf)
 Send set phone book response from PBAP PSE.
int bt_pbap_pse_abort_rsp (struct bt_pbap_pse *pbap_pse, uint8_t rsp_code, struct net_buf *buf)
 Send abort response from PBAP PSE.
int bt_pbap_calculate_nonce (const uint8_t *pwd, uint8_t nonce[BT_OBEX_CHALLENGE_TAG_NONCE_LEN])
 Calculate authentication nonce for PBAP challenge.
int bt_pbap_calculate_rsp_digest (const uint8_t *pwd, const uint8_t nonce[BT_OBEX_CHALLENGE_TAG_NONCE_LEN], uint8_t rsp_digest[BT_OBEX_RESPONSE_TAG_REQ_DIGEST_LEN])
 Calculate response digest for PBAP authentication.
int bt_pbap_verify_authentication (uint8_t nonce[BT_OBEX_CHALLENGE_TAG_NONCE_LEN], uint8_t rsp_digest[BT_OBEX_RESPONSE_TAG_REQ_DIGEST_LEN], const uint8_t *pwd)
 Verify authentication response.

Detailed Description

Phone Book Access Profile (PBAP).

Macro Definition Documentation

◆ BT_PBAP_PULL_PHONE_BOOK_TYPE

#define BT_PBAP_PULL_PHONE_BOOK_TYPE   "x-bt/phonebook"

#include <zephyr/bluetooth/classic/pbap.h>

OBEX type header for pull phone book operation.

◆ BT_PBAP_PULL_VCARD_ENTRY_TYPE

#define BT_PBAP_PULL_VCARD_ENTRY_TYPE   "x-bt/vcard"

#include <zephyr/bluetooth/classic/pbap.h>

OBEX type header for pull vCard entry operation.

◆ BT_PBAP_PULL_VCARD_LISTING_TYPE

#define BT_PBAP_PULL_VCARD_LISTING_TYPE   "x-bt/vcard-listing"

#include <zephyr/bluetooth/classic/pbap.h>

OBEX type header for pull vCard listing operation.

◆ BT_PBAP_SET_PHONE_BOOK_FLAGS_DOWN_OR_ROOT

#define BT_PBAP_SET_PHONE_BOOK_FLAGS_DOWN_OR_ROOT   BT_OBEX_SETPATH_FLAG_NO_CREATE

#include <zephyr/bluetooth/classic/pbap.h>

Set phone book flags: Navigate down to child directory or to root.

OBEX setpath flag used to navigate down to a child directory or to the root directory in the phone book hierarchy.

◆ BT_PBAP_SET_PHONE_BOOK_FLAGS_UP

#define BT_PBAP_SET_PHONE_BOOK_FLAGS_UP   (BT_OBEX_SETPATH_FLAG_BACKUP | BT_OBEX_SETPATH_FLAG_NO_CREATE)

#include <zephyr/bluetooth/classic/pbap.h>

Set phone book flags: Navigate up to parent directory.

Combination of OBEX setpath flags used to navigate to the parent directory in the phone book hierarchy.

◆ BT_PBAP_UUID

#define BT_PBAP_UUID

#include <zephyr/bluetooth/classic/pbap.h>

Value:
(const struct bt_uuid_128 *)BT_UUID_DECLARE_128( \
BT_UUID_128_ENCODE(0x796135f0, 0xf0c5, 0x11d8, 0x0966, 0x0800200c9a66))
#define BT_UUID_128_ENCODE(w32, w1, w2, w3, w48)
Encode 128 bit UUID into array values in little-endian format.
Definition uuid.h:193
#define BT_UUID_DECLARE_128(value...)
Helper to declare a 128-bit UUID inline.
Definition uuid.h:148
Definition uuid.h:68

PBAP target UUID for service identification.

128-bit UUID (796135f0-f0c5-11d8-0966-0800200c9a66) used to identify the PBAP service during OBEX connection establishment.

Enumeration Type Documentation

◆ bt_pbap_appl_param_format

#include <zephyr/bluetooth/classic/pbap.h>

PBAP application parameter Format parameter values.

Enumerator
BT_PBAP_APPL_PARAM_FORMAT_2_1 

vCard version 2.1.

BT_PBAP_APPL_PARAM_FORMAT_3_0 

vCard version 3.0.

◆ bt_pbap_appl_param_order

#include <zephyr/bluetooth/classic/pbap.h>

PBAP application parameter Order parameter values.

Enumerator
BT_PBAP_APPL_PARAM_ORDER_INDEXED 

Indexed order.

BT_PBAP_APPL_PARAM_ORDER_ALPHABETICAL 

Alphabetical order.

BT_PBAP_APPL_PARAM_ORDER_PHONETIC 

Phonetic order.

◆ bt_pbap_appl_param_property_mask

#include <zephyr/bluetooth/classic/pbap.h>

PBAP property bitmask.

Enumerator
BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_VERSION 

vCard version.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_FN 

Formatted name.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_N 

Structured presentation of name.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_PHOTO 

Associated image or photo.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_BDAY 

Birthday.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_ADR 

Delivery address.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_LABEL 

Delivery address label.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_TEL 

Telephone number.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_EMAIL 

Electronic mail address.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_MAILER 

Email program name.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_TZ 

Time zone.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_GEO 

Geographic position.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_TITLE 

Job title.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_ROLE 

Role or occupation.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_LOGO 

Organization logo.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_AGENT 

vCard of person who acts as agent.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_ORG 

Name of organization.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_NOTE 

Comments.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_REV 

Revision.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_SOUND 

Pronunciation of name.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_URL 

Uniform resource locator.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_UID 

Unique ID.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_KEY 

Public key.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_NICKNAME 

Nickname.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_CATEGORIES 

Categories.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_PRODID 

Product ID.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_CLASS 

Class information.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_SORT_STRING 

String used for sorting operations.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_X_IRMC_CALL_DATETIME 

Time stamp of a missed call.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_X_BT_SPEEDDIALKEY 

Speed-dial shortcut.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_X_BT_UCI 

Bluetooth UCI (Unique Contact Identifier).

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_X_BT_UID 

Bluetooth UID.

BT_PBAP_APPL_PARAM_PROPERTY_SELECTOR_PROPRIETARY_FILTER 

Proprietary filtering.

◆ bt_pbap_appl_param_reset_new_missed_calls

#include <zephyr/bluetooth/classic/pbap.h>

PBAP application parameter reset neww missed calls parameter values.

Enumerator
BT_PBAP_APPL_PARAM_RESET_NEW_MISSED_CALLS 

Reset.

◆ bt_pbap_appl_param_search_property

#include <zephyr/bluetooth/classic/pbap.h>

PBAP application parameter Search Property parameter values.

Enumerator
BT_PBAP_APPL_PARAM_SEARCH_PROPERTY_NAME 

Name.

BT_PBAP_APPL_PARAM_SEARCH_PROPERTY_NUMBER 

Number.

BT_PBAP_APPL_PARAM_SEARCH_PROPERTY_SOUND 

Sound.

◆ bt_pbap_appl_param_tag_id

#include <zephyr/bluetooth/classic/pbap.h>

PBAP application parameter tag IDs.

Enumerator
BT_PBAP_APPL_PARAM_TAG_ID_ORDER 

Order bt_pbap_appl_param_order.

BT_PBAP_APPL_PARAM_TAG_ID_SEARCH_VALUE 

Search value.

BT_PBAP_APPL_PARAM_TAG_ID_SEARCH_PROPERTY 

Search property bt_pbap_appl_param_search_property.

BT_PBAP_APPL_PARAM_TAG_ID_MAX_LIST_COUNT 

Max list count.

BT_PBAP_APPL_PARAM_TAG_ID_LIST_START_OFFSET 

List start offset.

BT_PBAP_APPL_PARAM_TAG_ID_PROPERTY_SELECTOR 

Property selector bt_pbap_appl_param_property_mask.

BT_PBAP_APPL_PARAM_TAG_ID_FORMAT 

Format bt_pbap_appl_param_format.

BT_PBAP_APPL_PARAM_TAG_ID_PHONEBOOK_SIZE 

Phonebook size.

BT_PBAP_APPL_PARAM_TAG_ID_NEW_MISSED_CALLS 

New missed calls.

BT_PBAP_APPL_PARAM_TAG_ID_PRIMARY_FOLDER_VERSION 

Primary folder version.

BT_PBAP_APPL_PARAM_TAG_ID_SECONDARY_FOLDER_VERSION 

Secondary folder version.

BT_PBAP_APPL_PARAM_TAG_ID_VCARD_SELECTOR 

vCard selector bt_pbap_appl_param_property_mask .

BT_PBAP_APPL_PARAM_TAG_ID_DATABASE_IDENTIFIER 

Database identifier.

BT_PBAP_APPL_PARAM_TAG_ID_VCARD_SELECTOR_OPERATOR 

vCard selector operator bt_pbap_appl_param_property_mask.

BT_PBAP_APPL_PARAM_TAG_ID_RESET_NEW_MISSED_CALLS 

Reset new missed calls bt_pbap_appl_param_reset_new_missed_calls.

BT_PBAP_APPL_PARAM_TAG_ID_SUPPORTED_FEATURES 

PBAP supported features bt_pbap_supported_feature.

◆ bt_pbap_appl_param_vcard_selector_operator

#include <zephyr/bluetooth/classic/pbap.h>

PBAP application parameter vCard Selector Operator parameter values.

Enumerator
BT_PBAP_APPL_PARAM_VCARD_SELECTOR_OPERATOR_OR 

OR operator.

BT_PBAP_APPL_PARAM_VCARD_SELECTOR_OPERATOR_AND 

AND operator.

◆ bt_pbap_rsp_code

#include <zephyr/bluetooth/classic/pbap.h>

PBAP response codes.

Response codes used in PBAP operations, mapped from OBEX response codes. These indicate the status of PBAP requests and operations.

Enumerator
BT_PBAP_RSP_CODE_CONTINUE 

Continue.

BT_PBAP_RSP_CODE_OK 

OK.

BT_PBAP_RSP_CODE_SUCCESS 

Success.

BT_PBAP_RSP_CODE_BAD_REQ 

Bad request - Server couldn't understand request.

BT_PBAP_RSP_CODE_UNAUTH 

Unauthorized.

BT_PBAP_RSP_CODE_FORBIDDEN 

Forbidden - Operation is understood but refused.

BT_PBAP_RSP_CODE_NOT_FOUND 

Not found.

BT_PBAP_RSP_CODE_NOT_ACCEPT 

Not acceptable.

BT_PBAP_RSP_CODE_PRECON_FAIL 

Precondition failed.

BT_PBAP_RSP_CODE_NOT_IMPL 

Not implemented.

BT_PBAP_RSP_CODE_UNAVAIL 

Service unavailable.

◆ bt_pbap_supported_feature

#include <zephyr/bluetooth/classic/pbap.h>

PBAP supported features bitmask.

Enumerator
BT_PBAP_SUPPORTED_FEATURE_DOWNLOAD 

Download feature - Support for phone book download.

BT_PBAP_SUPPORTED_FEATURE_BROWSING 

Browsing feature - Support for phone book browsing.

BT_PBAP_SUPPORTED_FEATURE_DATABASE_IDENTIFIER 

Database identifier feature - Support for database change tracking.

BT_PBAP_SUPPORTED_FEATURE_FOLDER_VERSION_COUNTERS 

Folder version counters feature - Support for folder version tracking.

BT_PBAP_SUPPORTED_FEATURE_VCARD_SELECTOR 

vCard selector feature - Support for vCard property filtering.

BT_PBAP_SUPPORTED_FEATURE_ENHANCED_MISSED_CALLS 

Enhanced missed calls feature - Support for enhanced missed call handling.

BT_PBAP_SUPPORTED_FEATURE_UCI_VCARD_PROPERTY 

UCI vCard property feature - Support for Unique Contact Identifier.

BT_PBAP_SUPPORTED_FEATURE_UID_VCARD_PROPERTY 

UID vCard property feature - Support for vCard UID property.

BT_PBAP_SUPPORTED_FEATURE_CONTACT_REFERENCING 

Contact referencing feature - Support for contact reference handling.

BT_PBAP_SUPPORTED_FEATURE_DEFAULT_CONTACT_IMAGE 

Default contact image feature - Support for default contact images.

◆ bt_pbap_supported_repositories

#include <zephyr/bluetooth/classic/pbap.h>

PBAP supported repositories bitmask.

Enumerator
BT_PBAP_SUPPORTED_REPOSITORIES_LOCAL_PHONE_BOOK 

Local phone book repository.

BT_PBAP_SUPPORTED_REPOSITORIES_SIM 

SIM card repository.

BT_PBAP_SUPPORTED_REPOSITORIES_SPEED_DIAL 

Speed dial repository.

BT_PBAP_SUPPORTED_REPOSITORIES_FAVORITES 

Favorites repository.

Function Documentation

◆ bt_pbap_calculate_nonce()

int bt_pbap_calculate_nonce ( const uint8_t * pwd,
uint8_t nonce[BT_OBEX_CHALLENGE_TAG_NONCE_LEN] )

#include <zephyr/bluetooth/classic/pbap.h>

Calculate authentication nonce for PBAP challenge.

Generates a random nonce value used in OBEX authentication challenges. The nonce is used to prevent replay attacks during authentication.

Parameters
pwdPassword string used for authentication (null-terminated).
nonceOutput buffer to store the generated nonce (BT_OBEX_CHALLENGE_TAG_NONCE_LEN bytes).
Returns
0 on success, negative error code on failure.

◆ bt_pbap_calculate_rsp_digest()

int bt_pbap_calculate_rsp_digest ( const uint8_t * pwd,
const uint8_t nonce[BT_OBEX_CHALLENGE_TAG_NONCE_LEN],
uint8_t rsp_digest[BT_OBEX_RESPONSE_TAG_REQ_DIGEST_LEN] )

#include <zephyr/bluetooth/classic/pbap.h>

Calculate response digest for PBAP authentication.

Computes the MD5 digest for an authentication response based on the password and received nonce. This digest is sent back to prove knowledge of the password without transmitting the password itself.

Parameters
pwdPassword string used for authentication (null-terminated).
nonceNonce value received in the authentication challenge (BT_OBEX_CHALLENGE_TAG_NONCE_LEN bytes).
rsp_digestOutput buffer to store the calculated response digest (BT_OBEX_RESPONSE_TAG_REQ_DIGEST_LEN bytes).
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pce_abort()

int bt_pbap_pce_abort ( struct bt_pbap_pce * pbap_pce,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/pbap.h>

Abort current operation on PBAP server PSE.

Sends an abort request to cancel the current ongoing operation.

Parameters
pbap_pcePBAP PCE object, bt_pbap_pce.
bufBuffer containing optional abort headers.
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pce_connect()

int bt_pbap_pce_connect ( struct bt_pbap_pce * pbap_pce,
uint16_t mopl,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/pbap.h>

Establish PBAP protocol connection from PCE client to PSE server.

Initiates a PBAP protocol connection over an already-established transport connection. The transport (RFCOMM or L2CAP) must be connected first using bt_pbap_pce_rfcomm_connect or bt_pbap_pce_l2cap_connect.

Once the connection response is received, the connect callback in bt_pbap_pce_cb will be called. If the connection is rejected, the callback will be called with an error response code.

Parameters
pbap_pcePBAP PCE object (transport must be connected first), bt_pbap_pce.
moplMaximum OBEX packet length for this connection.
bufBuffer containing connection request headers (should include Target UUID, and optionally authentication challenge, supported features, etc.).
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pce_create_pdu()

struct net_buf * bt_pbap_pce_create_pdu ( struct bt_pbap_pce * pbap_pce,
struct net_buf_pool * pool )

#include <zephyr/bluetooth/classic/pbap.h>

Allocate buffer from pool with reserved headroom for PBAP PCE.

Allocates a network buffer from the given pool after reserving headroom for PBAP. For PBAP connection over RFCOMM, the reserved headroom includes OBEX, RFCOMM, L2CAP and ACL headers. For PBAP connection over L2CAP, the reserved headroom includes OBEX, L2CAP and ACL headers. This ensures proper packet formatting for the underlying transport. If pool is NULL, allocates from the default pool.

Parameters
pbap_pcePBAP PCE object that will use this buffer, bt_pbap_pce.
poolNetwork buffer pool from which to allocate the buffer, or NULL for default pool.
Returns
Pointer to newly allocated buffer with reserved headroom, or NULL on failure.

◆ bt_pbap_pce_disconnect()

int bt_pbap_pce_disconnect ( struct bt_pbap_pce * pbap_pce,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/pbap.h>

Disconnect PBAP connection from PBAP client PCE.

Disconnects the PBAP connection by sending an OBEX DISCONNECT request. The disconnect callback in bt_pbap_pce_cb will be called when the response is received.

Parameters
pbap_pcePBAP PCE object, bt_pbap_pce.
bufBuffer containing optional disconnect headers.
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pce_l2cap_connect()

int bt_pbap_pce_l2cap_connect ( struct bt_conn * conn,
struct bt_pbap_pce * pbap_pce,
struct bt_pbap_pce_cb * cb,
uint16_t psm )

#include <zephyr/bluetooth/classic/pbap.h>

Connect PBAP PCE client over L2CAP transport.

Establishes the underlying L2CAP transport connection for PBAP PCE. Once connected, the l2cap_connected callback will be called. After transport is connected, call bt_pbap_pce_connect to establish the PBAP protocol connection.

Parameters
connACL connection.
pbap_pcePBAP PCE instance to be connected, bt_pbap_pce.
cbCallback operations structure for handling PBAP events, bt_pbap_pce_cb.
psmL2CAP PSM (Protocol Service Multiplexer) to connect to.
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pce_l2cap_disconnect()

int bt_pbap_pce_l2cap_disconnect ( struct bt_pbap_pce * pbap_pce)

#include <zephyr/bluetooth/classic/pbap.h>

Disconnect PBAP PCE L2CAP transport.

Closes the underlying L2CAP transport connection.

Parameters
pbap_pcePBAP PCE instance to disconnect, bt_pbap_pce.
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pce_pull_phone_book()

int bt_pbap_pce_pull_phone_book ( struct bt_pbap_pce * pbap_pce,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/pbap.h>

Pull phone book from PBAP server PSE.

Sends a pull phone book command to retrieve a complete phone book object from the PSE.

Parameters
pbap_pcePBAP PCE object, bt_pbap_pce.
bufBuffer to be sent. Should contain:
  • Name header with phone book path (e.g., "telecom/pb.vcf")
  • Type header with BT_PBAP_PULL_PHONE_BOOK_TYPE
  • Optional application parameters (format, etc.)
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pce_pull_vcard_entry()

int bt_pbap_pce_pull_vcard_entry ( struct bt_pbap_pce * pbap_pce,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/pbap.h>

Pull specific vCard entry from PBAP server PSE.

Sends a request to retrieve a specific vCard entry.

Parameters
pbap_pcePBAP PCE object, bt_pbap_pce.
bufBuffer containing:
  • Name header with vCard entry name (e.g., "0.vcf")
  • Type header with BT_PBAP_PULL_VCARD_ENTRY_TYPE
  • Optional application parameters (property selector, format, etc.)
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pce_pull_vcard_listing()

int bt_pbap_pce_pull_vcard_listing ( struct bt_pbap_pce * pbap_pce,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/pbap.h>

Pull vCard listing from PBAP server PSE.

Sends a request to retrieve a listing of vCard entries from a specific folder.

Parameters
pbap_pcePBAP PCE object, bt_pbap_pce.
bufBuffer containing:
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pce_rfcomm_connect()

int bt_pbap_pce_rfcomm_connect ( struct bt_conn * conn,
struct bt_pbap_pce * pbap_pce,
struct bt_pbap_pce_cb * cb,
uint8_t channel )

#include <zephyr/bluetooth/classic/pbap.h>

PCE Connect to PSE over RFCOMM transport.

Establishes the underlying RFCOMM transport connection for PBAP PCE. Once connected, the rfcomm_connected callback will be called. After transport is connected, call bt_pbap_pce_connect to establish the PBAP protocol connection.

Parameters
connACL connection.
pbap_pcePBAP PCE instance to be connected, bt_pbap_pce.
cbCallback operations structure for handling PBAP events, bt_pbap_pce_cb.
channelRFCOMM server channel number to connect to.
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pce_rfcomm_disconnect()

int bt_pbap_pce_rfcomm_disconnect ( struct bt_pbap_pce * pbap_pce)

#include <zephyr/bluetooth/classic/pbap.h>

Disconnect PBAP PCE RFCOMM transport.

Closes the underlying RFCOMM transport connection.

Parameters
pbap_pcePBAP PCE instance to disconnect, bt_pbap_pce.
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pce_set_phone_book()

int bt_pbap_pce_set_phone_book ( struct bt_pbap_pce * pbap_pce,
uint8_t flags,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/pbap.h>

Set current phone book on PBAP server PSE.

Sets the current phone book on the PSE.

Parameters
pbap_pcePBAP PCE object, bt_pbap_pce.
flagsNavigation flags:
bufBuffer containing optional Name header with folder name.
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pse_abort_rsp()

int bt_pbap_pse_abort_rsp ( struct bt_pbap_pse * pbap_pse,
uint8_t rsp_code,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/pbap.h>

Send abort response from PBAP PSE.

Sends a response to an abort request from a PCE client.

Parameters
pbap_psePBAP PSE object, bt_pbap_pse.
rsp_codeResponse code (typically BT_PBAP_RSP_CODE_SUCCESS), bt_pbap_rsp_code.
bufBuffer containing optional response headers.
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pse_connect_rsp()

int bt_pbap_pse_connect_rsp ( struct bt_pbap_pse * pbap_pse,
uint16_t mopl,
uint8_t rsp_code,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/pbap.h>

Send connect response from PBAP PSE.

Sends a response to a connect request from a PCE client.

Parameters
pbap_psePBAP PSE object, bt_pbap_pse.
moplMaximum OBEX packet length.
rsp_codeResponse code, bt_pbap_rsp_code.
bufBuffer containing response headers (should include Who header, connection ID, etc.).
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pse_create_pdu()

struct net_buf * bt_pbap_pse_create_pdu ( struct bt_pbap_pse * pbap_pse,
struct net_buf_pool * pool )

#include <zephyr/bluetooth/classic/pbap.h>

Allocate buffer from pool with reserved headroom for PBAP PSE.

Allocates a network buffer from the given pool after reserving headroom for PBAP. For PBAP connection over RFCOMM, the reserved headroom includes OBEX, RFCOMM, L2CAP and ACL headers. For PBAP connection over L2CAP, the reserved headroom includes OBEX, L2CAP and ACL headers. This ensures proper packet formatting for the underlying transport. If pool is NULL, allocates from the default pool.

Parameters
pbap_psePBAP PSE object that will use this buffer, bt_pbap_pse.
poolNetwork buffer pool from which to allocate the buffer, or NULL for default pool.
Returns
Pointer to newly allocated buffer with reserved headroom, or NULL on failure.

◆ bt_pbap_pse_disconnect_rsp()

int bt_pbap_pse_disconnect_rsp ( struct bt_pbap_pse * pbap_pse,
uint8_t rsp_code,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/pbap.h>

Send disconnect response from PBAP PSE.

Sends a response to a disconnect request from a PCE client.

Parameters
pbap_psePBAP PSE object, bt_pbap_pse.
rsp_codeResponse code, bt_pbap_rsp_code.
bufBuffer containing optional response headers.
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pse_l2cap_register()

int bt_pbap_pse_l2cap_register ( struct bt_pbap_pse_l2cap * server)

#include <zephyr/bluetooth/classic/pbap.h>

Register PBAP PSE L2CAP server.

Registers a PBAP server that listens for incoming L2CAP connections. The server will be assigned an L2CAP PSM which should be advertised via SDP.

Parameters
serverPBAP PSE L2CAP server structure, bt_pbap_pse_l2cap.
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pse_pull_phone_book_rsp()

int bt_pbap_pse_pull_phone_book_rsp ( struct bt_pbap_pse * pbap_pse,
uint8_t rsp_code,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/pbap.h>

Send pull phone book response from PBAP PSE.

Sends a response to a pull phone book request from a PCE client. For large phonebooks, multiple responses with BT_PBAP_RSP_CODE_CONTINUE can be sent, followed by a final response with BT_PBAP_RSP_CODE_SUCCESS.

Parameters
pbap_psePBAP PSE object, bt_pbap_pse.
rsp_codeResponse code, bt_pbap_rsp_code.
bufBuffer containing response headers.
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pse_pull_vcard_entry_rsp()

int bt_pbap_pse_pull_vcard_entry_rsp ( struct bt_pbap_pse * pbap_pse,
uint8_t rsp_code,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/pbap.h>

Send pull vCard entry response from PBAP PSE.

Sends a response to a pull vCard entry request from a PCE client. For large vCard entries, multiple responses with BT_PBAP_RSP_CODE_CONTINUE can be sent, followed by a final response with BT_PBAP_RSP_CODE_SUCCESS.

Parameters
pbap_psePBAP PSE object, bt_pbap_pse.
rsp_codeResponse code, bt_pbap_rsp_code.
bufBuffer containing response headers.
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pse_pull_vcard_listing_rsp()

int bt_pbap_pse_pull_vcard_listing_rsp ( struct bt_pbap_pse * pbap_pse,
uint8_t rsp_code,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/pbap.h>

Send pull vCard listing response from PBAP PSE.

Sends a response to a pull vCard listing request from a PCE client. For large listings, multiple responses with BT_PBAP_RSP_CODE_CONTINUE can be sent, followed by a final response with BT_PBAP_RSP_CODE_SUCCESS.

Parameters
pbap_psePBAP PSE object, bt_pbap_pse.
rsp_codeResponse code, bt_pbap_rsp_code.
bufBuffer containing response headers.
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pse_register()

int bt_pbap_pse_register ( struct bt_pbap_pse * pbap_pse,
struct bt_pbap_pse_cb * cb )

#include <zephyr/bluetooth/classic/pbap.h>

Register PBAP PSE instance.

Registers a PBAP PSE instance with the PBAP subsystem. This initializes the PSE object and associates it with the provided callback structure for handling PBAP server operations.

Parameters
pbap_psePBAP PSE object to register, bt_pbap_pse.
cbCallback operations structure for PSE events, bt_pbap_pse_cb.
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pse_rfcomm_register()

int bt_pbap_pse_rfcomm_register ( struct bt_pbap_pse_rfcomm * server)

#include <zephyr/bluetooth/classic/pbap.h>

Register PBAP PSE RFCOMM server.

Registers a PBAP server that listens for incoming RFCOMM connections. The server will be assigned an RFCOMM channel which should be advertised via SDP.

Parameters
serverPBAP PSE RFCOMM server structure, bt_pbap_pse_rfcomm.
Returns
0 on success, negative error code on failure.

◆ bt_pbap_pse_set_phone_book_rsp()

int bt_pbap_pse_set_phone_book_rsp ( struct bt_pbap_pse * pbap_pse,
uint8_t rsp_code,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/pbap.h>

Send set phone book response from PBAP PSE.

Sends a response to a set phone book request from a PCE client.

Parameters
pbap_psePBAP PSE object, bt_pbap_pse.
rsp_codeResponse code, bt_pbap_rsp_code.
bufBuffer containing optional response headers.
Returns
0 on success, negative error code on failure.

◆ bt_pbap_verify_authentication()

int bt_pbap_verify_authentication ( uint8_t nonce[BT_OBEX_CHALLENGE_TAG_NONCE_LEN],
uint8_t rsp_digest[BT_OBEX_RESPONSE_TAG_REQ_DIGEST_LEN],
const uint8_t * pwd )

#include <zephyr/bluetooth/classic/pbap.h>

Verify authentication response.

Verifies that the received response digest matches the expected value based on the password and nonce. Used by the authenticating party to validate the authentication response.

Parameters
nonceNonce value that was sent in the authentication challenge (BT_OBEX_CHALLENGE_TAG_NONCE_LEN bytes).
rsp_digestResponse digest received from the authenticating peer (BT_OBEX_RESPONSE_TAG_REQ_DIGEST_LEN bytes).
pwdPassword string used for authentication (null-terminated).
Returns
0 if authentication is successful, negative error code on failure.