delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/12/29/01:48:03

From: cgf AT cygnus DOT com (Christopher G. Faylor)
Subject: Re: Serial port access (was: Can outsiders get simple questions
answered?)
29 Dec 1998 01:48:03 GMT :
Message-ID: <769ccj$rc7$1@cronkite.cygnus.com>
References: <367F31DC DOT B8E71A57 AT sdrc DOT com> <3687E198 DOT 5D65286A DOT cygnus DOT gnu-win32 AT sdrc DOT com>
X-Newsreader: trn 4.0-test63 (15 March 1998)

In article <3687E198 DOT 5D65286A DOT cygnus DOT gnu-win32 AT sdrc DOT com>,
Dan Hensley <dan DOT hensley AT sdrc DOT com> wrote:
>> I have some mount points, that I setup in the registry manually, for hitting
>> the serial and parallel ports, but I haven't done much with them yet.
>>
>> To set them up, a registry init file with contents similar to this:
>>
>> ;; begin registry file "CYGSERIAL2.REG"
>>
>> REGEDIT4
>>
>> [HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\06]
>> "native"="\\\\.\\COM2"
>> "unix"="/dev/serial2"
>> "fbinary"=dword:00000001
>> "fsilent"=dword:00000000
>>
>> ;; end registry file
>>
>> may be used.  This particular example creates a virtual device '/dev/serial2'
>> which let's me (at least) send bits to the COM2: port.
>
>    I did as you suggested (replacing COM2 with COM1, since that's the port I'm
>trying to use).  This worked no problem, and entering a "mount" in cygwin showed
>that indeed this mount point was set.  However, when I try to open the COM port
>using open(), my session hangs, and the only way out of it is to kill the bash
>window.  Any idea what's happening here?  Incidentally, I tried the sample program
>you sent me with the same results...
>    I'm running b20.1 on NT4sp4.

By setting things up this way, you're working around Cygwin's own understanding
of com ports so the com port is treated as a regular file.

If you want to open a com port just use /dev/com1 or /dev/com2 .
-- 
cgf AT cygnus DOT com
http://www.cygnus.com/

- Raw text -


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