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

Thread: Teensyduino environment won't find the USB/Serial port...

  1. #1
    Junior Member
    Join Date
    Oct 2019
    Posts
    1

    Teensyduino environment won't find the USB/Serial port...

    Yesterday I wrote to Paul:
    Hello, I have installed Teensyduino together with the Arduino environment. I've also switched Tools to Teensy 3.5, compiled 'blink_fast' sample and get the error msg 'No Teensy boards were found on any USB ports of your computer' when I Load.
    With an 'Arduino Uno' board, Tools/Port say I'm using COM4, and there's sound when I'm attaching/detaching the Uno's USB cable.
    With the Teensy 3.5, there's NO sound attaching/detaching the USB cable, Load fails as explained above and COM4 doesn't show under Tools/Port! WHY???
    Jan Bengtsson

    A few hours later I got this reply from Paul:
    Quick answer:

    The most common problem is due to charge-only USB cables.

    Teensy sometimes uses HID protocol, especially while programming, so in
    those mode no COM port is seen. But if you have Teensyduino 1.42 or
    high installed, it should show in the Tools > Ports menu as HID.

    Paul,
    Thanks for your quick reply! I wasn't aware there are 'charge-only USB cables'! I seem to have several of those, but looking through my drawers, I found a much older cable that did make a "sound" when I attached the Teensy 3.5 with it; I can now compile and download programs. That problem solved!
    BUT, now I got another problem! The same USB port in my laptop (Windows10), instead of still being COM4, it has become COM6! When I try to use the Serial i/f in my 'blink_fast' code and try to use the 'Serial Monitor', it assumes COM4 (which it can't find); I haven't found a way to change from COM4 -> COM6...
    Jan

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,806
    Quote Originally Posted by JanB View Post
    I haven't found a way to change from COM4 -> COM6...
    In Arduino, click Tools > USB Type and make sure "Serial" is selected.

    Then upload any program to your Teensy. Even Arduino's default blank program is ok. Keep an eye on the Teensy Loader window, to confirm the program did indeed upload and Teensy reboots.

    Then wait a few seconds while Windows detects the change of USB. Click the Tools > Ports menu. You should see your Teensy listed under "Teensy Ports" and also "Serial Ports". Select the Teensy Ports one.

    If you don't see something like that, please capture a screenshot and share it here, so we can see what's wrong on your screen.

  3. #3
    In my environment I'm using two Teensy boards (3.2 and 4.0) to connect my PC via MIDI to the T4. The T3.2 acts as MIDI to OSC router and is connected to the T4 via cables to TX1/RX1 . Works like a charm. But from time to time, I'm getting this error:
    2 other Teensy boards found.Please select
    a Teensy from the Tools > Ports menu.
    The port and board type is correctly selected in the Tools menu.
    Any idea how to prevent this message?

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,806
    Quote Originally Posted by DragonSF View Post
    Any idea how to prevent this message?
    Without understanding the cause, I can't advise how to avoid this. But I can tell you a little about how things work. Maybe that can lead to discovering why this happens?

    In the Tools > Ports menu, you should see 2 groups called "Teensy ports" and "Serial ports". These are detected very differently, so how things behave depends on which of those you select.

    With the Teensy ports choices, the software tries to remember which physical USB port on your computer you used. This is done because Teensy changes from serial to HID to other things (if you select them in Tools > USB Type), so detecting the physical location on your PC is a (hopefully) reliable why to select a particular Teensy and have it remain selected as it becomes different USB device types. In the lower right corner of the Arduino window, you'll see something like "on usb:0/140000/0/2". Those numbers represent the physical location, specifically which PCI/PCIe bus, USB controller, root port, and hub ports. So if you unplug the USB cable and plug it into a different physical port on your PC or hub, even though it's the same Teensy the software will give you this message because you had previously selected a different port.

    When you select from the normal serial ports, Arduino remembers a COM port number. In the lower right corner, you should see something like "on COM4". This is far from ideal for Teensy, which changes USB type. It's meant for normal Arduino boards which follow a model of "everything must be a serial port". Because Teensy can run in HID and other non-serial modes, the Teensyduino software tries to look for the first Teensy it can find, if none is found with the specific COM port. That can actually be pretty convenient if you use only 1 Teensy. But if you have more than 1, there's no reliable way to uniquely select a Teensy when using non-serial modes.

    Something else to consider is how Windows assigns COM port numbers. This isn't specific to Teensy. When Windows detects a new serial device, where "new" is any combination of USB vendor ID, product ID, version number, and serial number, it increments its COM port count and assigns that COM number to the particular combination of those 4 ID numbers. So if you plug in an Arduino Uno and a Teensy 3.2, you can expect each to get a different COM port number. These numbers are assigned and stored in the Windows registry on your PC, so you can expect different numbers when used on a different PC. There are ways to alter these assignments, but usually fiddling with such settings leads to very confusing problems.

    Whether this info really helps, only you can say. Hopefully it will clear things up a bit?

  5. #5
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Location
    Isle in the Salish Sea
    Posts
    1,237
    Quote Originally Posted by DragonSF View Post
    In my environment I'm using two Teensy boards (3.2 and 4.0) to connect my PC via MIDI to the T4. The T3.2 acts as MIDI to OSC router and is connected to the T4 via cables to TX1/RX1 . Works like a charm. But from time to time, I'm getting this error:
    ...
    Any idea how to prevent this message?
    Perhaps powering the second Teensy without connecting it to the USB of the PC might get rid of it as it seems likely (to me anyway) that the compiler is finding the wrong Teensy connected after the correct one looses USB connection during programming etc.

  6. #6
    Quote Originally Posted by PaulStoffregen View Post
    Whether this info really helps, only you can say. Hopefully it will clear things up a bit?
    Yes, it makes sense now. But somehow, it effects only the T4. Sometimes I had to update the program on the T3.2, it always worked.
    Otherwise, the 3.3 is always connected to the PC and the Windows program, which connects via USB MIDI to the 3.2 is also always connected.
    Windows should see the Com-port (3.2 is at COM9 and 4 at COM3) connected. And the problem doesn't always occur - maybe only 1 or 2 twice per 20 compilations.
    It's annoying, but not serious. I can always use the program button in that case.

Posting Permissions

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