|
| | EspBluetooth () |
| | Constructor.
|
| |
| virtual | ~EspBluetooth () |
| | Destructor.
|
| |
| hf_bluetooth_err_t | Initialize (hf_bluetooth_mode_t mode) noexcept override |
| | Initialize the Bluetooth subsystem.
|
| |
| hf_bluetooth_err_t | Deinitialize () noexcept override |
| | Deinitialize the Bluetooth subsystem.
|
| |
| bool | IsInitialized () const noexcept override |
| | Check if Bluetooth is initialized.
|
| |
| hf_bluetooth_err_t | Enable () noexcept override |
| | Enable Bluetooth.
|
| |
| hf_bluetooth_err_t | Disable () noexcept override |
| | Disable Bluetooth.
|
| |
| bool | IsEnabled () const noexcept override |
| | Check if Bluetooth is enabled.
|
| |
| hf_bluetooth_err_t | SetMode (hf_bluetooth_mode_t mode) noexcept override |
| | Set Bluetooth operating mode.
|
| |
| hf_bluetooth_mode_t | GetMode () const noexcept override |
| | Get current Bluetooth operating mode.
|
| |
| hf_bluetooth_err_t | GetLocalAddress (hf_bluetooth_address_t &address) const noexcept override |
| | Get local Bluetooth address.
|
| |
| hf_bluetooth_err_t | SetDeviceName (const std::string &name) noexcept override |
| | Set local device name.
|
| |
| std::string | GetDeviceName () const noexcept override |
| | Get local device name.
|
| |
| hf_bluetooth_err_t | StartScan (uint32_t duration_ms=0, hf_bluetooth_scan_type_t type=hf_bluetooth_scan_type_t::HF_BLUETOOTH_SCAN_TYPE_ACTIVE) noexcept override |
| | Start device discovery/scanning.
|
| |
| hf_bluetooth_err_t | StopScan () noexcept override |
| | Stop device discovery/scanning.
|
| |
| bool | IsScanning () const noexcept override |
| | Check if currently scanning.
|
| |
| hf_bluetooth_err_t | GetDiscoveredDevices (std::vector< hf_bluetooth_device_info_t > &devices) noexcept override |
| | Get list of discovered devices.
|
| |
| hf_bluetooth_err_t | ClearDiscoveredDevices () noexcept override |
| | Clear discovered devices list.
|
| |
| hf_bluetooth_err_t | StartAdvertising () noexcept override |
| | Start BLE advertising.
|
| |
| hf_bluetooth_err_t | StopAdvertising () noexcept override |
| | Stop BLE advertising.
|
| |
| bool | IsAdvertising () const noexcept override |
| | Check if currently advertising.
|
| |
| hf_bluetooth_err_t | Connect (const hf_bluetooth_address_t &address, uint32_t timeout_ms=0) noexcept override |
| | Connect to a remote device.
|
| |
| hf_bluetooth_err_t | Disconnect (const hf_bluetooth_address_t &address) noexcept override |
| | Disconnect from a remote device.
|
| |
| bool | IsConnected (const hf_bluetooth_address_t &address) const noexcept override |
| | Check if connected to a device.
|
| |
| hf_bluetooth_err_t | GetConnectedDevices (std::vector< hf_bluetooth_device_info_t > &devices) noexcept override |
| | Get list of connected devices.
|
| |
| hf_bluetooth_err_t | Pair (const hf_bluetooth_address_t &address, const std::string &pin="") noexcept override |
| | Pair with a remote device.
|
| |
| hf_bluetooth_err_t | Unpair (const hf_bluetooth_address_t &address) noexcept override |
| | Unpair from a remote device.
|
| |
| bool | IsPaired (const hf_bluetooth_address_t &address) const noexcept override |
| | Check if paired with a device.
|
| |
| hf_bluetooth_err_t | SendData (const hf_bluetooth_address_t &address, const std::vector< uint8_t > &data) noexcept override |
| | Send data to a connected device.
|
| |
| int | GetAvailableData (const hf_bluetooth_address_t &address) const noexcept override |
| | Check if data is available to read.
|
| |
| hf_bluetooth_err_t | ReadData (const hf_bluetooth_address_t &address, std::vector< uint8_t > &data, size_t max_bytes=0) noexcept override |
| | Read available data from a connected device.
|
| |
| hf_bluetooth_err_t | DiscoverServices (const hf_bluetooth_address_t &address, std::vector< hf_bluetooth_gatt_service_t > &services) noexcept override |
| | Discover GATT services on a connected device.
|
| |
| hf_bluetooth_err_t | DiscoverCharacteristics (const hf_bluetooth_address_t &address, const std::string &service_uuid, std::vector< hf_bluetooth_gatt_characteristic_t > &characteristics) noexcept override |
| | Discover GATT characteristics for a service.
|
| |
| hf_bluetooth_err_t | ReadCharacteristic (const hf_bluetooth_address_t &address, const std::string &service_uuid, const std::string &characteristic_uuid, std::vector< uint8_t > &value) noexcept override |
| | Read GATT characteristic value.
|
| |
| hf_bluetooth_err_t | WriteCharacteristic (const hf_bluetooth_address_t &address, const std::string &service_uuid, const std::string &characteristic_uuid, const std::vector< uint8_t > &value, bool with_response=true) noexcept override |
| | Write GATT characteristic value.
|
| |
| hf_bluetooth_err_t | SubscribeCharacteristic (const hf_bluetooth_address_t &address, const std::string &service_uuid, const std::string &characteristic_uuid, bool enable) noexcept override |
| | Subscribe to GATT characteristic notifications.
|
| |
| hf_bluetooth_state_t | GetState () const noexcept override |
| | Get current Bluetooth state.
|
| |
| int8_t | GetRssi (const hf_bluetooth_address_t &address) const noexcept override |
| | Get signal strength for a connected device.
|
| |
| hf_bluetooth_err_t | RegisterEventCallback (hf_bluetooth_event_callback_t callback) noexcept override |
| | Register event callback function.
|
| |
| hf_bluetooth_err_t | RegisterDataCallback (hf_bluetooth_data_callback_t callback) noexcept override |
| | Register data callback function.
|
| |
| hf_bluetooth_err_t | UnregisterEventCallback () noexcept override |
| | Unregister event callback function.
|
| |
| hf_bluetooth_err_t | UnregisterDataCallback () noexcept override |
| | Unregister data callback function.
|
| |
| hf_bluetooth_err_t | ConfigureClassic (const hf_bluetooth_classic_config_t &config) noexcept override |
| | Configure Bluetooth Classic parameters.
|
| |
| hf_bluetooth_err_t | SetDiscoverable (bool discoverable, uint32_t timeout_ms=0) noexcept override |
| | Make device discoverable.
|
| |
| bool | IsDiscoverable () const noexcept override |
| | Check if device is discoverable.
|
| |
| hf_bluetooth_err_t | ConfigureBle (const hf_bluetooth_ble_config_t &config) noexcept override |
| | Configure Bluetooth Low Energy parameters.
|
| |
| hf_bluetooth_err_t | GetPairedDevices (std::vector< hf_bluetooth_device_info_t > &devices) noexcept override |
| | Get list of paired devices.
|
| |
| std::string | GetImplementationInfo () const |
| | Get implementation-specific information.
|
| |
| uint32_t | GetSupportedFeatures () const |
| | Get supported features for current target.
|
| |
| virtual | ~BaseBluetooth () noexcept=default |
| | Virtual destructor for proper cleanup of derived classes.
|
| |
ESP32 Bluetooth implementation class.
This class provides ESP32-specific Bluetooth functionality with conditional compilation for different ESP32 variants:
- ESP32: BLE-only using NimBLE (optimized)
- ESP32/ESP32: Full Bluetooth with Classic + BLE
- ESP32C3/H2: BLE-only using Bluedroid
- ESP32S2: No Bluetooth support