hammerspoon2-docs
    Preparing search index...

    Function scanNetworks

    • Scans for visible Wi-Fi networks. This can take a few seconds; it runs off the main thread so it does not block the app.

      Parameters

      • Optionalinterface: string | null

        the interface name as returned by interfaces(); omit for the system's default Wi-Fi interface

      Returns Promise<object[]>

      A Promise that resolves to an array of network tables, each with keys ssid, bssid, rssi, noise, ibss, countryCode, beaconInterval, security, phyModes, wlanChannel, informationElementData; or rejects if the interface doesn't exist or the scan fails. bssid/countryCode may be absent without Location Services authorization. informationElementData is raw beacon/probe-response data returned as an array of byte values (0-255) rather than a string, since it can contain sequences that are unsafe to render as text.