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
Normal Topic Serial monitor not reconnecting automatically? (Read 3485 times)
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Serial monitor not reconnecting automatically?
Oct 6th, 2017 at 6:26pm
Print Post  
Hi,

I am using VM pro and VS 2017 to develop several Arduino/Teensy 3.x programs, and I typically have several VS2017/VM instances running at the same time. Today I noticed that in one VS17/VM instance the serial monitor isn't reconnecting automatically when I upload a new sketch - strange.  Also, in this instance, I don't need to disconnect before uploading as I do in the others, but the connection isn't re-established automatically - I have to manually click on 'Connect'

I am used to having to disconnect before hitting F5 for recompile/re-upload, and then the serial monitor window automatically launches (if it isn't already visible) and automatically re-connects.  

If it matters, the instances where the serial monitor behavior is 'normal' (must disconnect manually to be able to re-compile/re-upload, and the monitor automatically reconnects) are connected to their respective Teensy 3.x controllers via hardwired USB cables, and the 'abnormal' one (can re-compile/re-upload without first disconnecting, but have to manually re-connect) is connected to a Mega via a Wixel pair.

Any ideas?

TIA,

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


Posts: 240
Joined: Oct 19th, 2011
Re: Serial monitor not reconnecting automatically?
Reply #1 - Oct 6th, 2017 at 6:55pm
Print Post  
Well, I wasn't quite accurate; the one that connects via a Wixel pair doesn't require that I disconnect/connect manually.  On this one I can recompile/re-upload without disconnecting, and the port data starts showing up as soon as the Mega reboots, without any action on my part.   

So, the only discrepancy now is - why do the ones with hardwired USB connections require me to disconnect before refreshing the sketch - is this a VS problem rather than a VM one?

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial monitor not reconnecting automatically?
Reply #2 - Oct 6th, 2017 at 6:59pm
Print Post  
Is dtr on
  
Back to top
WWW  
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: Serial monitor not reconnecting automatically?
Reply #3 - Oct 6th, 2017 at 7:07pm
Print Post  
No, DTR is OFF on all instances.  I have Rts, Auto-Scroll, 'Both CR & LF', and 'Clear on Open' set on all instances.  I have the same settings everywhere, but I am getting two different behaviors, depending on whether the connection is via USB or Wixel
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial monitor not reconnecting automatically?
Reply #4 - Oct 6th, 2017 at 7:15pm
Print Post  
Dtr should always be on. Different boards use one of two methods.

If using serial USB make sure you have a loop {} at the start of setup() that waits for the port...

Code
Select All
while (!Serial)
 {} 

« Last Edit: Oct 7th, 2017 at 2:28pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: Serial monitor not reconnecting automatically?
Reply #5 - Oct 7th, 2017 at 2:16pm
Print Post  
Tim,

Thanks - I'll try that.  Didn't know about the While !Serial{} trick! Wink

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