Const Port v1.6

Another version of Const Port is ready. And with this version comes the first release of the OSX version of Const Port. I've done a decent amount of work trying to get the OSX version to run inside an application bundle so hopefully it will be easy to install. That being said I know there are still a lot of things to learn about distributing on OSX. I am largely a windows user I must admit so if anybody has any suggestions I'm open to all critique.

I'm going to try and keep the explanation short here since I don't have a whole ton of time today. There are a couple of major features I'd like to point out in this version. The first is the new and improved Com Menu:


The menu layout has been redesigned to be more friendly to tall windows and a large number of available ports. It handles really small window resolutions quite nicely and it now opens on startup automatically.

Another nice feature that's been added is the input text box. Instead of echoing the characters directly to the port you can now type into an editable text box near the bottom of the screen. This allows for much nicer editing features and relieves the application of the burden of echoing characters and handling backspaces. It also allows us to record previously input lines and allow you to easily recall them using up/down arrows.

There's a lot of other small features and improvements and some major reworkings of some of the core platform functionalities as well. These have both fixed a lot of bugs and added a decent amount more. There's still a long list of things that I'd like to get fixed but I think in the interest of time I'd like to release it as it is. If you run into any bugs feel free to report them on the github, Handmade Network, or as a comment on this post and I will be sure to get them on the list if they aren't already.

Alright enough talk, here's the download links:


  • Redesigned the Com Menu to handle various resolutions and long lists of available ports better
  • Support for opening COM25-COM256
  • Ctrl+W now closes the currently open port
  • Escape key closes com menu and popup messages
  • Added an input text box to allow better editing features and recall functionality. (Can be disabled in the configuration settings)
  • Added support for regular expression triggers that evaluate after every character received
  • Added a small running indicator to the bottom left side of the screen
  • Added support for pasting from clipboard
  • Added support for replacing the matched line with a format string that contains the captured groups in the regular expression
  • Fixed a problem where we wouldn't render/respond to operating system events when receiving large amounts of data
  • Added better indications for the window not being active
  • You can now send binary data to the port by typing in the hexadecimal representation and hitting ctrl+enter (or hold ctrl while pressing the send button)
  • Added support for line-wrapping
  • Added support for a few for trigger effects (save, new_line, and clear_screen)
  • Added better support for keys being held down (repeated key events)
  • Added a few temporary check boxes in the overhead menu to toggle various options

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