public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* DCD on serial ports, was: ioctl() function
@ 2000-02-06  6:58 Daniel Kroening
  0 siblings, 0 replies; only message in thread
From: Daniel Kroening @ 2000-02-06  6:58 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 908 bytes --]

Hello,

I know it´s an old mail, but I have the very same problem. I need a
function call which allows to detect if DCD on a serial port is active.
Linux offers the TIOCMGET and TIOCM_CAR extention to ioctl(). Anyone
with a solution?

> I was trying to port some unix code and it uses ioctl() for serial comms.
> sys/ioctl.h was either missing or blank - I can't remember.
> I added some #defs from linux.
> and now the code appears to read and write to/from the port.
> The code I have checks if DCD is active to see if a call is being made to a
> modem.
> But this is where things don't work. 
> 
> ioctl(portfd, TIOCMGET, &stat) returns -1
> so it never detects carrier. where can I get correct values for ioctl.h or
> should I be using a different call under NT??
> (NT4, sp3, 64MB)

Daniel Kröning

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-02-06  6:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-06  6:58 DCD on serial ports, was: ioctl() function Daniel Kroening

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).