The humble serial interface has been around for a very long time, and will stay with us in one form or other for the foreseeable future. It was easy enough to keep track of back in the days when a computer only had one, or perhaps two COM ports. However, in this day and age of USB-programmable microcontrollers, it’s likely you’ve got COMs coming out the wazoo. Thankfully, [Amr Bekhit] has put together a utility to help solve this problem.
[Amr’s] utility is called Serial Port Monitor, and it does what it says on the tin. When new serial ports are enumerated in Device Manager, a system tray notification pops up noting the number of the newly attached COM port. Additionally, it maintains a list of ports sorted in order of the newest first, and also features a right-click menu that allows the launching of various terminal programs.
It’s a useful tool to keep in your back pocket that can prove particularly so when programming many devboards at once, or any other time when you find yourself dealing with a mess of serial devices.
Incidentally, if you find yourself having continual headaches with USB-to-Serial adapters on Windows, this might just be your problem. Happy hacking.
Footnote: In light of this article, the author would like to formally apologise to [Cosmos2000] for permanently disabling COM1 on his main programming rig. Sorry, friend.
Cool, worth a look, small neat programs easily carried on my admin usb key chain, thanks for post
If his main programming rig had a COM1 to disable (and not a /dev/ttyS0), then he probably deserved it.
Linux users are like the vegans of the computing world.
I wouldn’t say vegans, organic foods movement seems closer.
The difference is animal welfare and chemicals.
You are so right! Whenever I’m tempted to type a parody “M$ sucks. My OS is cooler than yours” comment or just sounds to realistic.
Use both. Grow up.
This was how one government engineer described their experience with Red Flag Linux:
“Using the system was like riding a bicycle on [a major Beijing road]. It was politically correct, even cool sometimes, but quite exhausting — and always lonely.”
My occasional experience with Windows 10, after mostly using Linux for years:
– Aaargh! Why is this bloody thing so slow!
– Where is xyz program? Ah yes, bloody Windows!
– Why is hard drive being accessed all the time? WTF?
– Why is there always some activity on the network? All 3 letter agencies are here having a party on my dime!
– Why are there so many useless trial versions of xyz installed here? WTF?
– Whaaat? No Python, C, Office, Firefox, … installed by default? What is this? A toy operating system? Aaaargh!
– Okay, games work. But slowly. Perfect for a teenager in a basement.
…
Funny because mostly I find the same but in reverse
You get used to what you know
I second dave’s motion to a T
plus “what do you mean I have to reboot my PC to install updates!!!”
I’m blessed/curses to having to use both OSs, and I find most of those issues on both sides. Linux has this “feature” that when you want to install something, it will most likely not work straight away, but instead you have to spend the next “unspecified time” scouring the web to find out what is missing. The other thing is also the unhelpful expectation from Linux users forums, that as a linux user you should already know how to do everything, and if you ask any question, you are being purposely obtuse.
What I detest of windows instead, is this completely random behaviour that occurs at times.
Yeah, why bother spending 5 minutes installing something from a binary when you can have much more fun spending 6 hours building it from source and then repeating that 3 or 4 times because there were missing dependencies?
assuming the build script would work on your particular linux distro as is…
On windows, at least the backward compatibility works mostly of the time and can expect the environment to be similar enough.
Or better, the /dev/serial/by-id folder contains unique (if the USB target is using the spec) id-named files for every usb serial device. No uncertainty if they map to /dev/ttyUSB0, S0 as above, or several other variants. You just look to match the serial number of the device. Extremely handy when dealing with arduinos and ESPs.
Just open the folder and look at what shows up when you plug in your new device. You can then hardcode that filename into any other linux software (even perl) and know it will always connect only to the correct thing (or fail if it’s not plugged in). No, I’m not a vegan, but that’s one of the problems that drove me off windows around the time of XP or a little before – you couldn’t do squat reliable with any homebrew peripheral without dealing with the MSDN driver tax.
Oh my, that sounds extremely useful. I’m often forced to boot into Windows to connect some remote tech to various and sundry network equipment, usually over a USB to console cable. Go find the com port is a regularly occuring game.
Have you tried using a VM?
Great work!
I’ve been meaning to write something that wouldn’t have turned out as tidy as this for ages…..
Now all we need is a decent terminal app.
add putty support?
You can launch putty directly from the ports list. check his home page. I’m loving it.
You mean like Poderosa[1], it’s commercial variant[2], Putty, Kitty[3] or TeraTerm[4]?
[1] https://sourceforge.net/projects/poderosa/
[2] http://www.poderosa-terminal.com/
[3] http://www.9bis.net/kitty/ (putty on steroids – you can e.g. save configs in files and open them from anywhere (explorer) when configured that way)
[4] https://ttssh2.osdn.jp/
You mean like Poderosa (Foss or comercial), Kkitty (putty on steroids) or TeraTerm?
I’d like to provide links but I already tried that and that post is probably pending a spam check or sth.
Are you aware of PuTTY (https://www.putty.org/)?
If you are, what disqualifies it from being “decent”?
right here: https://github.com/Microsoft/Terminal
I use this, and I love it. It’s great, and if you know what you’re doing, you can add your own custom profiles and the like. There’s a nice setup guide here:
http://www.donovanbrown.com/post/Building-the-new-Windows-Terminal-with-Visual-Studio-2019
and that same website has lot of other really useful stuff on it, too.
Nice, but it would also be great if the vendor is shown, like shown in device manager.
Good point Jeroen, just like the oldie usbview which I still use from time to time.
Actually one could use Amr’s utility to launch usbview though I suggest Amr’s utility be updated to get/display on suitable small window the whole signature string option to record and show any opening comms dialogue, as I mentioned from masquerading USB memory sticks with Trojans in the USB CPU firmware.
Given the greater use of USB type interfaces and emulators it won’t be long before some enterprising agents hijack them, so having alerts in place would be considered sensible and a ‘no brainer’ for those who have invested work $ on serious development where some key intellectual property resides on their favourite machines…
I recommend a “better” alternative to usbview: https://www.uwe-sieber.de/usbtreeview_e.html
Hmm, interesting thanks limroh :-)
Thanks for feedback – yes I plan to try add that feature in the future.
I use this one which has that string visible! https://github.com/avishorp/PopCom
+1 for PopCom. It’s a great tool I’ve been using for about a year now.
Although the program doesn’t currently pull the device information, I’ve recently updated it to include the ability to add custom labels to serial ports. Please download the latest version and give it a go.
great!
Is there any way to clean out old virtual COM ports? Every time I plug in a new USB COM device, it increments the number. The numbers are getting high, and I’m never again going to use the devices that are occupying the lower numbers.
Go into device manager, click view -> hidden devices, expand com ports, start right clicking and uninstalling.
or just click “forget device on disconnect” in the settings.
Visit https://www.uwe-sieber.de/misc_tools_e.html and check out “COM Name Arbiter Setter” as well as some other useful tools.
https://www.majorgeeks.com/files/details/device_remover_543c.html
Just use show hidden items on device manager and delete
In the specific case of FTDI serial devices, there is a registry hack you can do so that when a device type you’ve used before is plugged in, it won’t try to assign a new COM port number unless already taken. They’ve now provided a little utility to make it a bit easier.
https://www.ftdichip.com/Support/Utilities.htm#Ignore
I’m hoping he adds the ability to assign a text label to a COM port so I don’t have to keep a written list. Having 17 active devices plugged in is a PITA to remember what’s what.
That’s a good idea – I intend to add that in. Please check back soon!
Happy to announce that custom labels has now been implemented. Please download the latest version and give it a go.
I did this the other day.
https://github.com/morgulbrut/goexperiments/tree/master/lsusbtty
+ commandline tool
+ multiplatform
+ no annoying popups
– no binaries available.
This isn’t a hack, it’s a fully realized program, that’s even better.
It’s good but it show it only when you connect it. So you have to remember it :)
Some time ago I wrote a vbscript for RainMeter, which simply show you on desktop you actual COM ports ;)
https://forum.rainmeter.net/viewtopic.php?f=4&t=25570&p=151196#p151430
The programs also maintains a list of the serial ports. Just right click on the taskbar icon to see the list of ports, in order they were added with the newest first.
I think it’s not quite a full-fledged use COM ports such program. There are also options for the complete serial port monitoring. How is this free software worse https://www.com-port-monitoring.com/ ? You can get not only the name of the port but also its data.