Computing.Net > Forums > Programming > Hyperterminal in .bat

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Hyperterminal in .bat

Reply to Message Icon

Name: dperdomo
Date: May 6, 2006 at 10:03:19 Pacific
OS: Windows 2000
CPU/Ram: Intel Pentium 3.2
Comment:

I want to create a .bat to connect to a Switch Cisco 2900 via HyperTerminal and enable or disable a port. I try but i can´t transfer the password or comands via batch.
Somebody help me, please.
I try via telnet too, but i read that can´t use this commands via telnet, but if someone know how, tell me.
Thanks.




Sponsored Link
Ads by Google

Response Number 1
Name: FishMonger
Date: May 6, 2006 at 15:43:00 Pacific
Reply:

Scripting a hyperterminal session is not a very good choice, especially via a batch file.

You should use telnet or snmp, not hyperterminal. You can use just about any scripting language, but a batch script would be my last choice. My preference would be to use Perl.

"i read that can´t use this commands via telnet". Where did you read that nonsense? If the command can be executed from a hyperterminal or any other console session, it can certainly be executed in a telnet session.

If you want to use a batch file, I'll leave it up to IVO or M2Go to help you.


0

Response Number 2
Name: Mechanix2Go
Date: May 7, 2006 at 03:27:26 Pacific
Reply:

Hi folks,

I have never been able to script hyperterm. I don't think it's scriptable. {Is that a word?]

I would like to script telnet, but I don't habe a site that I can telnet to.

Does anyone have a sute available for telnet testing?

Don't put user/pw here.


=====================================
If at first you don't succeed, you're about average.

M2Go



0

Response Number 3
Name: ghostdog
Date: May 7, 2006 at 08:10:10 Pacific
Reply:

hi
scripting in telnet can be done in languages like Perl ,Python etc. For testing telnet, if you don't haave site to connect to for testing your telnet connections, you can set up your own telnet server and connect to your own machine.


0

Response Number 4
Name: FishMonger
Date: May 7, 2006 at 10:15:15 Pacific
Reply:

If you want to use a Perl script, there are a variety of modules available that will make this very easy. Some of these modules are specifically designed to connect to cisco devices.

http://search.cpan.org/~jrogers/Net-Telnet-3.03/lib/Net/Telnet.pm
http://search.cpan.org/~joshua/Net-Telnet-Cisco-1.10/Cisco.pm
http://search.cpan.org/~kraken/Net-Telnet-Cisco-IOS-0.6beta/lib/Net/Telnet/Cisco/IOS.pm

There are others available, but those are the first ones to look at.


0

Response Number 5
Name: dperdomo
Date: May 9, 2006 at 14:18:53 Pacific
Reply:

Thanks, Perl Script is amazing, i can connect automatic.
But i have a problem with the command 'set' in the switch Cisco 2900, appear "not config" in the help and when i try to execute display error. I connect with "enable" and enter in the "config term", but don´t work, some idea?
Help, again, please


0

Related Posts

See More



Response Number 6
Name: FishMonger
Date: May 10, 2006 at 07:07:26 Pacific
Reply:

Your description of the problem is not very clear. Can you post the script and the exact error message? Posting code in this forum is a real pain to the point of being a joke beacuse the formating gets screwed up. If you want, you can email it to me in addition to posting it here.

I don't have a 2900 to test, but the 7000 switch I connect to doesn't have "config term", instead it has "config network". What IOS version are you using?

When I get into work in a few hours, I'll see if I can connect to one of our 3500 switches. They should have the same or close to the same IOS as the 2900's.


0

Response Number 7
Name: dperdomo
Date: May 10, 2006 at 09:30:30 Pacific
Reply:

I try to enable or disable a port specific.
Really the scripts is not the problem, is the command of Switch.

In documentation of Cisco you can do it with command: "set port enable X/X" or "set port disable X/X", but when i try to execute it in Switch, it displays something like this:

XXXX#set port enable 0/10
^
% Invalid input detected at '^' marker.

When i see the help, display this:

set Set system parameter (not config)

What can i do?, exist other command to do what i want?

Thanks


0

Response Number 8
Name: dperdomo
Date: May 10, 2006 at 09:36:23 Pacific
Reply:

The '^' marker, really display at the end of word 'set'


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Hyperterminal in .bat

rem, in bat files www.computing.net/answers/programming/rem-in-bat-files/18562.html

help me in .bat www.computing.net/answers/programming/help-me-in-bat/1015.html

errorlevel in bat script www.computing.net/answers/programming/errorlevel-in-bat-script/14621.html