14static const char *
const TAG =
"esp32_ble.advertising";
29 this->
advertising_data_.flag = (ESP_BLE_ADV_FLAG_GEN_DISC | ESP_BLE_ADV_FLAG_BREDR_NOT_SPT);
43 this->advertising_uuids_.end());
70 if (num_services == 0) {
77 for (
int i = 0; i < num_services; i++) {
91 ESP_LOGE(TAG,
"esp_ble_gap_config_adv_data failed (Advertising): %s", esp_err_to_name(err));
105 ESP_LOGE(TAG,
"esp_ble_gap_config_adv_data failed (Scan response): %s", esp_err_to_name(err));
117 ESP_LOGE(TAG,
"esp_ble_gap_start_advertising failed: %s", esp_err_to_name(err));
133 esp_err_t err = esp_ble_gap_stop_advertising();
135 ESP_LOGE(TAG,
"esp_ble_gap_stop_advertising failed: %d", err);
uint32_t IRAM_ATTR HOT get_loop_component_start_time() const
Get the cached time in milliseconds from when the current component started its loop execution.
void set_manufacturer_data(const std::vector< uint8_t > &data)
esp_ble_adv_data_t advertising_data_
void add_service_uuid(ESPBTUUID uuid)
std::vector< ESPBTUUID > advertising_uuids_
int8_t current_adv_index_
std::vector< std::function< void(bool)> > raw_advertisements_callbacks_
BLEAdvertising(uint32_t advertising_cycle_time)
esp_err_t services_advertisement_()
esp_ble_adv_data_t scan_response_data_
esp_ble_adv_params_t advertising_params_
void set_service_data(const std::vector< uint8_t > &data)
const uint32_t advertising_cycle_time_
void remove_service_uuid(ESPBTUUID uuid)
uint32_t last_advertisement_time_
void register_raw_advertisement_callback(std::function< void(bool)> &&callback)
esp_bt_uuid_t get_uuid() const
ESPBTUUID as_128bit() const
Providing packet encoding functions for exchanging data with a remote host.
Application App
Global storage of Application pointer - only one Application can exist.