Teensyduino 1.36 not uploading to Teensy 3.6

Status
Not open for further replies.

ananya

Member
Hi,

Suddenly, I am unable to upload programs to Teensy 3.6 using Teensyduino 1.36 part of Arduino 1.8.2.
I am using Ubuntu 16.04 on a ThinkPad X230.

I get the following output when I try to upload the Blink program from Examples/Basic.

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.

Just before the above message appears, the LED on the Teensy blinks once.

When I press the button on the Teensy after seeing the message, the Teensy loader program does not load the compiled hex file.

I tried all the troubleshooting instructions found in the forum. I tried all three USB ports on my laptop and several USB cables, ensuring that all USB cables are of good quality with wires for both data and power. I tried restarted my laptop/Arduino/Teensy loader programs several times but did not see any change.

I also tried the TyCommander program recommended by recent troubleshooting guides. Below is a Tycommander screenshot with logs that show failed status of Reset and Bootloader menu commands.

Screenshot at 2017-06-09 18:12:03.jpg

I also used teensy command-line programs and got a similar response.

Code:
ananya@firenze:~/Tools/arduino-1.8.2/hardware/tools$ sudo ./teensy_reboot 
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.
ananya@firenze:~/Tools/arduino-1.8.2/hardware/tools$ sudo ./teensy_restart
ananya@firenze:~/Tools/arduino-1.8.2/hardware/tools$

Please help in debugging the problem.
 
Last edited:
Yes. This is what it looks like:

ananya@firenze:~/Tools/arduino-1.8.2/hardware/tools$ cat /etc/udev/rules.d/49-teensy.rules
# UDEV Rules for Teensy boards, http://www.pjrc.com/teensy/
#
# The latest version of this file may be found at:
# http://www.pjrc.com/teensy/49-teensy.rules
#
# This file must be placed at:
#
# /etc/udev/rules.d/49-teensy.rules (preferred location)
# or
# /lib/udev/rules.d/49-teensy.rules (req'd on some broken systems)
#
# To install, type this command in a terminal:
# sudo cp 49-teensy.rules /etc/udev/rules.d/49-teensy.rules
#
# After this file is installed, physically unplug and reconnect Teensy.
#
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666"
#
# If you share your linux system with other users, or just don't like the
# idea of write permission for everybody, you can replace MODE:="0666" with
# OWNER:="yourusername" to create the device owned by you, or with
# GROUP:="somegroupname" and mange access using standard unix groups.
#
#
# If using USB Serial you get a new device each time (Ubuntu 9.10)
# eg: /dev/ttyACM0, ttyACM1, ttyACM2, ttyACM3, ttyACM4, etc
# apt-get remove --purge modemmanager (reboot may be necessary)
#
# Older modem proding (eg, Ubuntu 9.04) caused very slow serial device detection.
# To fix, add this near top of /lib/udev/rules.d/77-nm-probe-modem-capabilities.rules
# SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789]?", GOTO="nm_modem_probe_end"
#
ananya@firenze:~/Tools/arduino-1.8.2/hardware/tools$
 
Also, here is the output of lsusb with Teensy turned on:

ananya@firenze:~/Tools/arduino-1.8.2/hardware/tools$ lsusb
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 04f2:b2ea Chicony Electronics Co., Ltd Integrated Camera [ThinkPad]
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 033: ID 16c0:0483 Van Ooijen Technische Informatica Teensyduino Serial
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 
Last edited:
The next thing I would try is to unplug the board, and plug it back in while holding the program button. Then try upload to it... Usually when like this I will try to upload a real simple program like blink
 
I tried two steps based on your suggestion:

- I kept the button held down while uploading
- I let go of it after plugging in the cable and then uploaded

Both steps, same result.

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.

I also tried powering the Teensy on and off before proceeding the above steps. Same result.
 
Last edited:
You can release it once it is plugged in. This will leave the Teensy in program mode without the program currently on it having any control...
 
I tried two steps based on your suggestion:

- I kept the button held down while uploading
- I let go of it after plugging in the cable and then uploaded

Both steps, same result. The LED blinks once and then this message comes up.

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.

I also tried powering the Teensy on and off before proceeding the above steps. Same result. :(
 
Last edited:
You're seeing 16c0:0483 with lsusb, which is good. That's a Teensy which has successfully uploaded at least once.

If you close Teensy Loader, or just turn off Auto Mode, after pressing the button your PC should see Teensy disconnect and then reappear as 16c0:0478. When it's connected with that ID, Teensy Loader should be able to upload your code. Best to focus on that part first.

When Teensy is connected as 16c0:0483, Arduino is supposed to be able to ask it to reboot and reconnect as 16c0:0478. But lots of things might interfere with this process. Every Teensy has a physical pushbutton because there are lots of ways this USB-based request might not work. You could upload code onto your Teensy which disable interrupts, so the USB can't respond. Your Linux machine could have a program like Gnome Modemmanager which opens and hogs the device, preventing other programs (like Arduino) from being able to access it.

That error simply means Arduino couldn't get the board to reboot automatically. That's why it's asking you the physically press the button.
 
Thanks for this information, Paul. I will remember these debugging steps for the next time since the problem is now solved thanks to black magic.

I updated the OS, Arduino libraries, Arduino board packages, turned off my laptop, turned off the Teensy, went away for a few days to pray and party, came back to my lab, restarted things again and ofcourse, the Teensy loader was able to load new code! It succeeds in loading new code every time now.

I suspected heating, disabled interrupts, and bad OS device handlers to be part of the problem. I will hook up a scope or a bus-pirate next time this happens to understand more deeply.

When the loader was failing, I saw the LED would blink once. What does this mean?
 
Last edited:
When the loader was failing, I saw the LED would blink once. What does this mean?

I have absolutely no idea why it would do that. I would *really* like to know what it means, what really happened! Sadly, these sorts of "random" PC-based issues are very elusive.
 
Status
Not open for further replies.
Back
Top