Is there an API or software to get accurate Wi-Fi signal strength on a Mac?

Is there an API, shell command, or AppleScript to get an accurate reading of the current Wi-Fi power in Mac OSX?

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

What I'm trying to do is test the power of Wi-Fi for different places in my kitchen or living room. I need to check the power of WiFi for every place. If it is low, I’m moving to a new place. The WiFi bars displayed by OSX don't have enough data for me.

+4
source share
4 answers

There is a built-in airport team that will do this. This location:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport

, .

 sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport

airport -I

http://osxdaily.com/2007/01/18/airport-the-little-known-command-line-wireless-utility/

, , AppleScript, :

set wirelessRSSI to do shell script "airport -I | grep CtlRSSI | sed -e 's/^.*: //g'"
set wirelessStrength to (wirelessRSSI + 100) * 2
display notification "Wireless sigal quality: " & wirelessStrength & "%"
+3

Python script, 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()
+4

, , OS X , , .

, RF, , - , , , , .

, - , , , . WiFi - , , . , GUI , , , , ( , ).

, - " WiFi A , WiFi B" . , - , , OSI. - , UDP- pingable. , , , UDP , , ( ping ICMP, - , ).

+1

. Finder

/System/Library/CoreServices/Applications

Wireless Diagnostics.app

.

"" ( ) "" :

  • WiFi- ⌘6
  • (/) ⌘5
  • Wifi- ( ) ⌘4
  • (, DHCP, DNS ..) ⌘3
  • WiFI ⌘2 ( , Alt )

1.21 Gigawatts

:

  • , "" .
    • , , .
    • .

:

  • .
  • . ( date_string.wdmon)
  • Apple.
  • , - .:)
  • , ( ), , , .
  • , .

:

  • . ( "" ).
  • - Window menu, .
  • do not double-click on files if you do not know what will happen

Warning users about data collection is good. Thank you for your explicit warning.

0
source

All Articles