Automatically Connect & Disconnect Tera Term USB COM Ports

As an embedded software engineer, I frequently utilize serial connections to embedded devices, often using virtual USB COM ports. This resulted in a pain point that I set out to resolve by good ol’ hacking.

Oftentimes, I am connected to a device’s USB COM port with Tera Term and then need to reset the device. When I do that, the virtual USB COM port is also reset. Therefore, each time I reset a device, I have to manually disconnect the Tera Term COM port, reset the device, wait for the USB COM port to enumerate, and then manually reconnect with Tera Term. This is a relatively small thing, I know, yet when you do this many times a day, it really adds up.

To solve this problem, I wrote an AutoHotkey script for Windows that automatically disconnects Tera Term if the connected to port goes away and then automatically reconnects Tera Term if that port comes back. Continue Reading…