glr10 Posted August 28, 2007 Share Posted August 28, 2007 I haven't written a basic program since my Trash-80 died and when VB and C came on board I didn't have time to learn a new language. Anyway now I am trying to do a simple project using Autoit to change the config file on the Livingston and Cisco routers. I wrote a very newbie script using a sleep() between each command because I could not figure out how to get the routers response from the Hyperterm window. When I used the WinGetText it returns the time from the Hyperterm frame and does not get the test from the window inside the frame. I read a lot of posts on this forum and a few on getting from the com port but the main one required VB. I don't have VB on my pc. I would like to read it from within Hyperterm but then again I want the last few words sent from the router. Thanks - I'd appreciate any guidance Link to comment Share on other sites More sharing options...
enaiman Posted August 28, 2007 Share Posted August 28, 2007 I use to work with switches everyday (Extreme Networks not Cisco but the point is the same) and I found Hyperterm to be kinda difficult to use so I went for an amazing free software which is TeraTerm - download linkIt has a big advantage over Telnet: it can be used for serial links (COM1) which is very useful when configuring switches on site.Download, install and give it a try - if you like it, I will be able to help you. What I've managed to do is a very complex script able to handle every type of switch built by Extreme, no matter the operating system used and the command synthax. The script is logging into the switch, running some commands for extracting important info (switch type, firmware, bootrom, operating system) and sets variables according to what it finds. The script is able to update firmware, bootrom, generate SSH keys, manage accounts, manage SNMP, configure the switch (VLANs, spanning tree,banners, RADIUS ... all the stuff).The key here is to use the log ability of Tera Term and to read the log file abfer you sent a command - that will return the switch answer to your command:ex: first you send a @CR in order to get the first line in the log file -> read the log and find that the answer is "login" -> send "admin" -> read the log again and the answer is "password" -> send the password -> read the log again and ... if the switch returns "something ... #" then you're in, but if the switch returns "login failed" you know that something went wrong .... and so on ... Is a tremenduous work to make such a script but is entirely possible. Mine is working very well and I'm still adding features (working on it for the last 6 months).As I said - try TeraTerm and I might be able to help (however the biggest part of the work will be done by yourself - I will give you everytime the guidelines and help with the code as much as I can).Good luck, SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
glr10 Posted August 29, 2007 Author Share Posted August 29, 2007 (edited) Thanks - I will give TeraTerm a try. I am not looking for anything quite so complex. I mainly want to switch who it tells the modem to call but I have to erase the config and put it back in. Lucent routers you almost have to type it all in. I thought I'd try to automate it a little. Thanks Edited August 29, 2007 by glr10 Link to comment Share on other sites More sharing options...
Janus Posted August 29, 2007 Share Posted August 29, 2007 HayTry http://www.codeproject.com/useritems/PaPiC.asp this is a page on it.It use Inpout32.dll and you can use it in Autoit3. It is simple to use.If you will read on the hardware and some oldtimes software way to interface RS232 and LPT then se http://beyondlogic.org/Best Regaards fromJanus Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now