ESPHome 2025.6.3
Loading...
Searching...
No Matches
bluetooth_connection.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef USE_ESP32
4
6
7namespace esphome {
8namespace bluetooth_proxy {
9
10class BluetoothProxy;
11
13 public:
14 void dump_config() override;
15 bool gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if,
16 esp_ble_gattc_cb_param_t *param) override;
17 void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) override;
19
20 esp_err_t read_characteristic(uint16_t handle);
21 esp_err_t write_characteristic(uint16_t handle, const std::string &data, bool response);
22 esp_err_t read_descriptor(uint16_t handle);
23 esp_err_t write_descriptor(uint16_t handle, const std::string &data, bool response);
24
25 esp_err_t notify_characteristic(uint16_t handle, bool enable);
26
27 protected:
28 friend class BluetoothProxy;
30
31 int16_t send_service_{-2};
33};
34
35} // namespace bluetooth_proxy
36} // namespace esphome
37
38#endif // USE_ESP32
esp32_ble_tracker::AdvertisementParserType get_advertisement_parser_type() override
esp_err_t write_descriptor(uint16_t handle, const std::string &data, bool response)
void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) override
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_err_t write_characteristic(uint16_t handle, const std::string &data, bool response)
esp_err_t notify_characteristic(uint16_t handle, bool enable)
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7