07-11-2005 11:08 PM
Hello everyone,
I so need your help regarding automatic receiving data from BPX8620 machine.
Problem description: when the command dsptrkstats 1.1 runs on BPX, statistic screen is appear and overwrite
once in time. For stop this command DEL must be hit ("Hit DEL key to quit: ").
I wrote a simply script for getting statistics automatically, but BPX doesnt receive the ascii code 177 (DEL).
#! /usr/users/svplus/tools/expect
set timeout 30
spawn telnet BPXtest
expect timeout {
send_user "Sorry, Unable to telnet! Quitting
exit 1
} Enter User ID:
send "UserName\r"
expect "Enter Password:
send "Passwd\r"
expect -re "Next Command: "
send "dsptrkstats 1.1\r"
expect -re "Hit DEL key to quit:
send "\177"
expect -re "Next Command: "
send "bye\r"
Q. What code must be send as "DEL" to BPX?
07-18-2005 07:08 AM
As you mentioned we have to hit the DEL command to stop the command output from dsptrkstats 1.1. And the code for the DEL command is 177. If the BPX machine is not accepting the code then you may not be able to achieve this . That is it is not possible to write a script to automatically receive data from the BPX.
You may want to try" CTRL-C" or "CTRL - break" or just "break" and check if the dsptrkstats 1.1 command gets terminated. If you can , try using the corresponding ASCII code in the script.
07-18-2005 09:27 PM
Thank you for the explanation.
I will try.
Add. Q. What is "corresponding ASCII code" and how to use it in the expect scripts?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide