Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: WinXP: Teensy 3.1 serial device goes missing after reset while Serial Monitor is open

  1. #1
    Senior Member
    Join Date
    Oct 2012
    Location
    Portland OR
    Posts
    706

    WinXP: Teensy 3.1 serial device goes missing after reset while Serial Monitor is open

    I am using Teensy 3.1 and Teensyduino 1.18 on Windows XP SP3. The system generally works as expected.

    However, if I press the "reload" button on the Teensy, or short the bottom-side "Reset" node to ground, while the Arduino Serial Monitor window is open, then Windows looses track of the Teensy (Serial port 'COM53' not found) and will not find it again until I either (A) reprogram the teensy using the "Upload" button in the Arduino window, or (B) unplug and reconnect the USB cable.

    I'm not sure if this is a known bug or not. I believe this behavior has been the same on my system since the very first version of Teensyduino that worked with Teensy 3.0. It may in fact be simply due to how Windows XP handles USB-serial devices that disappear and reappear, without physically being unplugged and re-plugged.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,081
    This is a known bug in the USBSER.SYS driver in Windows. All versions of Windows have this bug. Only Microsoft can fix this.

    The Linux driver works much better.

  3. #3
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    Is this relevant to the Microsoft bug's work-around:
    Windows 7, MS Visual Stuidio (Atmel Studio 6)
    There's a terminal emulator in that IDE. You choose the COM port from a list, then click an icon, and a new window pops up, much like the Arduino IDE's terminal.
    And you can repeat this for other COM ports, each in a separate window which I dock in a paned fashion. Great for having 4 Teensys going at once as I'm doing in this Wireless Sensor work.

    But the point: If I unplug or reset a Teensy, that terminal emulator displays Port No Longer Available - which means it catches some call-back from MS Windows reporting that port/USB is down. Much like you see in the Device Manager's list of extant COM ports and devices - which also change on the fly.
    When I re-plug/restart the Teensy, the terminal windows resumes displaying the stream. I need not take any action to reopen the port.
    Very handy.

    So this mechanism in Windows 7 (and I assume, XP) with Visual Studio (and Atmel Studio 6) with VIsual Micro for Teensy support - seems like something that could be in the Windows version of the Arduino IDE. But that's in Java, right? Seems like it could use the same event callback though?

    I should upload/link to a screen capture video to show this.

  4. #4
    Senior Member
    Join Date
    Oct 2012
    Location
    Portland OR
    Posts
    706
    If I unplug and re-plug the USB cable, mine will work too (although I have to manually re-open the serial monitor). But if you can just reset the Teensy without unplugging and it still works, that is definitely better than what I see.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,081
    But the point: If I unplug or reset a Teensy, that terminal emulator displays Port No Longer Available - which means it catches some call-back from MS Windows reporting that port/USB is down. Much like you see in the Device Manager's list of extant COM ports and devices - which also change on the fly.
    When I re-plug/restart the Teensy, the terminal windows resumes displaying the stream. I need not take any action to reopen the port.
    Very handy.
    I'll put this on my list of stuff to try when I start supporting Arduino 1.5.7, which isn't released yet, and I won't necessarily support quickly, but I will get to it eventually.....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •