Serial port example
Serial port example
Hello all! Why i not find in samples simple project for know as work with serial ports/COM ports.
Re: Serial port example
AFAIK, wxWidgets does not provide any support for working with serial ports. You need to use another library for that.
Re: Serial port example
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.
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.
Re: Serial port example
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/
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!
Re: Serial port example
There are many open source libraries for you need:
tomay3000/wxSerialPort: a wxWidgets cross platform Serial Port library
or
Cool-Emerald: Programming serial port in C++ for Windows and Linux, its source code is located here: yan9a/serial: Cross-platform Serial port (Com port) programming in C++ with wxWidgets for Windows and Linux
tomay3000/wxSerialPort: a wxWidgets cross platform Serial Port library
or
Cool-Emerald: Programming serial port in C++ for Windows and Linux, its source code is located here: yan9a/serial: Cross-platform Serial port (Com port) programming in C++ with wxWidgets for Windows and Linux