Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an API or software to get accurate strength of a WiFi signals on Mac?

Is there an API, shell command or AppleScript for getting an accurate reading of the current WiFi strength in Mac OSX?

FYI I can also open a browser and use JavaScript if it has that value available.

What I'm trying to do is check WiFi strength for different spots in my kitchen or living room. I need to check WiFi strength for each spot. If it's low I move to a new spot. The WiFi bars that OSX displays is not enough data for me.

like image 229
1.21 gigawatts Avatar asked Feb 10 '23 20:02

1.21 gigawatts


1 Answers

Here's a simple Python script which uses the CoreWLAN framework:

#!/usr/bin/python

from AppKit import CWInterface

IFACE = 'en0'
NAME  = 'MyWifiNetwork'

interface      = CWInterface.interfaceWithName_(IFACE)
results, error = interface.scanForNetworksWithName_error_(NAME, None)

for result in results:
    print 'SSID:', result.ssid()
    print 'RSSI:', result.rssiValue()
like image 100
robertklep Avatar answered Apr 27 '23 07:04

robertklep