This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

DCD on serial ports, was: ioctl() function


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]