Function find_device_with_options

Source
pub async fn find_device_with_options(
    identifier: &str,
    options: ScanOptions,
) -> Result<(Adapter, Peripheral)>
Expand description

Find a specific device by name or address with custom options.

This function uses a retry strategy to improve reliability:

  1. First checks if the device is already known (cached from previous scans)
  2. Performs up to 3 scan attempts with increasing durations

This helps with BLE reliability issues where devices may not appear on every scan due to advertisement timing.