Sniffer connector

This module provides the whad.unifying.connector.sniffer.Sniffer class that allows Logitech Unifying packets sniffing.

class whad.unifying.connector.sniffer.Sniffer(device: WhadDevice)[source]

Logitech Unifying Sniffer interface for compatible WHAD device.

add_key(key: bytes)[source]

Add encryption key to the curret sniffing configuration.

Parameters:

key (bytes) – Key to add

property address

Target address accessor.

available_actions(filter=None) List[source]

Identify available actions.

property channel: int

Retrieve current channel.

Returns:

current channel

Return type:

int

clear_keys()[source]

Remove all registered keys from current sniffing configuration.

property configuration

Current sniffing configuration accessor.

property decrypt

Current sniffing decryption flag accessor.

process_packet(packet)[source]

Implement the packet decryption if needed.

property scanning

Current sniffing configuration scanning flag accessor.

sniff(timeout: float = None) Generator[Packet, None, None][source]

Sniff Logitech Unifying packets

Parameters:

timeout (float) – Number of seconds after which sniffing stops, uninterrupted if set to None