I think I am going crazy. I'm writing a utility in TCL/TK/Expect. Every
thing works great except for one problerm that I have not been able to fix.
I'll explain what the utility does and what the problem is in detail below.
If anyone can hep me fix this I will be forever GREATFULL!!!!
Basically, Expect is sending strings to the user (in the expect_out(buffer))
with a certain <CTL> char. Later I use some of the strings to send back to
the device through expect, but expect (or TK, or the OS) doesn't like the
<CTL chars> and beeps for every char (millions of beeps).
USER PC <----------------------> Device, or DUT (device under test)
(TCL/TK/Expect) (ethernet) (Internet router)
WHAT THE PROGRAM/UTILITY DOES:
There is a GUI interface, the user starts the program, enters in the
destination IP address to the device that the user wants to configure (the
DUT) with my TK/Expect utility. When the tool runs, it gets the old
configuation from the DUT by sending a command to the device (DUT) and it
saves the config (parses expect_out(buffer) to a file. (NOTE: This fle is
not used now, but can be used at a later time by parsing the file
(extracting the commads), saving them to an array, etc). The user selects
the text file that contains configuration commands, loads the commands (the
utility parses the file for commands), saves the commands to an array, and
then logs into the device (DUT) and sends the commands to the DUT, one
command at a time.
When the commands are sent to the DUT via Expect and telnet, I usually hear
a loud BEEP! It wouldn't be a big deal if I didn't have thoudsands of
commands, and a dozen co-workers all using the tol. Can you hear thousands
or millions of BEEPs for 8 hours during the day. Actually, no one would use
it, they would probably just laugh. Anyway, I have tried to change the
settings on the user's OS platform (I used xset on the Sun, and the system
settings for Windows) and the TK/Expect utility it still beeps anyway) .
(Mostly the utility will be used on Windows XP). On the platforms, I
disabled the BEEP on both platforms and the Utility still causes a beep.
When I see the "running display" on the TCL/TK/Expect utility while all the
beeps are occouring, I do see one extra extra control characters over and
over and am pretty certain that Expect sending these control characters to
the DUT is causing the beep. Either Expect, TK, or the OS to beep. In the
text file (with Windows notepad) I do not see the <CTL chars>, all looks
okay, but I do see the <CTL chars> in the tool console and running-log
display. I beleive it's a linefeed or something like that.
This is the character causing the problem: ""
The char doesn't even show up in this message (above), instead I see a
carrage retrn or lne feed or something. When the script runs, I can see the
chrs in the running log. It looks like a verticle bar, or an emply square.
- Daniel K
Posted via a free Usenet account from http://www.teranews.com