Optionaloptions: { allowDuplicates?: boolean; seconds?: number; services?: string[] } | null
How to scan
OptionalallowDuplicates?: booleanDeliver every advertisement to 'discovered' listeners, not just the first from each peripheral, e.g. to follow signal strength. Defaults to false
Optionalseconds?: numberHow long to scan for, counted from when Bluetooth is ready (e.g. after the permission prompt is answered). Defaults to 10
Optionalservices?: string[]Only report peripherals advertising one of these service UUIDs
A Promise resolving to the peripherals found when the scan ends, or when stopScan() is called. Rejects if a scan is already running, the options are invalid, or Bluetooth is unavailable
Scans for BLE peripherals nearby. Only one scan can run at a time.
Each peripheral found is also delivered to
'discovered'listeners (seeon()) as soon as it's seen.