Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Public Broadcast Profile (PBP)

Public Broadcast Profile (PBP) More...

Macros

#define BT_PBP_MIN_PBA_SIZE   (BT_UUID_SIZE_16 + 1 + 1)
 Minimum size of the Public Broadcast Announcement.
 

Enumerations

enum  bt_pbp_announcement_feature { BT_PBP_ANNOUNCEMENT_FEATURE_ENCRYPTION = BIT(0) , BT_PBP_ANNOUNCEMENT_FEATURE_STANDARD_QUALITY = BIT(1) , BT_PBP_ANNOUNCEMENT_FEATURE_HIGH_QUALITY = BIT(2) }
 Public Broadcast Announcement features. More...
 

Functions

int bt_pbp_get_announcement (const uint8_t meta[], size_t meta_len, enum bt_pbp_announcement_feature features, struct net_buf_simple *pba_data_buf)
 Creates a Public Broadcast Announcement based on the information received in the features parameter.
 
int bt_pbp_parse_announcement (struct bt_data *data, enum bt_pbp_announcement_feature *features, uint8_t **meta)
 Parses the received advertising data corresponding to a Public Broadcast Announcement.
 

Detailed Description

Public Broadcast Profile (PBP)

Since
3.5
Version
0.8.0

The Public Broadcast Profile (PBP) is used for public broadcasts by providing additional information in the advertising data.

Macro Definition Documentation

◆ BT_PBP_MIN_PBA_SIZE

#define BT_PBP_MIN_PBA_SIZE   (BT_UUID_SIZE_16 + 1 + 1)

#include <zephyr/bluetooth/audio/pbp.h>

Minimum size of the Public Broadcast Announcement.

It contains the Public Broadcast Announcement UUID (2), the Public Broadcast Announcement features (1) and the metadata length (1)

Enumeration Type Documentation

◆ bt_pbp_announcement_feature

#include <zephyr/bluetooth/audio/pbp.h>

Public Broadcast Announcement features.

Enumerator
BT_PBP_ANNOUNCEMENT_FEATURE_ENCRYPTION 

Broadcast Streams encryption status.

BT_PBP_ANNOUNCEMENT_FEATURE_STANDARD_QUALITY 

Standard Quality Public Broadcast Audio configuration.

BT_PBP_ANNOUNCEMENT_FEATURE_HIGH_QUALITY 

High Quality Public Broadcast Audio configuration.

Function Documentation

◆ bt_pbp_get_announcement()

int bt_pbp_get_announcement ( const uint8_t meta[],
size_t meta_len,
enum bt_pbp_announcement_feature features,
struct net_buf_simple * pba_data_buf )

#include <zephyr/bluetooth/audio/pbp.h>

Creates a Public Broadcast Announcement based on the information received in the features parameter.

Parameters
metaMetadata to be included in the advertising data
meta_lenSize of the metadata fields to be included in the advertising data
featuresPublic Broadcast Announcement features
pba_data_bufPointer to store the PBA advertising data. Buffer size needs to be meta_len + BT_PBP_MIN_PBA_SIZE.
Returns
0 on success or an appropriate error code.

◆ bt_pbp_parse_announcement()

int bt_pbp_parse_announcement ( struct bt_data * data,
enum bt_pbp_announcement_feature * features,
uint8_t ** meta )

#include <zephyr/bluetooth/audio/pbp.h>

Parses the received advertising data corresponding to a Public Broadcast Announcement.

Returns the advertised Public Broadcast Announcement features and metadata.

Parameters
[in]dataAdvertising data to be checked
[out]featuresPointer to public broadcast source features to store the parsed features in
[out]metaPointer to the metadata present in the advertising data
Returns
parsed metadata length on success.
Return values
-EINVALif data, features or meta are NULL.
-ENOENTif data is not of type BT_DATA_SVC_DATA16 or if the UUID in the service data is not BT_UUID_PBA.
-EMSGSIZEif data is not large enough to contain a PBP announcement.
-EBADMSGif the data contains invalid data.