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.
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()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With