hammerspoon2-docs
    Preparing search index...

    Function scan

    • Scans for BLE peripherals nearby. Only one scan can run at a time. Each peripheral found is also delivered to 'discovered' listeners (see on()) as soon as it's seen.

      Parameters

      • Optionaloptions: Record<string, any> | null

        An object with any of:

      Returns Promise<HSBluetoothPeripheral[]>

      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