BLE Sniffer Interface
The BLESnifferInterface
provides the ability to write PCAP files from a connected Nordic BLE sniffer.
The homepage for sniffer is found here.
BLESnifferInterface
Provides an interface to a Nordic BLE sniffer module, connected via serial port. This interface creates PCAP files by managing a child process that runs separately from the tests to optimally use multiple CPUs.
__init__(serial_port)
Create a BLESnifferInterface.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
serial_port
|
Name of BLE sniffer serial port |
required |
_send_command(command_type, data)
Send a command via the input queue and wait for a result from the output
start_sniffing(outfile, device_address, address_is_random=True)
Start sniffing for a specific device by address.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
outfile
|
str
|
Name of output pcap file |
required |
device_address
|
str
|
Address (as a string of octet values separated by colons) of device to follow |
required |
address_is_random
|
bool
|
True if address is random (default), False if address is public |
True
|
Returns:
Type | Description |
---|---|
bool
|
True on success, False otherwise |
stop_sniffing()
Close the sniffer, stop the child process and cleanup all resources. This function may block while the child process is joining.
Returns:
Type | Description |
---|---|
bool
|
True on success, False otherwise |