During serial port testing, the serial port is used to unplug the printer and replace it with the test. When the program is opened, an error is prompted: the given port name does not start with COM/COM or does not resolve to a valid serial port. (The given port name does not start with COM/COM or is not resolved as a valid serial port)
In the beginning, you can only find the COM port in the Device Manager of your computer. Then, disable the COM port and enable it. In this way, I found the solution online for half a day and online for half a day.
It turns out that the COM1 port is occupied by the printer driver. You can change the port pointed to by the printer driver to another port.
It turns out that the printer uses this serial port. Although the printer is unplugged, it still occupies the port, causing the program to fail to open the port again, directly change the printer port or delete it without any need ..
Serial Port debugging prompts the given port name does not start with COM/COM exception solution. It is found that the printer is playing a strange role.