pub struct BleRadio {
pub ble_connector: BleConnector<'static>,
}Fields§
§ble_connector: BleConnector<'static>Implementations§
Source§impl BleRadio
impl BleRadio
Sourcepub fn new(bt: BT<'static>) -> Result<Self, RadioError>
pub fn new(bt: BT<'static>) -> Result<Self, RadioError>
Initialize BLE in scan-only mode with minimal buffer footprint.
esp-radio’s Config::default() sizes the BT-controller blob for
max_connections=6 and scan_duplicate_list_count=100. On ESP32-S3
that defaults to ~36 KB of heap, which doesn’t fit alongside LVGL on
cores3 (56 KB heap). Our use case is passive scanning of Victron
advertisements — we never open a connection, and only a handful of
distinct advertisers exist on the bus.
max_connections=1 is the minimum the controller accepts. Setting
it to 1 shrinks the per-connection static state. Combined with a
10-entry duplicate-filter (the spec minimum, range 10–1000), this
frees ~10 KB on ESP32-S3 and a smaller amount on ESP32.
Sourcepub fn with_use(bt: BT<'static>, ble_use: BleUse) -> Result<Self, RadioError>
pub fn with_use(bt: BT<'static>, ble_use: BleUse) -> Result<Self, RadioError>
Like new, sized for ble_use on top of the scan. On
ESP32-S3 an advertiser on the scan-only controller gets HCI Memory
Capacity Exceeded from every LE Set Advertising Parameters.