Serial port access under expect

Sergey Okhapkin sos@sokhapkin.dyndns.org
Sun Jan 19 15:10:00 GMT 2003


Don't you try to open a serial port from two processes? You can't do that on
Windows, Windows don't allow to share the serial ports.

Sergey Okhapkin
Somerset, NJ
----- Original Message -----
From: "Chirag Kantharia" <kantharia@hathway.com>
To: <cygwin@cygwin.com>
Sent: Sunday, January 19, 2003 6:50 AM
Subject: Serial port access under expect


> Hello,
>
> I have a simple terminal emulation program, through which I am
> able to access an embedded board, through serial port. This works
> fine from the bash prompt; but however, if I try to do the same
> from within an expect script, the program fails with "Permission
> denied" message, for the open() call (to open the serial port).
> The expect script snippet is something like the below:
>
> set timeout 60
> spawn tinycom -n -b 9600 /dev/ttyS0
> sleep 2
> send "\r\r"
> expect ">$"
>
> I'd looked up the mailing list archives, and found some mails related
> to psuedo-tty functionality not stable in expect, and consequently
> the expect would not be able to `talk' to spawned processes well (well
> that's what I could conclude; corrections are welcome). But from the
> error message which I get, that doesn't seem to be the problem.
> However, I tried an ftp script which would login into a local machine
> and download a file. The expect script ran fine and didn't have problems
> `talking' to ftp. I wonder what could be problem with my setup.
>
> Does anybody have any idea, as to what could I be doing wrong?
>
> Thanks,
>
> chyrag.
>
>
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list