Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tycmd: upload fails for HID Teensy 3 with older core code #102

Open
beldenfox opened this issue Nov 22, 2022 · 1 comment
Open

tycmd: upload fails for HID Teensy 3 with older core code #102

beldenfox opened this issue Nov 22, 2022 · 1 comment
Assignees
Labels

Comments

@beldenfox
Copy link

I'm running tycmd version 0.9.8 on a Raspberry Pi. I have several Teensy 3 boards attached and found that I could use tycmd to upload new code to some of the boards but not others. On the boards that failed I would get a timeout error. I finally figured out the failing boards had last been flashed using Teensyduino 1.53. Boards flashed with Teensyduino 1.57 or later worked fine.

The Teensies are configured as MIDI-only so they connect to the Pi as HID raw devices. During upload tycmd calls teensy_open_interface inlibty/class_teensy.c and for HID devices that routine sends the feature report 0xAB 0xBA 0xCD 0xDC. A Teensy flashed with a core from Teensyduino 1.53 will not acknowledge that report leading to a USB timeout. A Teensy flashed with core code from Teensyduino 1.57 or later will work fine.

Is it necessary to send that report during an upload? I removed it and was able to upload without issue (which is good since it's physically difficult to access the Teensies).

BTW, the same problem prevents tycmd reset from working.

@Koromix
Copy link
Owner

Koromix commented Nov 22, 2022

It's not needed for uploads, it just signals readiness for serial communications (without it, while (!Serial); loops never break out in Seremu mode).

But (1) it's not needed for uploads and (2) we can probably ignore the error if it fails (just warn the user but go on, even for serial communication).

I'll look into this over the weekend.

@Koromix Koromix self-assigned this Nov 22, 2022
@Koromix Koromix added the bug label Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants