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

Thread: A single Teensy 3.x to show up as MULTIPLE USB serial ports?

  1. #1
    Junior Member
    Join Date
    Sep 2016
    Location
    Los Angeles
    Posts
    7

    A single Teensy 3.x to show up as MULTIPLE USB serial ports?

    Hello everybody!


    I have a project where I'm trying to condense down the number of physical USB connections and reduce the number of boards in a very low bandwidth game application.

    As it sits, I have four controllers, four boards, four teensys, four USB cables, one hub and four COM ports showing up on the computer. Many points of failure.

    I have the pins and processing power available on a single Teensy, I'm wondering how hard it would be to have my single Teensy show up as FOUR com ports that I could talk to as SerialW, SerialX, SerialY and SerialZ, obviously replacing them with an appropriate number somewhere in the core libraries and the controller code.

    That way I can have four controllers, one board, one teensy, ONE USB, NO HUB and four COM ports showing up on the computer.

    Is this completely bananas? Is it a simple matter? Or ought I just rewrite the game to talk to a single serial port with the four controllers pushing data? Everybody's two cents welcome.

    Thanks!

    Andy

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,954
    I haven't done that type of USB low level programming, but two thoughts occur to me:

    1) If you can change the software on the host, you might switch to using USB HID: https://www.pjrc.com/teensy/rawhid.html. I suspect this is too involved, and you cannot readily change the host software.

    2) Alternatively if you can't change the Teensy USB software to have 4 connections, one way that might work is to use 3 Teensy hardware serial ports and use FTDI or similar USB to serial cables such as: https://www.adafruit.com/product/954. You would still need a hub (or at least 4 separate USB ports), but you would only need one Teensy. There likely is a way to change the USB driver to emulate 4 separate devices, but this would be a simple way in case there isn't.

  3. #3
    Junior Member
    Join Date
    Sep 2016
    Location
    Los Angeles
    Posts
    7
    Hey Michael,

    Using USB-HID isn't a bad idea at all - I CAN change the host software, it's just a matter of the whining I'll have to endure because somebody else will have to do that work. On the other hand, if it's only ME changing firmware...

    And I DO hear you regarding using UARTS, but I think spinning up that board, and probably including the hub on it as well would be more work than enduring the whinging from the game devs that will surely come to pass.

    Thanks!

Posting Permissions

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