ESPHome 2026.8.0b4
Loading...
Searching...
No Matches
bluetooth_connection.h File Reference

Go to the source code of this file.

Namespaces

namespace  esphome
 
namespace  esphome::api
 
namespace  esphome::bluetooth_connection
 

Typedefs

using esphome::bluetooth_connection::conn_err_t = esp_err_t
 

Enumerations

enum class  esphome::bluetooth_connection::BatchClose : uint8_t { esphome::bluetooth_connection::CONTINUE , esphome::bluetooth_connection::SEND }
 Result of close_service_batch: keep filling the batch or send it now. More...
 

Functions

conn_err_t esphome::bluetooth_connection::unpair_device (uint64_t address)
 
conn_err_t esphome::bluetooth_connection::clear_gatt_cache (uint64_t address)
 
size_t esphome::bluetooth_connection::estimate_service_size (uint16_t char_count, bool use_efficient_uuids)
 Estimate the wire size of a service (service overhead + its characteristics, assuming 128-bit UUIDs and one 128-bit descriptor per characteristic to be safe) before fetching/packing the full data.
 
void esphome::bluetooth_connection::fill_128bit_uuid_array (std::array< uint64_t, 2 > &out, const ble_device_base::ESPBTUUID &uuid)
 
void esphome::bluetooth_connection::fill_gatt_uuid (std::array< uint64_t, 2 > &uuid_128, uint32_t &short_uuid, const ble_device_base::ESPBTUUID &uuid, bool use_efficient_uuids)
 Fill the UUID in the appropriate wire format based on client support and UUID type (128-bit array for old clients or 128-bit UUIDs, short form otherwise).
 
BatchClose esphome::bluetooth_connection::close_service_batch (api::BluetoothGATTGetServicesResponse &resp, size_t &current_size, int16_t &send_service, uint8_t connection_index, const char *address_str)
 Close out the service just packed into resp (account its actual wire size, advance the cursor) and decide whether the batch must be sent now.