delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/19/06:49:56

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Chirag Kantharia" <kantharia AT hathway DOT com>
To: cygwin AT cygwin DOT com
Message-ID: <e71eb239.b239e71e@hathway.com>
Date: Sun, 19 Jan 2003 16:50:17 +0500
MIME-Version: 1.0
Subject: Serial port access under expect
X-Accept-Language: en

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019