Teensy did not respond to a USB-based request

Status
Not open for further replies.

urbanspaceman

Well-known member
Goodmorning!
Some months ago, i bought a teensy 3.1
after checking if it works connecting the usb cable (blink)
I have not used anymore and I left it in a drawer. Now I need it and I have installed all the necessary software on my linux opensuse.

when I connect the teensy, nothing happens (no blink) .. if I press the button nothing happens. I tried to load the sketch blink but fail with the following error
Teensy did not respond to a USB-based request to automatically reboot.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.

in the list of USB devices connected to my computer, I have
Bus 003 Device 005: ID 16c0:0478 Van Ooijen Technische Informatica Teensy Halfkay Bootloader

can you help me?
thank you
 
What could be the reason for a Teensy 3.1 board to not respond to a USB-based reset request?

I've read the PJRC troubleshooting page but I still didn't find an answer. There's only this mention related to that error: "if your code disables the USB port or disables interrupts or enters a deep sleep mode which stop the CPU".

None of these conditions are valid for my application. I even tried the blink example with no luck. The programming seems to work if I push the button but it never happened before hence I have some concerns about Teensy's "health" condition.

Since last time I've updated a sketch, two things happened:

(1) Teensy has encountered a glitch (or latch-up?) when I've removed the USB cable between it and my laptop;

(2) I've updated my xubuntu to 15.10.

Could any of these be the real culprit?
 
I'd first try with another Teensy 3.1 or 3.2 for a differential diagnose. Normally, one should have a few of them in the drawer.
 
It's embarrassing, I know, but I should have been trying that already if I would had one (that's it, a bunch of them will arrive in few days).

But now that you mentioned it, I've just found a Teensy LC board on my table; well, I had the same problem.

Once again, my laptop has betrayed me. It's time for big change, I think..
 
What could be the reason for a Teensy 3.1 board to not respond to a USB-based reset request?

Well, there are many possible reasons.

Obviously your hardware still has to be working, which you can test by pressing the button on Teensy and watching whether the Teensy Loader responds.

The teensy_reboot program, in hardware/tools within Arduino, actually sends the request. It tries to find all USB devices which match the known Teensyduino USB devices. First, Teensy has to be actually running with USB working. Your code can turn off the USB port, or you could enter a sleep mode where you're no longer responding the USB requests from your PC, or you could turn off interrupts which prevents the USB code from running when the PC sends control transfers.

If Teensy is still running properly with USB still active, the teensy_reboot program needs to find your Teensy. If you've changed the USB descriptors, it may not find your device. If you have more than 1 Teensy, it might find the wrong one.

After your device is found, it tries to open the device and send the reboot request. If you program was compiled with Serial (in the Tools > USB Type menu), it will be opened as a COM port (Windows) or serial device (Mac, Linux). If some other program already has the port open, teensy_loader may be unable to open it. If it's not Serial, the HID interface used for emulating serial is opened and a HID feature request is sent. Usually more than 1 program can open the same HID interface, but again, teensy_reboot is at the mercy of what your operating system allows. If opening the device fails, or writes aren't allowed, then auto-reboot fails. But with serial (the default), Window and Mac prevent more than 1 program from opening a serial port, and Linux also enforces some restrictions even when it allows 2 program to open. Another program on your PC accessing the COM port / serial device will definitely interfere. On Windows pre-10, USB driver bugs can also wreck havoc.

USB is very reliable. If the device can be opened and your OS allows sending the request, it almost always works. But there can be issues with some USB hubs where Teensy reboots too quickly. Collecting some problematic hubs is actually on my to-do list....

Of course, once Teensy reboots into bootloader mode, your PC has to detect it and allow access. Since you already know it works when you press the button, this isn't an issue. Or at least it shouldn't be. However, I have heard reports strange udev issues with Linux on Ubuntu 15.10. This is very unlikely to be a problem, but still, you might try using one of the LTS releases like 14.04 or 16.04, which get much more testing.
 
Thank you very much for your time, Paul.

Most likely, it was a udev issue, indeed. I left the updating process unattended for a while and I found it stalled; I rebooted the laptop then I have to manually restart the update procedure.

After the final restart, xubuntu left me networkless.. ;) No wired, no wireless.. although the hardware was detected and the drivers were Ok. After an hour of deep searching, I manually reconfigured the eth0 (via ifconfig and /etc/network/interfaces) then I found a dead simlink for resolv.conf (pointing to an completely wrong path).

Once the wired network was back, it took more than an hour to install some package updates.. then it failed to automount my /root partition and so on. ;) Anyway, the USB was working Ok thus I didn't blame it at first.

Speaking of udev, I was happy that the upgrade process kept my eth0/wlan0 notation for now (as I've read they've changed it starting with 15.10). I'll try an upgrade to 16.10 (and I hope to have more luck this time).

Anyway, the programming procedure runs OK once I press the onboard button (for both 3.1 and LC boards). I never had this problem before (nor with the raspberry pi for that matter).

@Theremingenieur:

Xubuntu forever! ;)
 
Status
Not open for further replies.
Back
Top