[chirp_devel] [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:]
Won't this cause us to detect them, but then fail to open them? Or is the failure just in the detection code above?
--Dan
No, no problems. I checked in his Win7x32. Chirp reads and writes to the ports greater COM9. Initialize the port goes up. win32file.CreateFile()
2015-10-12 23:37 GMT+03:00 Dan Smith dsmith@danplanet.com:
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:]
Won't this cause us to detect them, but then fail to open them? Or is the failure just in the detection code above?
--Dan
I modified the registry to make one of my ftdi cables show up on com14. Both the old port (com4) is listed since it was the last used, along with the new port number com14. Com14 works in chirp to download my radio as expected on win10 x64. Seems ok to me!
-----Original Message----- From: "Dan Smith via chirp_devel" chirp_devel@intrepid.danplanet.com Sent: 10/12/2015 1:37 PM To: "Alex K" lepik.stv@gmail.com; "chirp_devel@intrepid.danplanet.com" chirp_devel@intrepid.danplanet.com Subject: Re: [chirp_devel] [patch modified] doesn't recognize multiple commports in Win 7 - issue #2783
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:]
Won't this cause us to detect them, but then fail to open them? Or is the failure just in the detection code above?
--Dan _______________________________________________ chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
Apparently another side affect of this issue has been that when there are mmultiple com ports available, only 1 port would in the list to choose from. I plugged in 5 USB-to-Serial cables and all 5 COM ports were in the list.
Jim KC9HI
On Wed, Oct 14, 2015 at 1:33 AM, Patrick Lang via chirp_devel chirp_devel@intrepid.danplanet.com wrote:
I modified the registry to make one of my ftdi cables show up on com14. Both the old port (com4) is listed since it was the last used, along with the new port number com14. Com14 works in chirp to download my radio as expected on win10 x64. Seems ok to me! ________________________________ From: Dan Smith via chirp_devel Sent: 10/12/2015 1:37 PM To: Alex K; chirp_devel@intrepid.danplanet.com Subject: Re: [chirp_devel] [patch modified] doesn't recognize multiple commports in Win 7 - issue #2783
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:]
Won't this cause us to detect them, but then fail to open them? Or is the failure just in the detection code above?
--Dan _______________________________________________ chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
Is that issue still happening, or is it fixed?
-----Original Message----- From: "Jim Unroe" rock.unroe@gmail.com Sent: 10/14/2015 2:21 AM To: "Patrick Lang" stickpatrick@gmail.com; "chirp-devel" chirp_devel@intrepid.danplanet.com Subject: Re: [chirp_devel] [patch modified] doesn't recognize multiplecommports in Win 7 - issue #2783
Apparently another side affect of this issue has been that when there are mmultiple com ports available, only 1 port would in the list to choose from. I plugged in 5 USB-to-Serial cables and all 5 COM ports were in the list.
Jim KC9HI
On Wed, Oct 14, 2015 at 1:33 AM, Patrick Lang via chirp_devel chirp_devel@intrepid.danplanet.com wrote:
I modified the registry to make one of my ftdi cables show up on com14. Both the old port (com4) is listed since it was the last used, along with the new port number com14. Com14 works in chirp to download my radio as expected on win10 x64. Seems ok to me! ________________________________ From: Dan Smith via chirp_devel Sent: 10/12/2015 1:37 PM To: Alex K; chirp_devel@intrepid.danplanet.com Subject: Re: [chirp_devel] [patch modified] doesn't recognize multiple commports in Win 7 - issue #2783
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:]
Won't this cause us to detect them, but then fail to open them? Or is the failure just in the detection code above?
--Dan _______________________________________________ chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
participants (4)
-
Alex K
-
Dan Smith
-
Jim Unroe
-
Patrick Lang