Mail Archives: cygwin/2007/01/17/04:48:36
--------------enigAECAA8A942557639F172DC09
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hello,
accessing serial port under cygwin, with ids above 10 is broken:
Using "/dev/com20" results in a "No such file or directory" error.
#include <unistd.h>
#include <fcntl.h>
#include <termios.h>
int main (int argument_count, char * arguments [])=20=20=20
{=20=20=20
printf("opening com20:");
int fd =3D open("/dev/com20", O_RDONLY | O_NONBLOCK);=20=20=20
perror(NULL);
struct termios options;
int result =3D tcgetattr(fd, &options);
perror(NULL);=20=20=20
}
The following post:
http://www.cygwin.com/ml/cygwin/1999-12/msg00323.html says I should use
"\\\\.\\com20" instead of "/dev/com20". If I do that, the call to open(...)=
succeed,=20
but the call to tcgetattr raises a "Inappropriate ioctl for device" error.
I checked the example using "/dev/com3", and it works all right, so the
issue is limited to ports id above 9.
I already checked the following posts:
http://sourceware.org/ml/insight/2004-q4/msg00078.html, so it seems to
be a bug.
Do you have a workaround for this?
Kind regards,
Stan.
--------------enigAECAA8A942557639F172DC09
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFrfDS/PmuubxPWAIRAiCxAJ95plX8p3A4bK2ubyYSSJm+mfFu/ACfa+de
UTJAv6JaPmKlcXfdAqTABdw=
=oNLU
-----END PGP SIGNATURE-----
--------------enigAECAA8A942557639F172DC09--
- Raw text -