Have you ever wondered how to monitor your WiFi connection from the command line? While experimenting with an Edimax WiFi dongle on my Raspberry Pi I wanted an easy method to monitor the wireless signal strength as I moved around the house.
The Pi was running from a USB power bank and sometimes this can result in the WiFi dongle dropping the signal. It’s hard to trouble-shoot WiFi issues so I went looking for a simple utility that would constantly report the status of the connection.
Eventually I found a utility called Wavemon. It’s free, easy to install and does exactly what I needed.
Installation
To install Wavemon use the following command :
sudo apt-get install -y wavemon
Launching
You can run Wavemon from the command line after the Pi has booted or from within a LXTerminal window once you have launched LXDE using “startx” using :
wavemon
This will present you with the main screen :
The toolbar along the bottom shows the pages available. Each one is associated with a function key.
F2 displays a graph of you signal levels. The graph below was created using the “random data” setting in the preferences to make it a bit more exciting.
F3 lists the wireless networks visible to your Pi as well as the signal strength and the channel they are using.
F7 displays the preferences page. These can be left at the default values but I changed the “override scale autodetect” to “on” and increased the signal level maximum to 30dBm. This allowed the graph on the “F2:lhist” to correctly display the signal level from my connection which was averaging 20dBm and initially off the top of the screen.
F8 displays the help screen. There isn’t much there at the moment!
F9 will display the author and licence details.
F10 (or the letter Q) will quit the utility and return you to the command line.
Alternative Method to Monitor Your WiFi
For a really quick snapshot of your WiFi performance you can use :
iwconfig
which will give you something like :
wlan0 IEEE 802.11bg ESSID:"TheMatrix" Nickname:"<WIFI@REALTEK>" Mode:Managed Freq:2.427 GHz Access Point: 00:18:4D:10:49:C6 Bit Rate:54 Mb/s Sensitivity:0/0 Retry:off RTS thr:off Fragment thr:off Power Management:off Link Quality=98/100 Signal level=83/100 Noise level=0/100 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Wavemon Configuration File
The configuration file is located in :
/home/pi/.wavemonrc
and can be edited directly using :
sudo nano .wavemonrc
You don’t need to edit it manually. I include the information just in case you wanted to!
10 Comments
I installed wavemon, but I DON’T see the .wavemonrc file anywhere.
Try using
ls -a
and see if it appears in the file list. It starts with a “.” so is hidden by default. If not you may need to use F7 within Wavemon, save the settings and then quit. See if the config file exists then.Yes I know about listing hidden files. F7 did the trick,
thanks!
How are you showing the graphic borders? Mine are just x’s and q’s and so-forth.
I’m set to UTF-8 in the raspi-config. Is there something else that needs editing?
At the moment I am using my Pi with an HDMIPi. So I suspect it might be because I’ve changed my console font size using https://www.raspberrypi-spy.co.uk/2014/04/how-to-change-the-command-line-font-size/. When I run raspi-config I also get straight lines around the edge but looking at screenshots I’ve used in the past this isn’t always the case.
I ran into the same thing. I had to set PuTTY to “use font encoding” to fix it (Window -> Translation -> Remote Character Set). I haven’t seen anything else get screwed up so far but I just did it so YMMV.
So 3 years later I’ve just tried this guide against the latest version of Raspbian. I installed Wavemon and got letters rather than nice borders. However after I ran raspi-config to configure something else and rebooted Wavemon looked like the screenshots. So I would suggest running “sudo raspi-config” and then rebooting.
I use my Pi A with a powerbank and usb wifi dongle. If loose my connection, I also loose the possibility to shutdown nicely.
Could you please come up with a cron script to check if the wifi connection is down and then restart it every x minutes, please?
Anyone have a good suggestion for how to store the RSSI, Noise, and SNR values reported by wavemon?
Can I extract the Signal Strength and Link Quality using C program to monitor wifi autonomously..
Please suggest me if any one have any idea about this.