0

Context: I have many embedded devices that communicate with my Windows 11 PC via USB. Each device has its own COM<n> port.

Problem: When I want to launch a terminal emulator (e.g. puTTY, TeraTerm, or CoolTerm) on a specific embedded device, I must unplug its USB cable, run mode to get the list of available COM ports, plug the USB back in and run mode again to see what's changed. Needless to say, this is a royal pain.

So:

  • Is there a Windows utility that will give me a "growl" or "ToastNotifier" style window when I unplug or re-plug a USB serial device?
  • If not, is there a Windows utility or mechanism that generates some kind of event when the USB chain changes?

The only other alternative I can think of is to write a Python script that uses PySerial or calls mode periodically and captures and diffs its output. But if I have to poll regularly, it may be rather compute intensive, and it would have to poll frequently in order to be useful.

fearless_fool
  • 31,575
  • 23
  • 126
  • 205
  • These articles may be helpful. [Detecting insertion/removal of USB input devices on Windows 10](https://stackoverflow.com/q/61158399/9014308), [USB Hotplugging callbacks with python on Windows](https://stackoverflow.com/q/62601721/9014308), [MonitoringWindowsUsb](https://wiki.wxpython.org/MonitoringWindowsUsb), [PyQt 4 USBデバイスのポップアップへの挿入検出(Windows)を実現](https://jpdebug.com/p/2890820), [Detect serial port insertion/removal](https://stackoverflow.com/q/4199083/9014308) – kunif Mar 27 '22 at 22:41

0 Answers0