Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

God made the integers; all else is the work of Man. -- Kronecker


devel / comp.os.ms-windows.programmer.win32 / How to open a COM port for a GetCommProperties call?

SubjectAuthor
* How to open a COM port for a GetCommProperties call?R.Wieser
`- How to open a COM port for a GetCommProperties call? updateR.Wieser

1
How to open a COM port for a GetCommProperties call?

<ufh12d$3i25f$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1178&group=comp.os.ms-windows.programmer.win32#1178

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@is.invalid (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: How to open a COM port for a GetCommProperties call?
Date: Tue, 3 Oct 2023 14:22:17 +0200
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <ufh12d$3i25f$1@dont-email.me>
Injection-Date: Tue, 3 Oct 2023 12:22:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c5ca5106f38636e8d6b76d57faf119b4";
logging-data="3737775"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18dwxWNfxbhWe89Ox63soFhaLMbstyzSMK/KjJiTAJftw=="
Cancel-Lock: sha1:em3XksDyfP4NiQQL84HtYhHXYgw=
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MSMail-Priority: Normal
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
 by: R.Wieser - Tue, 3 Oct 2023 12:22 UTC

Hello all,

I'm in a bit of a catch-22 : I want to know which baudrates a(n USB to
serial) COM port supports *before* opening it, but the GetCommProperties
function needs an open COM port to be able to fetch that information. :-(

.... Or is there a way to "open" a COM port for inspection only, not letting
an attached serial device know the COM port is ready for business.

I /imagine/ there is (opening the "control channel" to the involved device
driver), but in all my time I've never encountered anything describing how
to do it. So, I'm stuck.

Help please ?

-- second question:

GetCommProperties returns a COMMPROP structure* for which the MSDN page
defines speeds upto 128k bps. But when I use CommConfigDialog it shows me a
few specific speeds (230400, 460800, 921600) above it. Where do those come
from ?

*
https://learn.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-commprop

Regards,
Rudy Wieser

Re: How to open a COM port for a GetCommProperties call? update

<ufjh7m$4pve$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1179&group=comp.os.ms-windows.programmer.win32#1179

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@is.invalid (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: How to open a COM port for a GetCommProperties call? update
Date: Wed, 4 Oct 2023 13:10:30 +0200
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <ufjh7m$4pve$1@dont-email.me>
References: <ufh12d$3i25f$1@dont-email.me>
Injection-Date: Wed, 4 Oct 2023 11:10:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="deabffc01e8d8f267661960bfb485d70";
logging-data="157678"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+h6xULW3k8IVCJw7lyf+eVw6NwHTB9Uqo82oXSziGR8Q=="
Cancel-Lock: sha1:aunboGz6y8ssgZOY9eM4rwyWtlM=
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Response
 by: R.Wieser - Wed, 4 Oct 2023 11:10 UTC

> GetCommProperties returns a COMMPROP structure* for which the MSDN
> page defines speeds upto 128k bps. But when I use CommConfigDialog it
> shows me a few specific speeds (230400, 460800, 921600) above it.
> Where do those come from ?

Odd: although ComConfigDialog shows those above three extra baudrates, when
I actually open the port (using CreateFile) and call GetCommProperties I'm
not seeing any bitflags that could indicate those baudrates, and I am
allowed to also set a 134.5 baudrate.

IOW, what the build-in ComConfigDialog shows does not seem to be what the
port can actually do. :-(

Regards,
Rudy Wieser

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor