Bluetooth PBAP Profile

group BT_PBAP

Provide BT PBAP profile interfaces.

Typedefs

typedef enum t_bt_pbap_repository T_BT_PBAP_REPOSITORY

Define BT PBAP repository.

typedef enum t_bt_pbap_path T_BT_PBAP_PATH

Define BT PBAP path.

typedef enum t_bt_pbap_phone_book T_BT_PBAP_PHONE_BOOK

Define BT PBAP phone book.

Enums

enum t_bt_pbap_repository

Define BT PBAP repository.

Values:

enumerator BT_PBAP_REPOSITORY_LOCAL

Phone's local memory.

enumerator BT_PBAP_REPOSITORY_SIM1

Phone's SIM card.

enum t_bt_pbap_path

Define BT PBAP path.

Values:

enumerator BT_PBAP_PATH_ROOT
enumerator BT_PBAP_PATH_TELECOM
enumerator BT_PBAP_PATH_PB
enumerator BT_PBAP_PATH_ICH
enumerator BT_PBAP_PATH_OCH
enumerator BT_PBAP_PATH_MCH
enumerator BT_PBAP_PATH_CCH
enumerator BT_PBAP_PATH_SIM1
enum t_bt_pbap_phone_book

Define BT PBAP phone book.

Values:

enumerator BT_PBAP_PHONE_BOOK_PB

Main phone book object.

enumerator BT_PBAP_PHONE_BOOK_ICH

Incoming calls history object.

enumerator BT_PBAP_PHONE_BOOK_OCH

Outgoing calls history object.

enumerator BT_PBAP_PHONE_BOOK_MCH

Missed calls history object.

enumerator BT_PBAP_PHONE_BOOK_CCH

Combined (incoming, outgoing, and missed) calls history object.

enumerator BT_PBAP_PHONE_BOOK_SPD

Speed-Dial object.

enumerator BT_PBAP_PHONE_BOOK_FAV

Favorite contacts object.

Functions

bool bt_pbap_init(void)

Initialize PBAP profile.

Return values:
  • true -- PBAP profile was initialized successfully.

  • false -- PBAP profile was failed to initialize.

Returns:

The status of initializing PBAP profile.

void bt_pbap_deinit(void)

De-initialize PBAP profile.

Experimental Added Since 2.14.0.0:
bool bt_pbap_connect_over_rfc_req(uint8_t bd_addr[6], uint8_t server_chann, bool feat_flag)

Send a PBAP connection over RFCOMM request.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • server_chann -- [in] The remote server channel which can be found from the SDP info.

  • feat_flag -- [in] The PSE PBAP SupportedFeatures attribute present flag.

    • true The PSE PBAP SupportedFeatures attribute is not present in SDP info.

    • false The PSE PBAP SupportedFeatures attribute is present in SDP info.

Return values:
  • true -- PBAP connection request was sent successfully.

  • false -- PBAP connection request was failed to send.

Returns:

The status of sending the PBAP connection request.

bool bt_pbap_connect_over_l2c_req(uint8_t bd_addr[6], uint16_t l2c_psm, bool feat_flag)

Send a PBAP connection over L2CAP request.

Experimental Added Since 2.14.0.0:
Parameters:
  • bd_addr -- [in] Remote BT address.

  • l2c_psm -- [in] The remote L2CAP PSM which can be found from the SDP info.

  • feat_flag -- [in] The PSE PBAP SupportedFeatures attribute present flag.

    • true The PSE PBAP SupportedFeatures attribute is not present in SDP info.

    • false The PSE PBAP SupportedFeatures attribute is present in SDP info.

Return values:
  • true -- PBAP connection request was sent successfully.

  • false -- PBAP connection request was failed to send.

Returns:

The status of sending the PBAP connection request.

bool bt_pbap_disconnect_req(uint8_t bd_addr[6])

Send a PBAP disconnection request.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- PBAP disconnection request was sent successfully.

  • false -- PBAP disconnection request was failed to send.

Returns:

The status of sending the PBAP disconnection request.

bool bt_pbap_phone_book_pull(uint8_t bd_addr[6], T_BT_PBAP_REPOSITORY repos, T_BT_PBAP_PHONE_BOOK phone_book, uint16_t start_offset, uint16_t max_list_count, uint64_t filter)

Send a request to pull the entire phone book.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • repos -- [in] Repository containing the phone book T_BT_PBAP_REPOSITORY.

  • phone_book -- [in] The phone book object to be retrieved T_BT_PBAP_PHONE_BOOK.

  • start_offset -- [in] The offset of the first entry to be retrieved compared to the first entry of the phone book object.

  • max_list_count -- [in] The maximum number of entries to be retrieved.

  • filter -- [in] The filter attribute mask of 64 bits, and 0 for disabling filter BT PBAP Property Mask.

Return values:
  • true -- Request was sent successfully.

  • false -- Request was failed to send.

Returns:

The status of sending pull phone book message.

bool bt_pbap_phone_book_size_get(uint8_t bd_addr[6], T_BT_PBAP_REPOSITORY repos, T_BT_PBAP_PHONE_BOOK phone_book)

Send a request to get the number of indexes in the phone book of interest.

Parameters:
Return values:
  • true -- Request was sent successfully.

  • false -- Request was failed to send.

Returns:

The status of sending get phone book size message.

bool bt_pbap_pull_continue(uint8_t bd_addr[6])

Send a request to pull more data from the remote server.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- Request was sent successfully.

  • false -- Request was failed to send.

Returns:

The status of sending pull continue message.

bool bt_pbap_pull_abort(uint8_t bd_addr[6])

Send a request to terminate the ongoing pull operation.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- Request was sent successfully.

  • false -- Request was failed to send.

Returns:

The status of sending pull abort message.

bool bt_pbap_phone_book_set(uint8_t bd_addr[6], T_BT_PBAP_REPOSITORY repos, T_BT_PBAP_PATH path)

Send a request to set active phone book.

Parameters:
Return values:
  • true -- Request was sent successfully.

  • false -- Request was failed to send.

Returns:

The status of sending set phone book message.

bool bt_pbap_vcard_listing_by_number_pull(uint8_t bd_addr[6], char *phone_number)

Send a request to pull the vCard listing in current phone book by phone number.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • phone_number -- [in] The start address of string buffer that stores phone number.

Return values:
  • true -- Request was sent successfully.

  • false -- Request was failed to send.

Returns:

The status of sending pull_vCard_listing message.

bool bt_pbap_pull_vcard_entry(uint8_t bd_addr[6], uint8_t *p_name, uint8_t name_len, uint64_t filter)

Send a request to pull an individual vCard entry from the phone book object of interest.

Experimental Added Since 2.14.0.0:
Parameters:
  • bd_addr -- [in] Remote BT address.

  • p_name -- [in] The object name of vCard.

  • name_len -- [in] The length of name.

  • filter -- [in] The properties contained in the vCard object.

Return values:
  • true -- Request was sent successfully.

  • false -- Request was failed to send.

Returns:

The status of sending the command.