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

Thread: Teensy 4.0 USB Keyboard and HID mode support

  1. #1
    Junior Member
    Join Date
    Nov 2019
    Posts
    2

    Teensy 4.0 USB Keyboard and HID mode support

    Is the USB Keyboard mode supported for Teensy 4.0 in Teensyduino?

    Using the latest* version from the download page, the UI does not show any other "USB Type" mode than Serial.

    In the UI configuration files, the usual entries "Keyboard", "Keyboard/Mouse", some others and RawHID are commented out. Does this mean they are not supported yet?
    I've tried to uncomment them, but selecting Keyboard as USB Type didn't compile (using the Example code Teensy/USB_Keyboard/Simple). RawHID did compile, but did not seem to work properly (no packets got sent/received).

    If in fact USB Keyboard is not supported but RawHID is.. is it possible to use RawHID to implement basic Keyboard functionality?

    Or will the USB Keyboard mode be supported for Teensy 4.0 in the future?


    *(I'm using Arduino IDE 1.8.10 and Teensyduino 1.48)

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,544
    All USB modes should be supported on the T4, soon. Paul told that he was working on this but that's not his only high priority, there are a lot of things still to do until the T4 will "turn round". So, please be patient and stay tuned. Or write the drivers yourself and contribute them through a GitHub pull request. The Teensyduino core is open source. Everybody is invited to use it, but also to contribute to it

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,089
    Paul notes other commitments will have him otherwise engaged until 11/25 when getting back to USB will be high or first priority. Probably safe to expect updated Beta TD 1.49 in the first week of December with one or more USB interfaces functionally supported.

    USB speed went from 12 Mbps to 480 Mbps - which just makes catching/debugging things perhaps a bit more of a challenge. The real issue is that the 480 Mbps USB device hardware is also different that the 12 Mbps hardware that allowed functional similarity to make this less/no work across the T_3.x family.

    That 40X USB speed increase allows the Teensy 4 doing simple USB Serial to overwhelm a typical PC Serial Monitor that doesn't have super efficient processing, so that was the first non-trivial task - and that was when the T4 was running at what may end up being half less of its end speed after the USB code is tuned up - the current WIP on github already about doubled T4 output - and Paul hopes to do that again. That is for support of the most used Serial interface - but until that is working robustly - any lingering issues would likely break/affect other USB variants as well.

  4. #4
    Junior Member
    Join Date
    Nov 2019
    Posts
    2
    Okay thanks for the info. I probably can't write the drivers themselves I will have to wait, but maybe there is some example code in the datasheet.

  5. #5
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,719
    Hopefully it will be done in a few weeks. My strong guess is that it will be compatible with the drivers/libraries for the current Teensy 3.x boards.

    So for example for keyboard you can look at the page: https://www.pjrc.com/teensy/td_keyboard.html

    If it were me and I wanted to get a jump on this while waiting, I would pick up something like a T3.2 or probably even T-LC and try experimenting and then when the first beta version of Teensyduino that has this support for the T4 comes out, you will be ready to try it out.

Posting Permissions

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