There is no iwconfig on mac, so create it. :::cd ../../usr/local/bin :::sudo nano iwconfig
iwconfig
#!/bin/sh
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s
:::sudo chmod a+x iwconfig
It should be done. Hit iwconfig to check.
test.py
import subprocess as spc
rest=spc.check_output("iwconfig")
list=rest.split()
ss=list.index("The SSID you want to find")
ss=ss+2
RSSI=abs(int(list[ss]))
print(RSSI)
It seems that the closer to 0, the stronger the signal strength.
Just run the command on python and format the output (forced)
Recommended Posts