8#ifdef USE_ESP32_BLE_DEVICE
16#include <esp_bt_defs.h>
17#include <esp_gap_ble_api.h>
18#include <esp_gatt_common_api.h>
19#include <esp_gattc_api.h>
25static const int UNSET_CONN_ID = 0xFFFF;
29 void setup()
override;
34 void run_later(std::function<
void()> &&f);
35#ifdef USE_ESP32_BLE_DEVICE
40 esp_ble_gattc_cb_param_t *param)
override;
41 void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
override;
65 (uint8_t) (this->
address_ >> 32) & 0xff, (uint8_t) (this->
address_ >> 24) & 0xff,
66 (uint8_t) (this->
address_ >> 16) & 0xff, (uint8_t) (this->
address_ >> 8) & 0xff,
67 (uint8_t) (this->
address_ >> 0) & 0xff);
72#ifdef USE_ESP32_BLE_DEVICE
110#ifdef USE_ESP32_BLE_DEVICE
espbt::ConnectionType connection_type_
void log_event_(const char *name)
uint8_t * get_remote_bda()
esp_gatt_status_t status_
std::vector< BLEService * > services_
void set_auto_connect(bool auto_connect)
void log_gattc_event_(const char *name)
esp_bd_addr_t remote_bda_
void log_gattc_warning_(const char *operation, esp_gatt_status_t status)
const std::string & address_str() const
void log_connection_params_(const char *param_type)
uint64_t get_address() const
BLEDescriptor * get_descriptor(espbt::ESPBTUUID service, espbt::ESPBTUUID chr, espbt::ESPBTUUID descr)
void unconditional_disconnect()
void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) override
void set_state(espbt::ClientState st) override
void restore_medium_conn_params_()
float get_setup_priority() const override
BLECharacteristic * get_characteristic(espbt::ESPBTUUID service, espbt::ESPBTUUID chr)
void on_scan_end() override
void disconnect() override
bool check_addr(esp_bd_addr_t &addr)
virtual void set_address(uint64_t address)
esp_ble_addr_type_t get_remote_addr_type() const
void run_later(std::function< void()> &&f)
uint8_t connection_index_
BLEService * get_service(espbt::ESPBTUUID uuid)
uint8_t get_connection_index() const
bool gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t *param) override
esp_ble_addr_type_t remote_addr_type_
bool parse_device(const espbt::ESPBTDevice &device) override
virtual void set_connection_type(espbt::ConnectionType ct)
float parse_char_value(uint8_t *value, uint16_t length)
BLEDescriptor * get_config_descriptor(uint16_t handle)
uint16_t get_conn_id() const
void dump_config() override
void set_remote_addr_type(esp_ble_addr_type_t address_type)
std::string str_snprintf(const char *fmt, size_t len,...)