# startSearchForId

public IDeviceScanner.DeviceScannerState startSearchForId(IDeviceScanner.OnDeviceFoundListener listener, String id, Long scanPeriodMs)

Starts a search for a specific Nix device using Bluetooth. The search will run until the specified device is found, or until a timeout elapses, whichever is shorter. This search can alternatively be achieved without a callback by calling the coroutine function scanForHardwareId.

#### Return

New state of the scanner after invoking this call.

#### Parameters

id

Nix device ID used to filter search results.

listener

Callback to be invoked when the specified device is found.

scanPeriodMs

Time period to run the search, in milliseconds. If omitted, the default value of DEFAULT_SINGLE_DEVICE_PERIOD_MS is used.

#### See also

DeviceScanner.scanForHardwareId
IDeviceCompat.id