PaulStoffregen / teensy_loader_cli

Command line Teensy Loader
http://www.pjrc.com/teensy/loader_cli.html
332 stars 152 forks source link

teensy_loader_cli doesn't work on Ubuntu 14.04It #3

Closed jgouly closed 9 years ago

jgouly commented 9 years ago

It seems my product ID for Teensy 3.1 is 0486, not 0478.

I applied the following patch:

diff --git a/teensy_loader_cli.c b/teensy_loader_cli.c
index 53b5c6e..84dca2d 100644
--- a/teensy_loader_cli.c
+++ b/teensy_loader_cli.c   
@@ -257,7 +257,7 @@ static usb_dev_handle *libusb_teensy_handle = NULL;
 int teensy_open(void)
 {
        teensy_close();
-       libusb_teensy_handle = open_usb_device(0x16C0, 0x0478);
+       libusb_teensy_handle = open_usb_device(0x16C0, 0x0486);
        if (libusb_teensy_handle) return 1;
        return 0;
 }

But then I got the following error messages in dmesg [ 657.946363] usb 1-1: usbfs: USBDEVFS_CONTROL failed cmd teensy_loader_c rqt 33 rq 9 len 1088 ret -110 [ 657.988723] usb 1-1: usbfs: USBDEVFS_CONTROL failed cmd teensy_loader_c rqt 33 rq 9 len 1088 ret -110 [ 658.017511] usb 1-1: usbfs: USBDEVFS_CONTROL failed cmd teensy_loader_c rqt 33 rq 9 len 1088 ret -110 [ 658.040670] usb 1-1: usbfs: USBDEVFS_CONTROL failed cmd teensy_loader_c rqt 33 rq 9 len 1088 ret -110

Any ideas?

PaulStoffregen commented 9 years ago

0486 is the ID for RawHID, which is used by the default LED blink example.

When you press the button, or when the board automatically reboots into bootloader mode, the ID becomes 0478.