bundle.ble.scanner

High-level helpers for BLE discovery and presentation.

Attributes

Classes

ScanResult

Entity describing a scan run and its collected devices.

Scanner

Collect advertisement snapshots from nearby peripherals.

Functions

discover(→ list[bundle.ble.device.Device])

Module Contents

bundle.ble.scanner.log
bundle.ble.scanner.DEFAULT_SCAN_TIMEOUT = 5.0
class bundle.ble.scanner.ScanResult(/, **data: Any)

Bases: bundle.core.data.Data

Entity describing a scan run and its collected devices.

timeout: float = None
devices: list[bundle.ble.device.Device] = None
sorted_devices() list[bundle.ble.device.Device]
lines() list[str]
class bundle.ble.scanner.Scanner(/, **data: Any)

Bases: bundle.core.Entity

Collect advertisement snapshots from nearby peripherals.

timeout: float = None
async scan(*, timeout: float | None = None) ScanResult
async bundle.ble.scanner.discover(*, timeout: float = DEFAULT_SCAN_TIMEOUT) list[bundle.ble.device.Device]