How to read 'Signal Quality' from command line?

Discussion in 'Tomato Firmware' started by Deleted member 23868, Feb 26, 2014.

  1. The Tomato router is being used in CLIENT mode (i.e. it is connected to another Wireless AP). What is the command to read the Tomato router's Signal Quality from the command line (when logged in via SSH)?

    This question is for a script that will write the Signal Quality every 'x' minutes to a log.

    Thank you.
    darkknight93 likes this.
  2. mvsgeek

    mvsgeek LI Guru Member

    The following commands

    wl scan
    wl scanresults

    ...will return something like this for each SSID within range:

    SSID: "wireless"
    Mode: Managed RSSI: -59 dBm SNR: 0 dB noise: -88 dBm Flags: RSSI on-channel Channel: 1
    BSSID: 00:90:4C:5F:00:2A Capability: ESS ShortSlot
    Supported Rates: [ 1(b) 2(b) 5.5(b) 11(b) 18 24 36 54 6 9 12 48 ]

    ...which you could then parse (with awk?) to extract the values you want, and then use the logger command to write them to the log. Use either cron or the gui scheduler to run the script as required.

    Sorry but I'm not sufficiently awk-literate to do the hard part:(
  3. darkknight93

    darkknight93 Networkin' Nut Member

    I'll try to make a bash script file for that. Thanks for inspiring. I'm currently "only" Monitoring WAN ping to as my router joined a WiFI Network (wan side) but saving the Signal strength is a nice idea!

    We can use following commands (only as WifI Client!)
    wl rssi <-- Outputs RSSI (Signal strength in db)
    wl noise <-- Noise/issues in db

    Real Signal bash:
    wlrssi=`wl rssi`
    wlnoise=`wl noise`
    wlsignal=`expr $wlrssi - $wlnoise`
    echo $wlsignal
    you could use this to create a rrd database e.g., creating a graph looking like:
    Last edited: Feb 26, 2014
    Deleted member 23868 likes this.
  4. Thank you the "wl rssi" and "wl noise" is perfect. In my case, I am testing several different aftermarket antennas therefore a way to record the signal quality over a period of time is very useful.
  5. The commands from darkknight93 worked. I was able to measure the signal quality for a period of 1 hour, every minute using a script (60 data points total). First with the original RT-N16 antennas, the second time with the aftermarket antennas I got from Amazon here:

    The following graph shows the difference (original = blue; aftermarket = red). Average signal quality with the original was 24. With aftermarket was 28. Keep in mind the aftermarket antennas are very large (15 inches long).

    mvsgeek and darkknight93 like this.
  6. mvsgeek

    mvsgeek LI Guru Member

    Unfortunately wl rssi doesn't work for me - it returns wl: bad argument
    If I supply the MAC address I get wl: not found
    I suspect it has something to do with WDS.

    Slightly OT question - how did you produce the graph?
  7. darkknight93

    darkknight93 Networkin' Nut Member

    mvsgeek likes this.
  8. To: mvsgeek. If your router is in AP mode, you have to specify the MAC address of the client with the "wl rssi" command. See this link:

    In my case, my router is in client mode so this does not apply.

    My graph was created in Excel.
    mvsgeek likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice