Serial monitor port problems (W7sp1)

Status
Not open for further replies.

oddson

Well-known member
Well this a bit of a NOOB issue from someone that's been using Teensy off and on for several years.

How do you (reliably and quickly) restore lost Serial Monitor port connections with a Teensy so that you can actually use Serial.print() for debugging/development?

I almost replied to the 'what's your favourite debugging technique' thread to say sending/MIDI messages to a software program (in my case Flowstone) because I cannot maintain a reliable serial connection between Teensy and my PC between rebuilds.

I'm running W7 sp1 on an ancient Frankendesktop.

The problem is the port menu becomes greyed out and reads "Port (emulated serial)". Other times it may offer Port 1 but not 6 or 8 where the Teensy usually show up.

I don't know if the problem is limited to MIDI builds since that's almost exclusively what I use Teensy for.

Sometimes normal behaviour is restored by reloading, sometimes by pushing the programming button and other times it just seems to be randomly working and not working.

Before I switch back to Macintosh (after 20 years away) is there some simple thing I'm missing to keep a serial connection port open between T & PC and/or to quickly restore it when dropped?

I suspect it's a caching problem but I don't know enough about Windows to know how to fix without rebooting (which also doesnt' seem to always resolve the issue).
 
Last edited:
The problem is the port menu becomes greyed out and reads "Port (emulated serial)".

This happens when you have selected a non-Serial device in Tools > USB Type. It's supposed to show that, because those modes do not have a real serial device that shows up as a COM port. Instead they have a HID interface which is used to emulate serial, so you can still use Serial.print(). In this mode, when you open the serial monitor, it automatically connects to any emulated serial device. You don't select anything, because it finds the HID interface automatically.

Other times it may offer Port 1 but not 6 or 8 where the Teensy usually show up.

I believe this is a bug in Arduino, or perhaps the JSSC library they use for Java serial port access, or maybe a timing issues between the two.

When you click the Tools menu, the Arduino IDE tries to repopulate the Ports menu. Sometimes it fails, which is almost certainly a bug. Just click the main window so the Tools menu disappears, and then click the Tools menu again.

I don't know if the problem is limited to MIDI builds since that's almost exclusively what I use Teensy for.

The latest versions of Teensyduino offer 3 choices in the USB Type menu. One is just MIDI. If you choose that one, you also get a HID interface which emulates serial. If you choose the others which have Serial, then a real COM port is used.


There's also a known bug in Windows 7 (and all pre-10 versions of Windows) affecting COM ports if the cable is unplugged while a program has the port open. It's terribly confusing, because the problem manifest the *next* time the device appears. Programs can see it exists, but can't access it.

 
There's also a known bug in Windows 7 (and all pre-10 versions of Windows) affecting COM ports if the cable is unplugged while a program has the port open. It's terribly confusing, because the problem manifest the *next* time the device appears. Programs can see it exists, but can't access it.
I think when you rebuild too... is that possible?
 
Compiling shouldn't matter. The driver bug only strikes when a program has the COM port open and the device vanishes due to Teensy rebooting or the cable getting unplugged.

The Arduino Serial Monitor automatically closes when you upload, so it avoids this bug. But if you use another program like Coolterm or putty, it's terribly frustrating. The only solution is upgrading to Windows 10 (or Linux or Mac).
 
Status
Not open for further replies.
Back
Top