thedjnK / AuTerm

AuTerm (for autonomous terminal) offers a free extensible feature rich terminal utility created in Qt
GNU General Public License v3.0
26 stars 7 forks source link

Auto reconnect upon device being disconnected and reconnected #15

Closed thedjnK closed 1 month ago

thedjnK commented 2 months ago

When the device usb cable is unplugged from the PC the pop up window comes up. I replug the usb cable and then hit ‘Close’ and then click ‘Open Port’ I am back up and running – vast improvement from my version of UwTerminal.

While the dialog box is being displayed, please consider adding code so that every X ms (say 250 to 1000) it tests if the port has reappeared and if it has, then it automatically closes the dialog box and automatically reopens the port and resume as if nothing had happened (although you could add a message in the output area like “port lost/reappeared”

thedjnK commented 2 months ago

CC @tailoredsoft

tailoredsoft commented 2 months ago

Thank you.

I asked chatGPT if it is possible to register for an event that informs when a plug and play device has been plugged into a Windows/Linux/Mac PC and all three are capable of that. See ... https://chatgpt.com/share/66e7e9da-3180-800e-9dc4-d1ef5d2c4bfb

thedjnK commented 1 month ago

Have added preliminary windows support (will need to build yourself), unfortunately whilst getting a global signal for device enumeration on windows is incredibly easy, on linux you need to do the anarchic thing of polling on a file descriptor, which needs it's own damn thread, will have to rework it to get it supported on linux. And as for mac, someone else can contribute it or it can go without!

thedjnK commented 1 month ago

Added in windows version 0.32, linux support will be in next release (0.33), mac will not be implemented unless someone else contributes/tests it