Signal strength from Cisco 350 Bridge from perl script?

Discussion in 'Cisco' started by tomviolin, Apr 23, 2005.

  1. tomviolin

    tomviolin Guest

    What I would like to do is create a Perl script to periodically perform
    a link test on a Cisco 350 bridge and record the current signal
    strength. I'm doing this as part of a site survey.

    Has anyone done this?

    Currently, I'm experimenting with the 350's telnet interface, but it
    looks to be a bit messy to get it to work.

    Any help/pointers would be appreciated. Thanks!
     
    tomviolin, Apr 23, 2005
    #1
    1. Advertisements

  2. tomviolin

    Duane Arnold Guest

    You might want to try comp.programming there are perl people there who
    might be able to help.

    Duane :)
     
    Duane Arnold, Apr 24, 2005
    #2
    1. Advertisements

  3. Yes, but with a Aironet 340, not a 350. Signal strength and other
    data is available via SNMP. The periodic data logging and graphing is
    done with either MRTG or RRDTOOL. See:
    | http://www.mrtg.org
    | http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
    Polling rate is every 5 minutes. Usually one uses MRTG and RRDTool to
    graph network traffic. Anything available via SNMP (as an integer)
    can be graphed. Signal strength and S/N ratio is in there somewhere.
    You'll need the various MIB databases for the 350 to determine the
    proper OID's. They're on the Cisco web pile at:
    | ftp://ftp-sj.cisco.com/pub/mibs/supportlists/c350/c350-non-ios-supportlist.html
    I'm not sure what you mean by "link test" and how you plan to record
    the data. If link test is a simple ping test to see if the link is
    alive, then something like Big Brother, WhatsUP, Nagios, PingProbe or
    other management tool that's designed to check if network servers are
    up should work as well for wireless.
     
    Jeff Liebermann, Apr 24, 2005
    #3

  4. You might try

    http://search.cpan.org/~jrogers/Net-Telnet-3.03/lib/Net/Telnet.pm

    or

    http://search.cpan.org/~joshua/Net-Telnet-Cisco-1.10/Cisco.pm

    or

    http://search.cpan.org/search?query=cisco&mode=all



    John
     
    John Mason Jr, Apr 24, 2005
    #4
  5. Tom,

    I haven't worked with the Aironet devices yet (we will be getting in some
    1100 series in a few months) but I assume that they use IOS like most other
    Cisco devices. If so I may have a PERL script for you. I wrote it as an
    interface for Net::Telnet::Cisco and Net::SSH::perl. It has the ability to
    connect to any IOS device via telnet or SSH and run a series of commands. I
    have used it to make updates to over 500 devices. It outputs the results of
    the command to a text file, which could easily be formatted to HTML or XML.
    If your interested, let me know. It should be uploaded to CPAN soon for all
    to see, touch, feel, and poke fun at.. :)

    -Richard
     
    Richard Graves, Apr 24, 2005
    #5
  6. tomviolin

    RobO Guest

    Hi Tom,

    Take a look at the Cisco-Centric Open Source (COSI).
    http://cosi-nms.sourceforge.net/
    There are quite a few snmp/perl/expect scipts and tools you might find
    useful.
    I'll second most tool thats been mentioned in this post, thanks to Open
    Source all the way!!!

    PS. Richard, I am interested in your script if you dont mind me
    asking?!

    Regards,
    Rob
     
    RobO, Apr 25, 2005
    #6
  7. I replied to your hotmail account with a copy of the script!

    -Richard
     
    Richard Graves, Apr 25, 2005
    #7
  8. Duh... Extracted from my own MRTG install instructions is this script
    that will return the uptime from a router. I use it for testing SNMP.
    Change the host name to the Cisco router, the community name, and the
    OID to whatever is the OID for signal strength.

    You'll need to get BER.PM and SNMP_SESSION.PM from either the MRTG
    distribution, or the latest from:
    http://www.switch.ch/misc/leinen/snmp/perl/dist/


    use BER;
    use SNMP_Session;
    # Return the uptime of the localhost to test SNMP
    $host = "localhost";
    $community = "public";
    $oid = encode_oid(1,3,6,1,2,1,1,3,0); # Uptime
    $session = SNMP_Session->open ($host, $community, 161)
    || die "Can't open SNMP session to localhost";
    $session->get_request_response ($oid);
    ($bindings) = $session->decode_get_response ($session->{pdu_buffer});
    ($binding,$bindings) = &decode_sequence ($bindings);
    ($oid,$value) = &decode_by_template ($binding, "%O%@");
    print &pretty_print($oid)," => ", &pretty_print ($value), "\n";
     
    Jeff Liebermann, Apr 25, 2005
    #8
  9. tomviolin

    R Siffredi Guest

    Richard,
    Can I get a copy of the script also?
    Thanks,
    RS
     
    R Siffredi, Apr 26, 2005
    #9

  10. Hi All,

    I finally got a chance to upload it to CPAN. It is in the Networking
    section of the Scripts Repository at
    http://www.perl.com/CPAN/scripts/Networking/index.html.

    The files are:

    CCS_main.pl
    CCS_sub_SSH.pl
    CCS_sub_Telnet.pl

    Enjoy!!

    -RMG
     
    Richard Graves, Apr 26, 2005
    #10
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.