Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending a break through expect running under cygwin

Status
Not open for further replies.

dans45

Technical User
Feb 13, 2003
43
US
Hi, I'm running cygwin on my w2k workstation and am trying to send/receive over the com1 port. I'm able to receive data OK and in some cases to send data but to initialize communication I have to send a break of some sort to the program running on the other end of the serial interface. Under procomm I would just send <alt><b> combination. Under cygwin/expect(expect is extension of tcl) I cannot seem to find the right key combination. Please, anyone know what to send...I've already tried <break> and <alb> and <break> keys with many other keys in combination but no success. Thanks for your help.
 
Dans.
Use exp_internal 1 to see what expect sees.
For instance:
Code:
set prompt ".*@.*"
spawn -noecho /bin/bash

  expect  {
          -re $prompt {
                      send_user "Debugging enabled\n"
                      send_user "~q to quit"
                      exp_internal 1
                      interact {
                               "~q" {catch {close $spawn_id};exit}
                       }
           }

              eof {some_action}
              timeout {another_action}
    }

Now you get to see what expect makes of your
control sequences and everything else.
HTH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top