Const Port v1.5

Finally I've gotten around to polishing off some new features in Const Port and making a version that can be released. There's a few major features added in this version and a lot of smaller things changed to the existing tool set, so let's get started explaining them.

The main feature I'd like to point out is the ability to run python scripts that interpret the input from the COM port and output data for Const Port to show. There are now a list of configuration options to set exactly how this works and what python script should be run. Then in Const Port if you hit ctrl+P it will attempt to start an instance of python and attach itself to the stdin and stdout so it can send and receive data from it. This means anything printed out by python will show up in the Const Port output window, and if you have the configuration set up correctly, any data received from the COM port will be piped to the python program for processing. There's still a bit of weirdness with how the stdio works in python so you'll have to do sys.stdout.flush() for any output to be pushed to the screen before the script has ended. For now there is an example python script called that will take the com port data and output the hex values of the characters (spaces and new lines preserved).


Another major feature that has been added is the ability to define and customize your regular expression triggers to a far greater degree. You can now define as many regular expressions as you want each with it's own list of effects that should be applied should it match the line. This allows you to set more complicated formatting and line coloring than ever before. A list of possible effects can be found in the commented example expression. "new_line" and "clear_screen" have not been implemented yet but the rest of the effects work and more will be added as the project progresses.

We've also done a bit of an upgrade on the com menu to support disconnecting from the current port and configuration options for renaming the ports with any alias you want. As you can see in the screenshot above I have named my FTDI cable coming from my controller "PIC32MZ", and the other two ports that show up are for other devices on my system that I don't use so I've named them "System1" and "System2".

Another helpful feature that's been added to the platform layer is the ability to launch the default program to edit a specific file. This allows us to make better use of the gear button on the main menu to open up the GlobalConfig.json file for you to edit quickly and easily. Many of the options in the JSON file will have UI counterparts later so you won't have to leave Const Port in order to change the settings. However, for now this is a good option to make finding and opening the file easier. NOTE: If you're having trouble with it opening the file make sure you have a default program for the .json file type.

The last major thing I'd like to mention briefly is the vastly improved support for different themes. We've added a ton of new configuration color options so almost every piece of the UI color scheme can be set separately. Along with this we've made a mock "Neon" color scheme to show the potential:


So with all of those things out of the way, let's get that download link.

And, as before, there is also a debug version that will open the console window so you can see the debug output of the program if something is going wrong.

As a final note, one of the reasons this version has taken so long to release is a lot of the time has been spent on a OSX platform layer. I was planning on getting the layer usable before this release but we are still having some trouble with making the application bundle work and various configuration options like that so I've decided to release the changes as they stand now and wait till the next version before releasing the OSX variant. That being said, you can go download the source code and compile a fairly usable version for OSX if you would like. The majority of the progam's functionalities are working so it could be a very useful tool. You can download the source code below.


  • Added support for running a python instance with stdin and stdout routed to through Const Port so you can make scripts that interpret the output of the COM port or perform other tasks when certain things happen.
  • Changed the way regular expression triggers are defined the configuration options to allow support for any number of triggers each with it's own list of effects that will be applied when they match the line
  • Made the settings button open the configuration file for editing with the default program chosen by the operating system.
  • Added an info window with a short description of the program that can be accessed by pressing the information button
  • Removed the arrow button from the main menu
  • Added options to switch the RX and TX LEDs between square and circular modes
  • Added more options for how the RX and TX LEDs are sized
  • Added a temporary implementation of routing the recieved text to a file without showing it on the screen. This can be started and stopped with the Ctrl+F shortcut. The file will be named after the COM port and saved in the current working directory.
  • Added an option to make the application automatically open the saved file for editing when "Save to File" button is pressed
  • Fixed some of the formatting problems with different font sizes so the buttons and windows should work a bit better with smaller or larger font sizes
  • Added the ability to choose a separate font size for the main text versus the UI text elements
  • Made the application regenerate the fonts when the configuration file is reloaded with Ctrl+R
  • Added the ability to disconnect from the current port without connecting to another one.
  • Added configuration options to allow renaming of ports with a user defined alias
  • Added better support for different naming conventions of the platform layer for available ports
  • Made the COM menu tabs more dynamic in how they choose to format their text to allow for longer names and various font sizes
  • Added a lot of new color options to allow the user to change the UI theme to much greater accuracy
  • Added an example "Neon" color scheme
  • Made the rendering of the main menu button circles dynamic to allow for greater customization
  • Made the rendering of the exit button on the menus dynamic instead of using a predefined image
  • Changed the way the main menu's height is chosen to support a greater variety of options for the RX and TX LEDs and font sizes
  • Changed the naming convention of the configuration options to be all lower case and underscores between words
  • Added a file cursor that will always show at the end of the file. Disabled the hover cursor and hover line options by default
  • Added an option to turn on auto-echo of input text  to free up the embedded application the responsibility of echoing the user's input