X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; 	charset="iso-8859-1"
Subject: RE: Looking for basic documentation on Cygwin and Serial Ports
Date: Fri, 25 Apr 2008 13:47:41 +0100
Message-ID: <28D25EB5A34E89408B73B6793C742171CAB6B4@nutmeg.CAM.ARTIMI.COM>
In-Reply-To: <16853883.post@talk.nabble.com>
References: <16827997.post@talk.nabble.com> <480F02EA.AF265921@dessent.net> <16853883.post@talk.nabble.com>
From: "Dave Korn" <dave.korn@artimi.com>
To: <cygwin@cygwin.com>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id m3PCmC1F000921

Nefastor wrote on 24 April 2008 23:08:

> case : My machine has two serial port, one on the MoBo and a USB-serial
> adapter, yet Windows calls them COM1 and COM3. 

  Or /dev/ttyS0 and /dev/ttyS2, as they'll be known to cygwin.

> 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: %-|.

  AAAARGH[*]!  FTDIchip are the bane of my life at the moment.  Buggy drivers.
I hate them so much <spit>.

> - is there a fixed relationship between COM port number "X"
> and dev/ttyS
> number "Y", such as Y = X - 1 ? 

  Yes.

> For instance, if I change my
> COM port number
> from 3 to 7, will the dev/ttyS number go from 2 to 6, 

  Yes.

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

  Don't understand what kind of "device/driver info" you mean here.  You might
be able to use the win32 pnp api functions.

    cheers,
      DaveK

[*] - I just got back from rebooting a testrig that locked up due to buggy
ftdichip drivers at about the twentytwo-hour point into a twentyseven-hour
testrun.  I am not happy.
-- 
Can't think of a witty .sigline today....



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


