How To Detect the COM Port for Any Serial Device in Windows

Serial Port Notifier
(Image credit: Tom's Hardware)

Working with USB serial devices isn’t the most simple of workflows. We first need to identify the COM port, found under Device Manager, then we need to tell our application to use that COM port.

(Image credit: Tom's Hardware)

What if we could receive an automatic notification of COM devices, and then configure them to open with specific applications? Serial Port Notifier by Amr Bekhit is just what we need. 

At the most basic level, Serial Port Notifier tells us when a device is connected / disconnected via a notification. But under the hood, we can give our devices custom names and create launchers that will open specific applications.

For this project you will need

  • PC running Windows 10 / 11
  • USB serial device such as a Raspberry Pi Pico

Installing Serial Port Notifier

 1. Download Serial Port Notifier from SourceForge.

2. Allow the installer to make changes to your machine.

(Image credit: Tom's Hardware)

3. Click Next to accept the default Start Menu Folder.

(Image credit: Tom's Hardware)

4. Click Install to finish the installation.

(Image credit: Tom's Hardware)

5. Click Finish to close the installer. There are two tick boxes. One for the readme file, the other launches the application. The readme is optional, but ensure “Run Serial Port Monitor.exe” is selected.

(Image credit: Tom's Hardware)

Using Serial Port Notifier

(Image credit: Tom's Hardware)

Serial Print Notifier lives in the Notifications area and, at the most basic level, it will automatically pop up should a USB / Serial device be connected / disconnected. We can use the COM port value in our projects, for example flashing code to an Arduino, Raspberry Pi Pico or other microcontroller board.

The basic functionality works as follows.

1. Insert a USB serial device. We used a Raspberry Pi Pico running CircuitPython.

2. Take note of the notification that will appear in the Notifications area.

(Image credit: Tom's Hardware)

3. Remove the USB serial device.

4. Note that Serial Port Notifier confirms the device has been removed.

(Image credit: Tom's Hardware)

Rename COM Devices

COM port numbers are useful but being human we prefer names. Luckily we can rename a COM port for easy identification.

1. Connect your USB to serial device. We connected a Raspberry Pi Pico.

2. Make a note of the assigned COM port via the notification pop up.

(Image credit: Tom's Hardware)

3. Left click on “Show Hidden Icons and then right click on the Serial Port Notifier icon.

(Image credit: Tom's Hardware)

4. Select the correct COM port and click Rename.

(Image credit: Tom's Hardware)

5. Enter a custom name for the device and click Ok to save.

(Image credit: Tom's Hardware)

6. The COM port is now identified using our preferred name.

(Image credit: Tom's Hardware)

Creating Custom Launchers

Serial Port Notifier has a neat feature, launchers. We can create custom launchers to open certain applications, or perform actions. These launchers work across all connected devices and are useful for common applications such as PuTTY. 

We are going to create a launcher to start PuTTY, a terminal emulator which we can use to control and communicate a device.

1. Left click on “Show Hidden Icons and then right click on the Serial Port Notifier icon.

(Image credit: Tom's Hardware)

2. Click on Settings.

(Image credit: Tom's Hardware)

3. Click on New to create a new launcher.

(Image credit: Tom's Hardware)

4. Label the launcher “PuTTY”.

(Image credit: Tom's Hardware)

5. Click on the … icon and navigate to the PuTTY.exe file. Our PuTTY file was located in Program Files > PuTTY.

(Image credit: Tom's Hardware)

6. For Command Line, enter the following to open PuTTY with specific connection details. Click Ok to save. This line will set the baud rate (connection speed), 8 data bits, (n) no parity, 1 stop bit and (N) no flow control.

(Image credit: Tom's Hardware)

7. Click Ok to save and close the Settings dialog.

(Image credit: Tom's Hardware)

8. Go back to the Serial Print Notifier and select the correct COM port, then click on the launcher.

(Image credit: Tom's Hardware)

PuTTY will launch and be ready for use with your USB serial device.

(Image credit: Tom's Hardware)
Les Pounder

Les Pounder is an associate editor at Tom's Hardware. He is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training program "Picademy".

  • Soaptrail
    What are some examples of people needing this?
    Reply
  • RuiFPB
    Thank you. This was very usefull.
    I use my Pi Zero 2 on a USB adapter board, and this made it easier to connect using serial
    Reply