This is the mail archive of the
mailing list for the Cygwin project.
Re: Help about serial programming: manipulating DTR
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 2 Feb 2005 19:09:29 +0100
- Subject: Re: Help about serial programming: manipulating DTR
- References: <firstname.lastname@example.org>
- Reply-to: cygwin at cygwin dot com
On Feb 2 17:34, llandre wrote:
> Hi all,
> I'm trying to manipulate the DTR signal of the serial port.
> As an example I used this code snippet:
> I can open the com1, I can send and receive data but the ioctl I use
> to read the status of the signals returns -1:
> int status;
> ioctl(upsfd, TIOCMGET, &status);
> Anybody can help me? I have no idea about what's wrong with this code.
strace would give a hint. TIOCMGET should only fail because a call to
GetCommModemStatus fails. If so, the strace would contain a line which
talks about setting errno in fhandler_serial::ioctl.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader mailto:email@example.com
Red Hat, Inc.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html