3
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

特定のSSIDの電波強度RSSIを表示する(mac)

Last updated at Posted at 2017-08-18

macにはiwconfigがないので作る。
:::cd ../../usr/local/bin
:::sudo nano iwconfig

iwconfig
#!/bin/sh

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

できてるはず。
iwconfig叩いて確認しましょ。

私はプログラムの中で使うので↓のようにテストしました。

test.py
import subprocess as spc
rest=spc.check_output("iwconfig")
list=rest.split()
ss=list.index("探したいSSID")
ss=ss+2
RSSI=abs(int(list[ss]))
print(RSSI)

0に近い方が電波強度強いらしい

python上でコマンド動かして出力を整形してるだけ(強引)

3
5
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?