1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to read 'Signal Quality' from command line?

Discussion in 'Tomato Firmware' started by gijs73, Feb 26, 2014.

  1. gijs73

    gijs73 LI Guru Member

    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 Addicted to LI 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 Google.com 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:
    Code:
    #!/bin/sh
    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:
    pstt.jpg
     
    Last edited: Feb 26, 2014
    gijs73 likes this.
  4. gijs73

    gijs73 LI Guru Member

    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. gijs73

    gijs73 LI Guru Member

    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:

    http://www.amazon.com/dp/B00DMJI9TA/ref=pe_385040_30332190_TE_3p_M3T1_ST1_dp_1

    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).

    [​IMG]
     
    mvsgeek and darkknight93 like this.
  6. mvsgeek

    mvsgeek Addicted to LI 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. gijs73

    gijs73 LI Guru Member

    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: http://www.dd-wrt.com/wiki/index.php/Wl_command#rssi

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

    My graph was created in Excel.
     
    mvsgeek likes this.

Share This Page