I have an equipment that communicates through a COM port and it is powered by the USB port. My problem is that when the PC reboots, the power is kept but the communication with the COM port stops. The only way to restart is to remove and insert the USB cable.
I'm developing a Delphi application that turns off the USB power. I tried using devcon to do it:
devcon.exe disable *ID*
devcon.exe enable *ID*
devcon.exe restarts *ID*
But it only stops the communication with the COM port. The USB power is kept.
Is there a way to power off the USB port, so the equipment would also turn off?
Any tip will be very helpful.