openSerial: A Graphical Serial Interface Suited for Microcontroller Applications

For a university group project involving IoT sensors I had the requirement of creating a graphical interface that helps send various commands via a serial port, and receive data on the same serial port from the same IoT sensors as a reply. Obviously this can be done fairly easily with command line programs such as screen and miniterm and there are almost certainly suitable programs out there, but as it was a requirement for the group project I decided to give my own a go.  Thus, openSerial was born.

Command line serial programs can at times be a pain, and take more time then they should to get up and running. So I tried to make openSerial as useful as possible for a wide range of situations, although the application is more targeted towards talking to microcontrollers. It was coded using Qt, and utilises Qt’s QtSerialPort library. It scans the available serial ports once a second and updates the port name combo box list. The user can define different serial settings such as baud rate, data bits setting, parity bit setting, stop bit settings, and flow control settings. It also automatically updates the connection status label based on what serial port is connected.

A quick tutorial of openSerial.

The user can read the full serial output in the console window, and send single line commands using the command lineEdit window. A history of sent commands is displayed in the Send Commands Window.

I have tested it out and it seems to work well! Sometimes if you disconnect from a serial connection, you have to unplug and plug the device in again before reconnecting. But this is more likely due to the behavior of the end device I used to test the software with. When in doubt, turn it off and on again!

You can find the source code, and a .zip file containing a binary and required Qt libraries on my github page at https://github.com/DaleGia/openSerial. The program has been tested on a machine running Ubuntu 18.04. It’s a little messy in the naming department, but should be quite easy for anyone to get their head around. I highly recommend using Qt Creator when working with Qt projects!

 

3 thoughts on “openSerial: A Graphical Serial Interface Suited for Microcontroller Applications

  1. Pingback: University Portfolio | DaleGi

  2. Reza Pernandito Sujatmiko

    Hi Dale!

    It seems like an interesting GUI for me! I am currently working on a similar project involving serial ports and would like to create my own GUI and I would like to try using Qt as well. The end product would look very similar to yours!

    So how do I run your program, would you kindly tell me how to do it?

    Thank you very much!
    Reza Pernandito Sujatmiko

    Reply
    1. dale-blog Post author

      Hi Reza,

      To be honest it has been such a long time since I created this I am not 100% sure how to get it to run anymore. I would suggest installing QT Creator and trying to load the projects .pro file with it and seeing how you go from there.

Leave a Reply to Reza Pernandito Sujatmiko Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.