# HG changeset patch # User Alexey K # Date 1444549810 -10800 # Sun Oct 11 10:50:10 2015 +0300 # Node ID 853c2aa66578154be72a4a5d889db2f4d62226e7 # Parent f8d7a8b1f4f57f36be6f6130f83cb8f36dc1b2d5 [patch modified] doesn't recognize multiple comm ports in Win 7 - issue #2783 Description of the problem in the MSDN: https://msdn.microsoft.com/ru-ru/en-en/library/aa363858(v=vs.85).aspx "To specify a COM port number greater than 9, use the following syntax: "\\.\COM10". This syntax works for all port numbers and hardware that allows COM port numbers to be specified." But there is not quite right :) They write "\\.\COM10" it's not going to work. Correctly so: "\\\\.\\COM10" I tested on Win7x32, COM > 9. Work correctly. Added fixes to the drop-down list of ports. In the name of the port removing unnecessary characters for the user's convenience. diff -r f8d7a8b1f4f5 -r 853c2aa66578 chirp/platform.py --- a/chirp/platform.py Thu Oct 08 12:02:04 2015 +0300 +++ b/chirp/platform.py Sun Oct 11 10:50:10 2015 +0300 @@ -29,7 +29,7 @@ ports = [] for i in range(1, 257): - portname = "COM%i" % i + portname = "\\\\.\\COM%i" % i try: mode = win32con.GENERIC_READ | win32con.GENERIC_WRITE port = \ @@ -40,6 +40,8 @@ win32con.OPEN_EXISTING, 0, None) + if portname.startswith("\\"): + portname = portname[4:] ports.append((portname, "Unknown", "Serial")) win32file.CloseHandle(port) port = None