Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) VS2022 - Is there a way to force a refresh of the comm port list? (Read 3586 times)
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
VS2022 - Is there a way to force a refresh of the comm port list?
Jan 23rd, 2022 at 1:36am
Print Post  
I often work with multiple processors at the same time, typically when developing an I2C-enabled application.  With two or more processors connected via USB, it becomes hard to figure out which comm port number goes with which USB cable to which processor, especially when dealing with Teensy 3.x processors (they seem to produce multiple port numbers, like 'USB on port xxx' and 'Teensy 3.5 at usb:10000/0/0/2/5/E' - not helpful).

You would think that the way to handle this would be to disconnect all but one USB cable, close and reopen the list of available comm ports, and voila! just one port in the available list - NOT!!  All the ports are still shown on the list, and there doesn't seem to be any way to get the port list to refresh, short of closing all my open VS2022 windows and starting over.

The device manager DOES seem to refresh properly, but even after confirming that inactive comm ports have been removed from the 'Ports' list in device manager, VS still refuses to update.

I haven't been able to come up with a workaround, other than closing and re-opening all VS windows - a real PITA.

Any suggestions?

TIA,

Frank
« Last Edit: Jan 23rd, 2022 at 1:38am by FrankP »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS2022 - Is there a way to force a refresh of the comm port list?
Reply #1 - Jan 23rd, 2022 at 2:08am
Print Post  
We will look into it. The COM ports should refresh correctly? I guess the issue is with the usb: ports which have to be discovered via a much slower mechanism.
  
Back to top
WWW  
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: VS2022 - Is there a way to force a refresh of the comm port list?
Reply #2 - Jan 23rd, 2022 at 2:21am
Print Post  
Tim@Visual Micro wrote on Jan 23rd, 2022 at 2:08am:
We will look into it. The COM ports should refresh correctly? I guess the issue is with the usb: ports which have to be discovered via a much slower mechanism.


Tim,

I don't have a clue - except the Device Mgr seems to do a decent job of keeping up with changes, but VS2022 doesn't.  A method of applying a 2' x 4' to VS2022's noggin to make it wake up and refresh that list would really be appreciated Wink

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS2022 - Is there a way to force a refresh of the comm port list?
Reply #3 - Jan 23rd, 2022 at 2:23am
Print Post  
If you see the COM ports in the list and then unplug a board associated to one of the ports, does the COMx port disappear from the list.
  
Back to top
WWW  
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: VS2022 - Is there a way to force a refresh of the comm port list?
Reply #4 - Jan 23rd, 2022 at 3:57pm
Print Post  
Tim@Visual Micro wrote on Jan 23rd, 2022 at 2:23am:
If you see the COM ports in the list and then unplug a board associated to one of the ports, does the COMx port disappear from the list.



No, it doesn't, and that is the whole problem.  It won't disappear unless I close and re-open the VS2022 solution

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS2022 - Is there a way to force a refresh of the comm port list?
Reply #5 - Jan 23rd, 2022 at 9:56pm
Print Post  
The COM ports should diappear. It is possible that windows is retaining them even though they disappear from device manager. We use the windows c# SerialPorts list to display them.

Please check the following options via "vMicro>General>Global Options>Communications" ...

Are these settings all true? 

Friendly Ports List
Friendly Port Menus
Network Discovery

Does this field contain any text? If so what is the text?

Port Discovery Error

Thanks


  
Back to top
WWW  
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: VS2022 - Is there a way to force a refresh of the comm port list?
Reply #6 - Jan 23rd, 2022 at 10:41pm
Print Post  
Tim,

Thanks for taking the time to look at this. I have attached a screenshot containing all four of the items you asked for.

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS2022 - Is there a way to force a refresh of the comm port list?
Reply #7 - Jan 23rd, 2022 at 11:40pm
Print Post  
Thanks, try switching the two "Friendly" options to False. Then restart the IDE and plug in one board. That should show the COM port(s) in the list. Then unplug the board. Does the port(s) list refresh and remove the ports?
  
Back to top
WWW  
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: VS2022 - Is there a way to force a refresh of the comm port list?
Reply #8 - Jan 24th, 2022 at 2:35am
Print Post  
As you asked, I set both 'Friendly' options to FALSE.  When I first bring up the IDE with no boards attached, the only ports shown are known 'other' ports. When I first plug in a single board, as shown

However, when I subsequently unplug that board, the list entry remains (forever AFACT).  The only way to get rid of it is to close and then re-open the IDE, as before.  Same thing with both boards - once on the list, they stay on the list until the IDE is closed/re-launched.

Frank


  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS2022 - Is there a way to force a refresh of the comm port list?
Reply #9 - Jan 24th, 2022 at 4:46am
Print Post  
Thanks, 

what make/model of board are you plugging in for the test?

which version of windows are you using?

  
Back to top
WWW  
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: VS2022 - Is there a way to force a refresh of the comm port list?
Reply #10 - Jan 24th, 2022 at 7:16pm
Print Post  
Teensy 3.5

Windows 10

VS2022
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2175
Joined: Feb 13th, 2019
Re: VS2022 - Is there a way to force a refresh of the comm port list?
Reply #11 - Jan 24th, 2022 at 7:21pm
Print Post  
Thanks for the detail.

We will be working on improving the Teensy Port detection in the coming days, and we will update when this has been resolved and is available for download.
  
Back to top
 
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: VS2022 - Is there a way to force a refresh of the comm port list?
Reply #12 - Jan 24th, 2022 at 7:22pm
Print Post  
Tim,

Wonderful! Thanks!

Frank
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2175
Joined: Feb 13th, 2019
Re: VS2022 - Is there a way to force a refresh of the comm port list?
Reply #13 - Jan 26th, 2022 at 3:57pm
Print Post  
This should now be resolved in the latest version (21.11.08-18), which is available from the top of the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
 
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: VS2022 - Is there a way to force a refresh of the comm port list?
Reply #14 - Feb 2nd, 2022 at 2:33am
Print Post  
I installed the newest version, and it seems to be working perfectly with respect to adding/removing Teensy boards from the drop-down menu. Here are some screenshots where I had 0, 1, 2, and then back to one Teensy attached via USB.  The  dual entries (on just says 'USB' and the other one has a numeric code) are expected and normal - either one can be selected with the same result.


  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: VS2022 - Is there a way to force a refresh of the comm port list?
Reply #15 - Feb 2nd, 2022 at 2:39am
Print Post  
Just FYI, I took 4 screenshots showing the progression from 0 Teensy's to 1, then 2, then back to 1 to show you how well the new version works.  Unfortunately  I could not for the life of me figure out how to get those 4 images into the reply.  I tried attaching them one at a time, but got stopped by the two image limit - how quaint!  Then I right-clicked on your 'helpful' image insert tool, and it was anything but helpful.  I also tried uploading the links to my google drive and adding the share links with codes, but that didn't work either.  Here's another try with just the Google drive sharable links

https://drive.google.com/file/d/16YXBNv8CllEEXWlCAZPqWwIvCCTljzAa/view?usp=shari...
https://drive.google.com/file/d/1IddGuKVc_wNazOFKbsqjHoQ73gqoTT47/view?usp=shari...
https://drive.google.com/file/d/1VG85qtRN76Hz3UsL1mTzSSPyCzjPqB4N/view?usp=shari...
https://drive.google.com/file/d/1iB-Qlwd9-6punf8yqnBPU3fwuJt5OIbR/view?usp=shari...

Good luck.  Any chance you can make this forum a little bit more image-friendly?

Frank
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint