Scanner connector
This module provides a scanner connector whad.esb.connector.scanner.Scanner
for WHAD ESB devices, allowing to discover available Enhanced ShockBurst devices.
It relies on the use of the WHAD ESB protocol. It puts the hardware adapter in pseudo-promiscuous sniffing mode and iterates over the channels to discover Enhanced ShockBurst communications. The packets are then processed to extract device informations.
This mode is only available with WHAD devices that support promiscuous sniffing.
This connector must be instantiated with a compatible WHAD device, as shown below:
device = WhadDevice.create('uart0')
scanner = Scanner(device)
If the underlying device does not support promiscuous sniffing, this connector will raise
an UnsupportedCapability
exception.
- class whad.esb.connector.scanner.Scanner(device)[source]
ESB Observer interface for compatible WHAD device.
- discover_devices(minimal_rssi=None, filter_address=None) Iterator[CommunicatingDevice] [source]
Parse incoming packets and yield discovered devices.
- Parameters:
minimal_rssi (float, optional) – Minimal RSSI level
filter_address (
whad.esb.bdaddr.ESBAddress
, optional) – ESB address of a device to discover