DCD on serial ports, was: ioctl() function
Daniel Kroening
kroening@handshake.de
Sun Feb 6 06:58:00 GMT 2000
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
More information about the Cygwin
mailing list