Mail Archives: cygwin/2008/04/23/05:43:20
Nefastor wrote:
> I want to write simple programs which use the serial port (for example, a
> program that will trap and log activity on a serial port, nothing fancy). I
> know how to do that under Linux, and under DOS as well. The problem is I
> don't know which of Cygwin's /dev/tty device corresponds to which serial
> port on my PC (that is, I only know the COM port number). I can "sort of
> guess" /dev/tty0 is COM1, but that's a guess, and I'd prefer some certainty.
Cygwin works the same as Linux, /dev/ttyS0 is the first serial device,
/dev/ttyS1 is the second, etc. Please consult the users guide:
<http://cygwin.com/cygwin-ug-net/using-specialnames.html>.
> It gets complicated : I'd like my programs to work with any kind of RS-232
> port, especially USB adapters (FTDI chips) and USB Bluetooth dongles. While
> Google-ing around I found mention of exotic devices such as /dev/ttyUSB0 or
> even /dev/usb/tty, and what I COULDN'T find was a clear explanation of which
> exist and which work in Cygwin.
It will still be /dev/ttyS<number> for USB devices, just with a number
like 9 or whatever, corresponding to whatever emulated serial device it
is configured as (e.g. COM10 in this case.)
Brian
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -