delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/04/24/21:59:16

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <b609cb3b0804241858g50550699l6c14aa243ac8e054@mail.gmail.com>
Date: Thu, 24 Apr 2008 21:58:35 -0400
From: NightStrike <nightstrike AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Looking for basic documentation on Cygwin and Serial Ports
In-Reply-To: <16853883.post@talk.nabble.com>
MIME-Version: 1.0
References: <16827997 DOT post AT talk DOT nabble DOT com> <480F02EA DOT AF265921 AT dessent DOT net> <16853883 DOT post AT talk DOT nabble DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 4/24/08, Nefastor <nefastor AT hotmail DOT com> wrote:
>
>
> Brian Dessent wrote:
> >
> > Nefastor wrote:
> >
> >> (...) 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>.
> >
> >
>
> That I have, Brian. What itches me is that I'm facing some kind of special
> case : My machine has two serial port, one on the MoBo and a USB-serial
> adapter, yet Windows calls them COM1 and COM3. I've searched the whole
> Device Manager but couldn't find any device that would be COM2. And I can
> rename COM1 to COM2.
>
> Speaking of Windows' DM, it's rather quirky on the serial ports : I noticed
> that if I unplug my USB cable (COM3) and try to change the name of COM1, in
> the drop down box COM3 is listed as "in use" :confused: %-|.
>
> So, I have a machine with two serial ports but no COM2, AND I can change the
> COM port number to whatever I want, plus Windows seems to have a bad case of
> "phantom limb syndrome". Getting back to your answer : how can know for sure
> what Cygwin calls "the first port", or "the second port" ?
>
> Trial and error is obviously not what I'm after, rather I need a way for my
> program to know for sure what port it's dealing with. To help me write that
> program I'd need to know :
>
> - is there a fixed relationship between COM port number "X" and dev/ttyS
> number "Y", such as Y = X - 1 ? For instance, if I change my COM port number
> from 3 to 7, will the dev/ttyS number go from 2 to 6, or will it remain
> unchanged ?
>
> - if it remains unchanged, I'm assuming Cygwin does some sort of port
> enumeration : is that process deterministic ?
>
> Additionally, can you point me to documentation on how to retrieve device /
> driver info from my program ? That way, worst case scenario, I can have the
> program look for the correct port on its own.
>
> Thank you for your time, I know I'm asking for a lot of stuff but I've got
> the feeling the answers would be useful to many.:-)

What motherboard do you have?  It's always possible that there is a
riser pinout for a serial port somewhere in the front of the board for
connection to a front panel mount.

--
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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019