Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wifi signal quality is a poor quality example #100

Open
nkh opened this issue Nov 30, 2018 · 1 comment
Open

wifi signal quality is a poor quality example #100

nkh opened this issue Nov 30, 2018 · 1 comment

Comments

@nkh
Copy link

nkh commented Nov 30, 2018

a='▂▄▆█'; s=$(iwconfig wlp61s0 | sed -E-n 's/[^0-9]=([0-9]{1,})/70.$/\1/p') ; : ${s:='-18'}; echo ${a:0:$(( ( $s / 18 ) + 1 ))}

call to spark is useless and code is unsightly (even for bash)

furthermore, sparks 0 1 2 3 4, and spark 1 2 3 4 0, differs from spark 1 2 3 4

@dukechem
Copy link

Not sure how above linux script is supposed to work, and I'll update with script for linux and macos when I get a chance. But for now, below is a quick-and-very-dirty proof-of-concept of wifi signal strength, 0 to 100%, in windows.

Note: easiest way to get a bash shell in windows is to install https://gitforwindows.org/ or just choco install git, then create /usr/local/bin and put spark there (optionally along with roundup, etc).

$ cat wifi-sig.sh
echo "Note. To reset history do:  rm /tmp/wifi.txt  "

for i in {1..7}  
do
  netsh wlan show interfaces | grep Signal | cut -d":" -f2 | cut -d"%" -f1 | tee -a /tmp/wifi.txt
  sleep 1  # adjust to desired number of secs between samples 
done
cat /tmp/wifi.txt  | spark

$ bash wifi-sig.sh
Note. To reset history do:  rm /tmp/wifi.txt  
 63
 74
 88
 88
 88
 88
 88
█████▁▁▅▃▆▆▃▁▁▁▃▃▃▃▆▆▆▆▆▆▆▅▅▅▅▅▅▅▂▃▆▆▆▆▆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants