hammerspoon2-docs
    Preparing search index...

    Function interfaceDetails

    • Returns detailed information about a Wi-Fi interface.

      This is safe to call frequently. The interface's cached scan results and its configuration are available from cachedScanResults() and configuration(), which are kept separate because fetching them can leak memory inside macOS.

      active reports whether the interface is in use, and does not need Location Services authorization, so it's a way to check that Wi-Fi is connected without that permission.

      Parameters

      • Optionalinterface: string | null

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

      Returns Record<string, any> | null

      a table with keys interface, active, power, ssid, bssid, security, interfaceMode, activePHYMode, rssi, noise, transmitRate, transmitPower, countryCode, hardwareAddress, wlanChannel, supportedChannels; or null if the interface doesn't exist. ssid/bssid/countryCode/wlanChannel may be absent without Location Services authorization.