Serial port example

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
tvit
In need of some credit
In need of some credit
Posts: 3
Joined: Fri Mar 31, 2023 2:22 pm
Contact:

Serial port example

Post by tvit »

Hello all! Why i not find in samples simple project for know as work with serial ports/COM ports.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: Serial port example

Post by PB »

AFAIK, wxWidgets does not provide any support for working with serial ports. You need to use another library for that.
tvit
In need of some credit
In need of some credit
Posts: 3
Joined: Fri Mar 31, 2023 2:22 pm
Contact:

Re: Serial port example

Post by tvit »

I am not a professional, but when I wrote programs on VB6.0 there was a corresponding control (lib mscomm32.ocx) for working with a serials ports\COM-ports. And many made examples of work with the COM-ports directly through write and read to the file (API CreateFile()). Does Wxwidgets can not how to work with files?
And if need other library, why not create an example using this other library? It’s hard for me to write, I just switch to Wxwidgets. In my free time I take small steps. And for a professional, write such an example an hour of time.
Last edited by tvit on Fri Mar 31, 2023 8:32 pm, edited 1 time in total.
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Serial port example

Post by doublemax »

You can't really expect someone else writing a sample for you, especially since very few people have experience with using serial ports.

On top of that, Google is your friend.

Boost has support for serial ports.
https://www.boost.org/doc/libs/1_74_0/d ... ports.html

And here is some sample code:
https://techoverflow.net/2022/07/27/min ... e-example/
Use the source, Luke!
Post Reply