Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Subject: 1.57 on Win2k or WinXP. Not more than 16 com ports. Differences between //./comX and /dev/comX
Date: Mon, 19 Apr 2004 18:29:22 +0200
Message-ID: <C2F0FC2A5C4B3E44ADF4327E699486A509F528@mail2.de.thorlabs.local>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
From: =?iso-8859-1?Q?Lutz_H=F6rl?= <lhoerl@thorlabs.com>
To: <cygwin@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id i3JGTvTD015025

Hello,

I want to use (Windows-) COM port numbers greater
than 16, but when I use open() to get a file
descriptor for the devices I get the behaviour:

---1.case-----------------------------------------

errno = 0;
fd = open("/dev/com8", O_RDWR | O_NONBLOCK);
-> fd = 3, errno = 0
-> everything is OK,
   I can use the opened COM port

---2.case-----------------------------------------

errno = 0;
fd = open("\\.\com8", O_RDWR | O_NONBLOCK);

-> fd = 3, errno = 20 = ERROR_BAD_UNIT
   = "The system cannot find the device specified"
-> I can not use the opened COM port. The port
   number 1...16 versus 17...255 does NOT matter.

---3.case-----------------------------------------

errno = 0;
fd = open("/dev/com23", O_RDWR | O_NONBLOCK);

-> fd = -1, errno = 2 = ERROR_FILE_NOT_FOUND
   = "The system cannot find the file specified"
-> I can not use the opened COM port. The port
   number 1...16 (OK) 17...255 (not OK) DOES matter.

---end cases------------------------------------

Is there a workaround?

Lutz Hoerl

Thorlabs GmbH
Gauss-Strasse 11
D-85757 Karlsfeld
Germany

Tel.    +49 (0)8131 5956 44
FAX     +49 (0)8131 5956 99
M A I L    lhoerl at thorlabs dot com

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


