PebbleOS v4.47.0-1161-g94e3d98da
Loading...
Searching...
No Matches
Advertising

Connectable advertising that follows what there is to advertise. More...

Data Structures

struct  pbl_bt_adv
 An advertisement. More...
 
struct  pbl_bt_adv_config
 How to advertise. More...
 

Functions

void pbl_bt_adv_start (const struct pbl_bt_adv_config *config)
 Start advertising what is enabled, once the host is synchronized.
 
void pbl_bt_adv_stop (void)
 Stop advertising, and disable every advertisement.
 
void pbl_bt_adv_enable (struct pbl_bt_adv *adv, uint16_t short_secs)
 Enable an advertisement, or air it anew if it is enabled: its payloads are set again.
 
void pbl_bt_adv_disable (struct pbl_bt_adv *adv)
 Disable an advertisement.
 

Detailed Description

Connectable advertising that follows what there is to advertise.

A device has a few advertisements, e.g. one to be discovered and one for a bonded peer to reconnect to, each enabled when it applies. The first one enabled, in the order they are given, is on air while there is no connection. It airs at a short interval for some time, to be found fast, and at a long one from then on, to save power. A stack that refuses to advertise is asked again a second later.

Function Documentation

◆ pbl_bt_adv_disable()

void pbl_bt_adv_disable ( struct pbl_bt_adv *  adv)

Disable an advertisement.

Parameters
advThe advertisement.

◆ pbl_bt_adv_enable()

void pbl_bt_adv_enable ( struct pbl_bt_adv *  adv,
uint16_t  short_secs 
)

Enable an advertisement, or air it anew if it is enabled: its payloads are set again.

Parameters
advThe advertisement.
short_secsHow long it airs at the short interval, in seconds.

◆ pbl_bt_adv_start()

void pbl_bt_adv_start ( const struct pbl_bt_adv_config *  config)

Start advertising what is enabled, once the host is synchronized.

Every advertisement starts disabled.

Parameters
configHow to advertise. It must outlive the advertising.

◆ pbl_bt_adv_stop()

void pbl_bt_adv_stop ( void  )

Stop advertising, and disable every advertisement.