Results 1 to 9 of 9

Thread: Simple clients signal level measuring

  1. #1

    Post Simple clients signal level measuring

    Here is simle script for measuring signal level from clients as seen at the AP radio.

    Instalation:
    > login using telnet to AP
    cd /tmp/local
    vi rssi
    > press 'a' and paste rssi.txt
    > press ESC and enter ':wq'
    vi rssi2
    > press 'a' and paste rssi2.txt
    > press ESC and enter ':wq'
    chmod +x rssi*
    flashfs save
    flashfs commit
    flashfs enable

    Now the script is saved in flash and you can run it with:
    /tmp/local/rssi

    Signal level is (probably) updated whenever AP receive packet from client.
    I found it usefull for troubleshooting poor radio performace - low signal level from one client makes radio transmit at lower rate whenever it talks to this client.
    Maybe Oleg should put something like this in the new FW release?
    It would be nice to see the results via web management too ;-)


    Here is a little 'screenshot':
    -------------------------------------------------------
    rate is 54 Mbps
    xx:xx:xx:xx:xx:xx -80 ********************
    xx:xx:xx:xx:xx:xx -76 ************************
    xx:xx:xx:xx:xx:xx -85 ***************
    xx:xx:xx:xx:xx:xx -71 *****************************
    -------------------------------------------------------
    MACs are replaced with xx for some reason.

    And yes, this script can be executed remotely via telnet wireless connection to the AP as it doesn't switch off radio.
    Attached Files Attached Files
    Last edited by pekr; 28-02-2005 at 15:09. Reason: small improvement (rssi2.txt) - wrong line feed when RSSI = 0

  2. #2
    Thanks !

  3. #3
    Join Date
    Aug 2004
    Location
    Germany
    Posts
    377
    Hi

    Cool thing, no way.
    How about reverse lookup in the dhcp table to get IP´s ?

    Greets
    My Stuff: WL-500g, Mapower H31x 10GB HD, Philips Webcam Vesta PRO, TerraTec Webcam PRO, USB Hub

  4. #4
    Join Date
    Jan 2005
    Location
    Brno, Czech Republic
    Posts
    3

    Lightbulb Modified script with IP lookups

    Quote Originally Posted by WlanMan
    Hi
    Cool thing, no way. How about reverse lookup in the dhcp table to get IP´s ?
    Greets
    I modified scripts above a bit. It is single script and it shows also IP address assigned to MAC by dnsmasq.

    Code:
    #/bin/sh
    
    while (true); do
      echo -e "\033[2J" #clear screen
      al=`wl assoclist | sed s/assoclist\ //`
      wl rate #write wifi rate
    
      for i in $al; do
        echo -n "$i |"
        sig=`wl rssi $i | sed s/rssi\ is\ //`
        if [ $sig -eq "0" ]; then echo -n "     "; sig="N/A";
        else
          if [ $sig -gt "-90" ]; then echo -n "*"; else echo -n " "; fi
          if [ $sig -gt "-80" ]; then echo -n "*"; else echo -n " "; fi
          if [ $sig -gt "-70" ]; then echo -n "*"; else echo -n " "; fi
          if [ $sig -gt "-60" ]; then echo -n "*"; else echo -n " "; fi
          if [ $sig -gt "-50" ]; then echo -n "*"; else echo -n " "; fi
        fi
        echo -n "| $sig | "
    
        #get IP from dnsmasq dhcp log
        ip=`cat /tmp/dnsmasq.log | grep -i $i`
        if [ "$ip" != "" ]; then
          i=0 #index
          for field in $ip; do
            i=`expr $i + 1` #increment index
            if [ $i -eq "3" ]; then #third field is IP address
              echo $field
            fi
          done
        fi
      done
      sleep 1
    done
    Output looks like this:
    Code:
    rate is 11 Mbps
    XX:XX:XX:XX:XX:XX |*    | -86 | 192.168.1.1
    XX:XX:XX:XX:XX:XX |**   | -76 | 192.168.1.2

  5. #5
    Join Date
    Feb 2005
    Location
    Germany - Frankfurt a.M.
    Posts
    299
    Nice script!

    Thank you
    WL-500gP => 1.9.2.7-7g (2007-04-06)
    Running: thttpd, php 5.1, vsftp, rrdtool

    http://onlinefussballmanager.de/userbar/0/53647.png

  6. #6
    Join Date
    Aug 2004
    Location
    Germany
    Posts
    377
    Verry well done, thank you !
    My Stuff: WL-500g, Mapower H31x 10GB HD, Philips Webcam Vesta PRO, TerraTec Webcam PRO, USB Hub

  7. #7

    Thumbs up

    How does dhcp table look like?

    Cool script!!

  8. #8
    here is a little bug i found while executing rss2:

    Code:
    [root@wl500gx root]$ ./rssi2
     eth1: Invalid argument
    rssi    Get the current RSSI val, for an AP you must specify the mac addr of the STA
    
     [: 0: unknown operand
    [: -90: unknown operand
    [: -80: unknown operand
    [: -70: unknown operand
    [: -60: unknown operand
    [: -50: unknown operand
    what i had at this moment was: wl ap = 1
    now i turned it off: wl ap = 0
    then it worked

    maybe update your script by adding the line:
    if [ -z ${rssi} ] ; then exit ; fi
    right after the first set of the variable rssi, to prevent this error or turn ap off on script startup

    thanx

  9. #9

    Re: Simple clients signal level measuring

    Quote Originally Posted by pekr
    Here is simle script for measuring signal level from clients as seen at the AP radio.
    Nice idea!

    I took the liberty of speeding up rssi2 and adding support for WDS peers to rssi.

    rssi2 is now easily fast enough to do a simple 'sat-finder' type running display, nice for aligning antennas. This is in rssitest.

    Upload the same way as in pekr's post
    Attached Files Attached Files
    Last edited by Miki; 20-12-2005 at 05:18.

Similar Threads

  1. PPPD debug level
    By Kitsok in forum WL-500g Q&A
    Replies: 5
    Last Post: 01-03-2005, 07:19
  2. Simple ICS via PC in XP
    By davidsanton in forum WL-138g [Marvell Chipset]
    Replies: 1
    Last Post: 16-10-2004, 09:10
  3. Replies: 2
    Last Post: 19-05-2004, 12:45

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •