@JurassicPork, would you like to add some updates to TLazSerial once (if) they are ready, otherwise I will upload them somewhere else, local copies are not always the best storage.
Currently, the main problem is that with the updated component, sometimes Lazarus disappears without a sign, together with the running app. No error, no exception, nothing?!
The other issue is with friendly names in Windows - they are retrieved from the registry, but Windows keeps a mess there, probably some Windows API shall be used for more reliable results.
This is also valid for GetSerialPortNames (I have not touched it for Windows) from LazSynaSer - it retrieves the data from HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM\, but the COM port might not be added (or removed from) there.
Info for any unlisted VID_PIDs of serial devices are welcome, here is what I have for now:
vid_0403&pid_6001 : SerialFTDI
vid_1a86&pid_7523 : SerialCH340
vid_067b&pid_2303 : SerialProlific
vid_0483&pid_5740 : SerialSTM
vid_2341&pid_8036 : SerialArduinoLeonardo
vid_10c4&pid_ea60 : SiliconLabsCP210x
vid_2184&pid_0040 : GwInstek
btbt : BluetoothSerial
Otherwise, here is the list of the changes:
1. LazSerial
1.1. Event .OnDisconnected added. Triggers if the serial device is unplugged (uninstalled or dismounted...) while being connected.
2. lazsynaser.pas
Some things added for MacOs, it did not seem to work (much), hopefuly now it is a little better.
Not clear: Some items are listed in /dev both with prefix /dev/tty.usb* and /dev/cu.usb*. Shall it tty stay? Maybe only for some (older) versions of MacOS.
There is ssoHide_tty_usbserial in the options of SerialSelector (enabled by the default.)
3. SerialWatcher - new unit. Keeps an eye on the serial devices and sends an event if a device is plugged or unplugged.
(OnComConnected and OnComDisconnected, I wonder if I should rename them).
I think it does not work on MacOs.
4. SerialSelector - new component, a combobox for selecting serial ports.
4.1. It updates its content whenever a device is plugged / unplugged.
4.2. If enabled, it shows friendly names of the COM ports, which is useful when multiple serial devices are connected to the computer.
4.3. It shows in a hint the last connected /disconnected devices and the friendly name of the selected port.
5. Known bugs:
5.1. Windows
5.1.1. Sometimes Lazarus disappears without a sign, together with the running app. No error, no exception, nothing?! (happened at least twice)
5.2. Linux
5.2.1. The added devices are not listed in the hints - Fixed in 2025.11.07.
5.2.2. The hints show when a device is (dis)connected, even if the mouse is not over the control. Fixed in 2025.11.08 (not yet uploaded)
5.2.3. The hint does not hide sometimes. Fixed in 2025.11.08 (not yet uploaded)
5.3. MacOS
5.3.1. Removing devices does not seem to be detected: Possibly fixed in in 2025.11.07.
5.3.2. Some errors are shown while building, but trying to run a couple of times makes the sample app work. Probably something with Lazarus.
5.3.3. Some Cocoa errors are shown, the app crashes. No idea if is Lazarus to blame or TLazSerial, it seems to happen when trying to add text to a TMemo.
5.3.4. Friendly names are not shown, not implemented, and probably will never be.
5.4. Common: Cannot set the height
There is an example project inside, folder test1.