Initially, I wrote this script to give me frequent feedback on the signal strength. This is useful when adjusting antennas to that sweet spot that give stronger signals; especially if you’re testing some homemade tinfoil parabolic reflectors! 😉 If you have a portable wireless device, like a netbook, you can
ssh into your (wireless) desktop and run
wireless-strength to get realtime feedback on adjustments to the access point’s antenna… assuming the connection doesn’t break. 😛 And, of course, you can just walk around running it on your mobile device to create a kind of wireless heatmap.
If you have gnuplot, you can also generate graphs from the data with
ws-plot. This is me walking around my house with my notebook:
I started in my room (40% ), which is where the first peak is – near the window. Left my room, back to 40%, peak near window again, then bathroom… 40%. The climb from 40-80% is me walking towards the TV room (PS3 lives in a solid 80% zone, at least!). Walked upstairs, got 100% in most areas (that’s where the Access Point is) – tried a bedroom, dropped to 40%.
Download the scripts and get more details here: https://github.com/izm/wireless-strength
This script originated years back, but I recently tried using it on my laptop and it didn’t work! Unacceptable! The original parsed the output of
iwconfig. But what showed up as “Quality=30/70″ on my desktop, would show up as “Quality:4″ on my laptop. COMPLETELY DIFFERENT. Even the character after “Quality” was different! o.O The output of iwconfig is driver dependent, which is why I looked to
network-manager. I figured there’s probably a nice dbus command I can send to network-manager for that purpose – but I got tired of looking and decided to just parse output again. :/ Luckily, network-manager includes
nm-tool. It’s certainly not a clean solution, but it works for now.
I also used
updating rewriting the script as an excuse to get better acquainted with git – which I’m really liking.
Every time I do a
bash script, I vow to do the next script in Python. I like Python and I don’t like Bash… but there’s a certain… nativeness or dependency-free elegance to bash scripts. Still, I hate writing them, and the next script’s in Python! 😛