Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Noob question: does a library exist to output data to a logical input serial com port

44 views
Skip to first unread message

Laszlo Lebrun

unread,
Aug 29, 2015, 11:38:13 AM8/29/15
to

Hi experts here,
Sorry for my noob question:
I do need a middleware that reads a serial port (com xx), fetches some
measurement data out of a buffer, averages that data for a minute and
outputs the result to an internal windows virtual serial port using a
given protocol. (So an existing program from which I have no code,
believes to read original serial data from COMxx)

How tricky is that?

Does a library exist to simulate a serial COM port?
Is that accessible to a technically oriented noob within a few weeks?



--
Stand up against TTIP and ISDS !

Nobody

unread,
Aug 29, 2015, 7:57:23 PM8/29/15
to
On Sat, 29 Aug 2015 15:38:01 +0000, Laszlo Lebrun wrote:

> Does a library exist to simulate a serial COM port? Is that accessible to
> a technically oriented noob within a few weeks?

Two USB-serial converters and a null-modem cable?

Richard

unread,
Aug 31, 2015, 3:03:58 PM8/31/15
to
[Please do not mail me a copy of your followup]

Laszlo Lebrun <lazlo....@googlemail.com> spake the secret code
<mrsjkp$vf4$4...@tota-refugium.de> thusly:

>I do need a middleware that reads a serial port (com xx), fetches some
>measurement data out of a buffer, averages that data for a minute and
>outputs the result to an internal windows virtual serial port using a
>given protocol. (So an existing program from which I have no code,
>believes to read original serial data from COMxx)

You can use boost.asio to read/write data from/to serial ports:
<http://www.boost.org/doc/libs/1_59_0/doc/html/boost_asio/overview/serial_ports.html>

>How tricky is that?
>
>Does a library exist to simulate a serial COM port?
>Is that accessible to a technically oriented noob within a few weeks?

So if I understand you correctly, you want to read data from a
physical serial port, intercept and/or manipulate it in some way, and
make that modified data stream available through a virtual serial port
to some other application. The other application is connected to the
virtual serial port as if it were connected to the original hardware
serial port.

How you provide a serial port to an operating system is beyond the
scope of this newsgroup, but this stack overflow thread might help for
Windows:
<http://stackoverflow.com/questions/1605721/faking-an-rs232-serial-port>

Another option is to simply stick a small hardware device in the
cabling. An arduino could easily process the serial port data on one
port and write the data out on another port. Again, this is beyond
the scope of this newsgroup.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
The Terminals Wiki <http://terminals.classiccmp.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

Laszlo Lebrun

unread,
Sep 5, 2015, 11:01:40 AM9/5/15
to
On Mon, 31 Aug 2015 19:03:41 +0000, Richard wrote:


> How you provide a serial port to an operating system is beyond the scope
> of this newsgroup, but this stack overflow thread might help for
> Windows:
> <http://stackoverflow.com/questions/1605721/faking-an-rs232-serial-port>
>


Thank you Richard, that helps.
Writing to serial output is easier.
0 new messages