|
PebbleOS
|
LE advertising. More...
Functions | |
| bool | pbl_bt_advert_advertising_enable (uint32_t min_interval_ms, uint32_t max_interval_ms) |
| Start advertising. | |
| void | pbl_bt_advert_advertising_disable (void) |
| Stop advertising, if active. | |
| bool | pbl_bt_advert_client_get_tx_power (int8_t *tx_power) |
| Get the advertising transmit power. | |
| bool | pbl_bt_advert_set_advertising_data (const struct pbl_bt_ad_data *ad_data) |
| Set the advertising data and scan response data. | |
LE advertising.
Advertising is connectable and general discoverable. Connections are only established through it, so the GAP events of a connection (see LE connections) are reported through the advertising event handler.
The advertising data must be set before enabling advertising, and again after the host re-synchronizes (see pbl_bt_handle_host_resynced()):
| void pbl_bt_advert_advertising_disable | ( | void | ) |
Stop advertising, if active.
| bool pbl_bt_advert_advertising_enable | ( | uint32_t | min_interval_ms, |
| uint32_t | max_interval_ms | ||
| ) |
Start advertising.
Advertises until pbl_bt_advert_advertising_disable() is called or a connection is established.
| min_interval_ms | Minimum advertising interval in milliseconds. |
| max_interval_ms | Maximum advertising interval in milliseconds. |
| bool pbl_bt_advert_client_get_tx_power | ( | int8_t * | tx_power | ) |
Get the advertising transmit power.
Not supported by the NimBLE backend, which always returns false.
| [out] | tx_power | Transmit power in dBm. |
tx_power was set. | bool pbl_bt_advert_set_advertising_data | ( | const struct pbl_bt_ad_data * | ad_data | ) |
Set the advertising data and scan response data.
| ad_data | Advertising and scan response data, each at most PBL_BT_AD_REPORT_DATA_MAX_LENGTH bytes. Copied during the call. |