Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 2 1 2 LastLast
Results 1 to 25 of 27

Thread: "Please press the RESET BUTTON on your Teensy to upload your sketch." is all get

  1. #1

    "Please press the RESET BUTTON on your Teensy to upload your sketch." is all get

    Hello,

    I got the Teensy 3.1 yesterday. The hardware looks nice and it worked well at the beginning.
    BUT then while I was playing around with the I2Cdev library in combination with the MPU6050 the Mac crashed 2 times in 2 hours. Ok, this was happening with the Arduino in combination with Processing too some times.
    (I hate this! But I don't know what the problem is...)
    And then I ended up getting "Please press the RESET BUTTON on your Teensy to upload your sketch. Auto-reboot only works if the Teensy is running a previous sketch.". And nothing more. This is the reason for this post.
    I tried EVERYTHING the internet gave me.

    I'm using a MacBook Pro and a mac Mini (cause I read I should test another computer to solve this problem, but it didn't).
    I tried to load the "blink" sketch. -> no chance, only the error occurs...
    I tested holding down the button on the Teensy while plugging in the usb -> no result.
    I testet the Mac mini -> no result.
    I still get the 3.3v on the 3.3v pin and the 5v on the USB pin -> I guess I didn't killed the whole board!?

    From what I understand, the problem is that the Teensy is confusing the mac over the serial connection (I guess I read something like that in this forum). SO is there a way to just force the Teensy back to a fabric state or something like that!?

    Is there anything I can try or is the board dead and the one day journey with Teensy is over!?

    I hope anyone has a solution!
    Thanks in advance.

  2. #2
    Isn't anyone experiencing the same issue?
    Or is there an easy solution I just haven't tried?


    Sry for forgetting the "I" in the Title "...is all I get"

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,174
    Obviously something has gone very wrong here, but from only the info in this message, I just can't tell what. It is entirely possible something killed your Teensy. There simply isn't enough info here to know.

    The best test is to first reboot your computer, without Teensy connected. All Macs have a system profiler utility that shows what hardware is connected to your Mac. Teensy Loader also has a "Verbose Info" option, which you can find in the Help menu. Those 2 can help you see if Teensy is appearing to your Mac as anything at all, or if it's totally dead. I believe the system profiler doesn't automatically refresh as you connect and disconnect USB devices, so use the refresh option in its menu.

    When you plug the Teensy in, does the system profiler see anything new in the USB device tree? If you hold the puhbutton while connecting the USB cable, Teensy should appear as a HID device with VID=16C0, PID=0478.

    Another simple thing to try is plugging into a different computer. On Windows, the Device Manager shows all the devices connected (and it does auto-refresh, but without the smoothness of a mac, so when you plug a USB device in you'll usually see it flicker, even if the section where the new device appears isn't expanded). On Linux, the "lsusb" command (typed in a terminal) shows a list of all connected USB devices.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,174
    Also, please understand I can't answer every message quickly on weekends and holidays. I do try, but outside of normal business hours, often social obligations and other life stuff means 1-2 day delays are pretty much the norm.

  5. #5
    Hello,

    Thx for the reply!
    I tested everything you said. I used two different Macs cause I don't have a windows device.

    Here is the Verbose Info:
    14:58:48: Teensy Loader 1.17, begin program
    14:58:49: Listening for remote control on port 3149
    14:58:49: initialized, showing main window
    14:58:49: HID/macos: no devices found
    14:59:07: remote connection opened
    14:59:07: remote cmd: "comment: Teensyduino 1.17 - MACOSX"
    14:59:07: remote cmd: "dir:/var/folders/6w/2vpf45t15gdcqc734bqv4rnr0000gn/T/build3378595955904390878.tmp/"
    14:59:07: remote cmd: "file:Blink.cpp.hex"
    14:59:07: File "Blink.cpp.hex". 13996 bytes, 22% used
    14:59:07: remote cmd: "status"
    14:59:07: status data sent
    14:59:07: remote cmd: "auton"
    14:59:07: remote connection closed
    14:59:07: remote connection opened
    14:59:07: remote cmd: "comment: Teensyduino 1.17 - MACOSX"
    14:59:07: remote cmd: "dir:/var/folders/6w/2vpf45t15gdcqc734bqv4rnr0000gn/T/build3378595955904390878.tmp/"
    14:59:07: remote cmd: "file:Blink.cpp.hex"
    14:59:07: File "Blink.cpp.hex". 13996 bytes, 22% used
    14:59:07: remote cmd: "status"
    14:59:07: status data sent
    14:59:07: remote connection closed
    14:59:16: Verbose Info event
    15:00:30: file changed
    15:00:30: File "Blink.cpp.hex". 13996 bytes, 22% used
    15:00:30: remote connection opened
    15:00:30: remote cmd: "comment: Teensyduino 1.17 - MACOSX"
    15:00:30: remote cmd: "dir:/var/folders/6w/2vpf45t15gdcqc734bqv4rnr0000gn/T/build3378595955904390878.tmp/"
    15:00:30: remote cmd: "file:Blink.cpp.hex"
    15:00:30: File "Blink.cpp.hex". 13996 bytes, 22% used
    15:00:30: remote cmd: "status"
    15:00:30: status data sent
    15:00:30: remote connection closed
    15:00:30: remote connection opened
    15:00:30: remote cmd: "status"
    15:00:30: status data sent
    15:00:31: remote cmd: "status"
    ... (goes on a couple more times..)
    15:00:36: remote connection closed


    When plugging in there is no new USB device found (after refreshing of cause). A Arduino Nano was detected there after refreshing.
    Anything else I can try or any more info I can give you?
    Last edited by Massel; 12-22-2013 at 02:04 PM.

  6. #6
    Quick update.
    No different results with using a Windows computer. The Teensy doesn't get listed in the device manager.

  7. #7
    Junior Member
    Join Date
    Dec 2013
    Posts
    1
    hmm, I have almost the same problem with teensy 3.1.

    System is OS X 10.8.5 with Arduino 1.0.5 + Teensyduino 1.17. The software did not crash. But after 3 program uploads the loader just showed ERROR and that was it. After that Teensy is not recognized any more. i tried several computers, Windows, Linux, but I can't upload anything. It is dead.

    I did not touch teensy and I did not change any cables. I will contact the reseller if they can exchange the Teensy. I don't know if there is a problem with Teensyduino. I never had a problem with Teensy 3.0 + OS X. I flashed 3.0 at least 50x.

  8. #8
    I guess I will contact the reseller too.
    I only flashed the Teensy 3.1 like 15 times and now it seems to be dead.

    @PaulStoffregen: Please let us know if there is anything more to try. I really want to use the teensy 3.1 cause it is flashed in like a second and with 48+ MHz much faster then most other... But I hesitate ordering another one or even get a new one for this one without knowing the reason for the sudden death.

  9. #9
    Hello,

    I didn't want this thread to be unfinished...
    I got a new Teensy 3.1 from the reseller after the old one was defined as broken by the reseller, too.
    It is running great until now! And I'm confident of using the Teensy in my prototype.

  10. #10
    Hello,

    I'm sorry to tell, but the next Teensy 3.1 seams to have a problem... Same Code, same cable like every time.
    The difference this time is that the Teensy still gets recognized but not by the Arduino software.

    The device gets listet in the device explorer (using Mac OSX).
    Reboot and different PC wasn't helping.

    What can I do?

  11. #11
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    Perhaps download and install a fresh Arduino 1.0.5 (you can install as many versions of Arduino IDE's in parallel as you'd like) and download and install the latest Teesnyduino (18.4) in the order listed and then try again.
    Then try the Blink sketch.

  12. #12
    I don't think this will solve the problem.
    I had a running setup with an OLED Display and an MPU6050 (both communicating via I2C). I was working for like 3 weeks now without any changes.
    Yesterday I was testing again and suddenly the Arduino software on a Mac and on a PC (newest versions of Teensyduino and Arduino) did't list a Port for the Teensy when connected.

    As I mentioned earlier in this thread, last time the Teensy wasn't even listet as HID device.
    This time the Teensy gets listed as HID device (on the Mac and PC) but I'm not able to get a connection from the Arduino software.

    I'm a little bit worried that the Teensy 3.1 is unstable at all or has a problem with the to other chips like MPU6050, cause this is the second Teensy. I got a new one from the reseller after the first one was dead.
    I have everything set up for a prototype using the teensy even a case and now this problem.

    So back to the question: Is there a way to get this Teensy running again? And Is there a reason for such a behavior?
    (I can send print outs of logs or screenshots if needed!!!)

  13. #13
    OK, I have solved the problem!
    The Teensy is working again!

    As solution I started the Teensy Loader Software and checked the verbose info. The device was listet when pressing the button. Then I was able to load the code from the Teensy Loader, not from the Arduino software itself as normal. After loading one time the Teensy was recognized by the Arduino software too.

  14. #14
    Junior Member
    Join Date
    May 2013
    Posts
    5
    Hi,

    I have 3 Teensy 3.1 which seems to be dead (not listed with a lsusb on my linux) and while reading this post, I realised that it seems that every teensy's death was preceding with a crash of my macbook pro while flashing.

    I tried this method but unfortunately, it has not succeed for me

    I think that the Mini54 of my 3 teensy are dead: VIN is 5V, 3.3V is 3.3 volts and I have 3.3 volts on program pin. But the voltage on the RESET test pad on the back side is 0.12V... and it does not vary when I push the push button

    Does anybody knows a way to resuscitate these teensy?

    Thanks

  15. #15
    Junior Member
    Join Date
    Sep 2014
    Posts
    7
    I have a similar-ish problem with my Teensy 3.1.

    I uploaded a sketch via Teensyduino (Arduino IDE 1.0.5), the sketch uses SoftwareSerial library, (I have read ariound and know that I should have just used the hardware Serial ports on Teensy, hindsight is perfect as usual ).
    The sketch worked as expected with an Arduino Uno. That particular Teensy 3.1 worked perfect in other projects.
    When I uploaded the sketch to Teensy, the serial port that the Teensy was on (/dev/ttyACM0) disapperared from Arduino IDE selection. I can still upload sketches to the Teensy, except now Teensy Loader asks me to manually press the reset button on the board (Please press the RESET BUTTON on your Teensy to upload your sketch. Auto-reboot only works if the Teensy is running a previous sketch.). The sketches do upload and run, for example I can upload the "Blink" sketch, and the LED blinks, but that Teensy no longer shows up as a Serial device.

    Here is the verbose output from Teensy Loader:

    17:42:47: remote connection opened
    17:42:47: remote cmd: "comment: Teensyduino 1.19 - LINUX32"
    17:42:47: remote cmd: "dir:/tmp/build4260819182966365181.tmp/"
    17:42:47: remote cmd: "file:Blink.cpp.hex"
    17:42:47: File "Blink.cpp.hex". 11252 bytes, 4% used
    17:42:47: remote cmd: "status"
    17:42:47: status data sent
    17:42:47: remote connection closed
    17:42:47: remote connection opened
    17:42:47: remote cmd: "status"
    17:42:47: status data sent
    17:42:47: remote cmd: "status"
    17:42:47: status data sent
    17:42:47: remote cmd: "status"
    17:42:47: status data sent
    17:42:47: remote cmd: "status"
    17:42:47: status data sent
    17:42:47: remote cmd: "status"
    17:42:47: status data sent
    17:42:47: remote cmd: "status"
    17:42:47: status data sent
    17:42:48: remote cmd: "status"
    17:42:48: status data sent
    17:42:48: remote cmd: "status"
    17:42:48: status data sent
    17:42:48: remote cmd: "status"
    17:42:48: status data sent
    17:42:48: remote cmd: "status"
    17:42:48: status data sent
    17:42:48: remote cmd: "status"
    17:42:48: status data sent
    17:42:48: remote cmd: "status"
    17:42:48: status data sent
    17:42:48: remote cmd: "status"
    17:42:48: status data sent
    17:42:48: remote cmd: "status"
    17:42:48: status data sent
    17:42:48: remote cmd: "status"
    17:42:48: status data sent
    17:42:49: remote cmd: "status"
    17:42:49: status data sent
    17:42:49: remote cmd: "status"
    17:42:49: status data sent
    17:42:49: remote cmd: "status"
    17:42:49: status data sent
    17:42:49: remote cmd: "status"
    17:42:49: status data sent
    17:42:49: remote cmd: "status"
    17:42:49: status data sent
    17:42:49: remote cmd: "status"
    17:42:49: status data sent
    17:42:49: remote cmd: "status"
    17:42:49: status data sent
    17:42:49: remote cmd: "status"
    17:42:49: status data sent
    17:42:49: remote cmd: "status"
    17:42:49: status data sent
    17:42:49: remote cmd: "status"
    17:42:49: status data sent
    17:42:50: remote cmd: "status"
    17:42:50: status data sent
    17:42:50: remote cmd: "status"
    17:42:50: status data sent
    17:42:50: remote cmd: "status"
    17:42:50: status data sent
    17:42:50: remote cmd: "status"
    17:42:50: status data sent
    17:42:50: remote cmd: "status"
    17:42:50: status data sent
    17:42:50: remote cmd: "status"
    17:42:50: status data sent
    17:42:50: remote cmd: "status"
    17:42:50: status data sent
    17:42:50: remote cmd: "status"
    17:42:50: status data sent
    17:42:50: remote cmd: "status"
    17:42:50: status data sent
    17:42:51: remote cmd: "status"
    17:42:51: status data sent
    17:42:51: remote cmd: "status"
    17:42:51: status data sent
    17:42:51: remote cmd: "status"
    17:42:51: status data sent
    17:42:51: remote cmd: "status"
    17:42:51: status data sent
    17:42:51: remote cmd: "status"
    17:42:51: status data sent
    17:42:51: remote cmd: "status"
    17:42:51: status data sent
    17:42:51: remote cmd: "status"
    17:42:51: status data sent
    17:42:51: remote cmd: "status"
    17:42:51: status data sent
    17:42:51: remote cmd: "status"
    17:42:51: status data sent
    17:42:51: remote cmd: "status"
    17:42:51: status data sent
    17:42:52: remote cmd: "status"
    17:42:52: status data sent
    17:42:52: remote cmd: "status"
    17:42:52: status data sent
    17:42:52: remote cmd: "status"
    17:42:52: status data sent
    17:42:52: remote cmd: "status"
    17:42:52: status data sent
    17:42:52: remote cmd: "status"
    17:42:52: status data sent
    17:42:52: remote cmd: "status"
    17:42:52: status data sent
    17:42:52: remote cmd: "status"
    17:42:52: status data sent
    17:42:52: remote connection closed
    and, after i press the reset button

    17:43:31: Device came online, code_size = 262144
    17:43:31: Board is: Teensy 3.1 (MK20DX256), version 1,03
    17:43:31: File "Blink.cpp.hex". 11252 bytes, 4% used
    17:43:31: File "Blink.cpp.hex". 11252 bytes, 4% used
    17:43:31: elf size appears to be 262144
    17:43:31: elf binary data matches hex file
    17:43:31: Code size from .elf file = 262144
    17:43:31: begin operation
    17:43:31: flash, block=0, bs=1024, auto=1
    17:43:31: flash, block=1, bs=1024, auto=1
    17:43:31: flash, block=2, bs=1024, auto=1
    17:43:31: flash, block=3, bs=1024, auto=1
    17:43:31: HID/linux: waiting for device
    17:43:31: HID/linux: waiting for device
    17:43:31: HID/linux: waiting for device
    17:43:31: HID/linux: waiting for device
    17:43:31: HID/linux: waiting for device
    17:43:31: flash, block=4, bs=1024, auto=1
    17:43:31: flash, block=5, bs=1024, auto=1
    17:43:31: flash, block=6, bs=1024, auto=1
    17:43:31: HID/linux: waiting for device
    17:43:31: flash, block=7, bs=1024, auto=1
    17:43:31: flash, block=8, bs=1024, auto=1
    17:43:31: HID/linux: waiting for device
    17:43:31: flash, block=9, bs=1024, auto=1
    17:43:31: flash, block=10, bs=1024, auto=1
    17:43:31: HID/linux: waiting for device
    17:43:31: sending reboot
    17:43:31: begin wait_until_offline
    17:43:32: HID/linux: something changed, try reading a descriptor
    17:43:32: HID/linux: Device was just disconnected
    17:43:32: offline, waited 7
    17:43:32: end operation
    17:43:32: redraw timer set, image 14 to show for 1200 ms
    17:43:32: HID/linux: bus "002", device "002" vid=8087, pid=0024, ver=0000
    17:43:32: HID/linux: bus "002", device "001" vid=1D6B, pid=0002, ver=0313
    17:43:32: HID/linux: bus "001", device "003" vid=058F, pid=6362, ver=0129
    17:43:32: HID/linux: bus "001", device "002" vid=8087, pid=0024, ver=0000
    17:43:32: HID/linux: bus "001", device "001" vid=1D6B, pid=0002, ver=0313
    17:43:33: redraw, image 9
    Could someone please point me to a way to get Teensy to become a serial device once again?
    Last edited by blurb; 04-17-2015 at 02:44 PM.

  16. #16
    Senior Member
    Join Date
    Nov 2013
    Posts
    719
    What 'usb type' have you selected in Arduino->Tools->USB Type menu?


    Not really related but also consider updating to Arduino 1.6.3 with Teensyduino 1.22; I was sticking with 1.0.5-r2 but trying each release (I was quick enough to catch) and 1.6.3 is winning me over so far.

  17. #17
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,174
    Quote Originally Posted by PHaFTa View Post
    .... I realised that it seems that every teensy's death was preceding with a crash of my macbook pro while flashing.
    Which model Mac and version of OSX is this?

    A couple other people have reported really mysterious issues with macs. I've tried on 3 different macs with 10.7, 10.8 and 10.10, but never been able to reproduce the problem.

    If this is still unresolved by next Wednesday (when Robin returns from a vacation), I'd like to swap those Teensys for new ones, and I'd really like to get the bad ones back here for testing. Please email me directly, paul at pjrc dot com. Make sure you put a link to this forum thread in your email, since I get a LOT of random emails and this thread will be long-since buried in a few days. Also, if you can give me any more details about what software is on that mac, what other USB stuff is connected, if you're using a hub (eg, plugged into the mac's keyboard or a monitor), or any other details about the setup, it might help.

  18. #18
    Junior Member
    Join Date
    Sep 2014
    Posts
    7
    Quote Originally Posted by robsoles View Post
    What 'usb type' have you selected in Arduino->Tools->USB Type menu?


    Not really related but also consider updating to Arduino 1.6.3 with Teensyduino 1.22; I was sticking with 1.0.5-r2 but trying each release (I was quick enough to catch) and 1.6.3 is winning me over so far.
    Thanks for the suggestion. It was on "Serial", I've also tried the other ones, but nothing changed. I also tried a different Teensy - now I have two Teensies that won't go into serial device mode .

  19. #19
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,174
    Teensy is NOT natively a serial device.

    When you write "won't go into serial device mode", perhaps that means you're looking for a COM port (Windows) or serial device (Mac, Linux) after you press the button? Normal Arduino brand products follow a "everything is a serial device" design, but Teensy does NOT work that way. Many people who have a lot of experience with Arduino look for serial devices in the Windows Device Manager, Mac System Profiler, or Linux device files.

    More detailed info is here:

    http://www.pjrc.com/teensy/troubleshoot.html

    When you press the button, Teensy will appear as a HID device with USB ID 16C0:0478. If you're troubleshooting, you need to look for that, not a serial port.

  20. #20
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,174
    Looking at the 2nd log on msg #15, it seems the code is being written to your Teensy.

    Since this is Linux, try running "tail -f /var/log/syslog" in a terminal. That will show you the kernel's messages.

    For example, when I run that here on Ubuntu 14.04, I get this:

    Code:
    Apr 18 15:32:38 preston kernel: [1048739.376765] usb 2-1.1.4.4.2: new full-speed USB device number 34 using ehci-pci
    Apr 18 15:32:38 preston kernel: [1048739.481602] usb 2-1.1.4.4.2: New USB device found, idVendor=16c0, idProduct=0478
    Apr 18 15:32:38 preston kernel: [1048739.481608] usb 2-1.1.4.4.2: New USB device strings: Mfr=0, Product=0, SerialNumber=1
    Apr 18 15:32:38 preston kernel: [1048739.481611] usb 2-1.1.4.4.2: SerialNumber: 000130F5
    Apr 18 15:32:38 preston kernel: [1048739.483021] hid-generic 0003:16C0:0478.0234: hidraw3: USB HID v1.11 Device [HID 16c0:0478] on usb-0000:00:1d.0-1.1.4.4.2/input0
    Apr 18 15:32:39 preston kernel: [1048740.189453] usb 2-1.1.4.4.2: USB disconnect, device number 34
    Apr 18 15:32:39 preston kernel: [1048740.399765] usb 2-1.1.4.4.2: new full-speed USB device number 35 using ehci-pci
    Apr 18 15:32:39 preston kernel: [1048740.505540] usb 2-1.1.4.4.2: New USB device found, idVendor=16c0, idProduct=0483
    Apr 18 15:32:39 preston kernel: [1048740.505546] usb 2-1.1.4.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    Apr 18 15:32:39 preston kernel: [1048740.505549] usb 2-1.1.4.4.2: Product: USB Serial
    Apr 18 15:32:39 preston kernel: [1048740.505551] usb 2-1.1.4.4.2: Manufacturer: Teensyduino
    Apr 18 15:32:39 preston kernel: [1048740.505554] usb 2-1.1.4.4.2: SerialNumber: 780690
    Apr 18 15:32:39 preston kernel: [1048740.506081] cdc_acm 2-1.1.4.4.2:1.0: This device cannot do calls on its own. It is not a modem.
    Apr 18 15:32:39 preston kernel: [1048740.506107] cdc_acm 2-1.1.4.4.2:1.0: ttyACM0: USB ACM device
    The first 5 lines are Linux detecting Teensy has a HID device, when it's running the bootloader.

    Then "USB disconnect, device number 34" means the bootloader stopped running. That's where Teensy is rebooting.

    After that, you can see it soon reappears (about 0.2 seconds later) and the kernel detects it as a serial device.

    You should see something very similar, though Linux does vary somewhat. Maybe the kernel's messages will give you some indication of what's wrong?

    If you do figure it out, please post a followup. Maybe other people using Linux with similar problems will find this thread?

  21. #21
    Junior Member
    Join Date
    Sep 2014
    Posts
    7
    Quote Originally Posted by PaulStoffregen View Post
    Teensy is NOT natively a serial device.

    When you write "won't go into serial device mode", perhaps that means you're looking for a COM port (Windows) or serial device (Mac, Linux) after you press the button? Normal Arduino brand products follow a "everything is a serial device" design, but Teensy does NOT work that way. Many people who have a lot of experience with Arduino look for serial devices in the Windows Device Manager, Mac System Profiler, or Linux device files.

    More detailed info is here:

    http://www.pjrc.com/teensy/troubleshoot.html

    When you press the button, Teensy will appear as a HID device with USB ID 16C0:0478. If you're troubleshooting, you need to look for that, not a serial port.
    Thank you, Paul. I'm afraid I was a bit sloppy on terminology, please let me explain: I understand that Teensy is not natively a serial device, however it "pretends" to be such, once a sketch is up and running on it, right?
    So, basically as far as I understand, when I press "Upload" in a Teensyduino-modified Arduino IDE:
    1) Teensy Loader talks to the Teensy, which is, at that moment not a serial device, so no COM ports/dev/ttySomething etc.
    2) Then it automatically restarts Teensy, the sketch starts running and NOW Serial.print(), Serial.write() and so on in the sketch will output into what the PC will see as a serial device and I can talk to it via Serial Monitor in Arduino IDE, minicom, a Processing sketch, etc.

    Once I uploaded a sketch that used a SoftwareSerial port (from the library that comes with Arduino IDE 1.0.5) on pins 11 and 12, what I described in point 1 happens, but point 2 does not happen any more. Instead, Teensy Loader asks me to press the button on Teensy to upload any sketch (the one with SoftwareSerial or any other, for example the standard "Blink" sketch), the sketch uploads and runs (LEDs blink however fast or slow I want an so on, for example), but even once the sketch is up and running Teensy no longer appears as a serial device anymore.
    Edit: I've done this to two Teensies, because I am bloodthirsty like that, with similar results, so it is probably not something to do with that particular one.

    Also, lsusb does not show a device 16C0:0478.

    Edit: just saw the last message. I will look at syslog and post back.
    Last edited by blurb; 04-18-2015 at 10:54 PM.

  22. #22
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,174
    Quote Originally Posted by blurb View Post
    So, basically as far as I understand, when I press "Upload" in a Teensyduino-modified Arduino IDE:
    1) Teensy Loader talks to the Teensy, which is, at that moment not a serial device, so no COM ports/dev/ttySomething etc.
    2) Then it automatically restarts Teensy......
    Yes, but ONLY if Teensy is still properly running code previously programmed, which is still listening to the USB port. The "teensy_reboot" program tries to find any Teensy running any of the code from Tools > USB Type. If it finds one, it sends the request for it to reboot.

    If your Teensy runs bad code which disable interrupts (so the USB interrupt can't be serviced) or disables the USB port, or implements a different USB type (eg, if you edit the USB code), then the teensy_reboot program will not be able to send the reboot request.

    We put a pushbutton on every Teensy for exactly this reason. The reboot request usually works, but it's possible to load programs that prevent the USB from hearing the reboot request. The pushbutton is meant to give you a way to recover from loading bad code.

  23. #23
    Junior Member
    Join Date
    Sep 2014
    Posts
    7
    Ok, this is getting weirder. I have tried the following with two Teensies 3.1 running the "Blink" sketch: the one I had problems with and a brand new one straight out of the bag.

    Case 1, brand new Teensy:


    When I plug it in to the computer, it appears on the lsusb list:
    Bus 002 Device 009: ID 16c0:0486 Van Ooijen Technische Informatica Teensyduino RawHID
    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 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
    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
    tail -f /var/log/syslog returns this:
    Apr 20 10:52:18 2-204-ivan kernel: [ 1326.638050] usb 2-1.5: new full-speed USB device number 10 using ehci-pci
    Apr 20 10:52:18 2-204-ivan kernel: [ 1326.731986] usb 2-1.5: New USB device found, idVendor=16c0, idProduct=0486
    Apr 20 10:52:18 2-204-ivan kernel: [ 1326.731991] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    Apr 20 10:52:18 2-204-ivan kernel: [ 1326.731995] usb 2-1.5: Product: Teensyduino RawHID
    Apr 20 10:52:18 2-204-ivan kernel: [ 1326.731997] usb 2-1.5: Manufacturer: Teensyduino
    Apr 20 10:52:18 2-204-ivan kernel: [ 1326.732000] usb 2-1.5: SerialNumber: 60353
    Apr 20 10:52:18 2-204-ivan kernel: [ 1326.733401] hid-generic 0003:16C0:0486.0008: hiddev0,hidraw0: USB HID v1.11 Device [Teensyduino Teensyduino RawHID] on usb-0000:00:1d.0-1.5/input0
    Apr 20 10:52:18 2-204-ivan kernel: [ 1326.735570] hid-generic 0003:16C0:0486.0009: hidraw1: USB HID v1.11 Device [Teensyduino Teensyduino RawHID] on usb-0000:00:1d.0-1.5/input1
    No disconnecting and reconnecting?

    Case 2, a Teensy I had problems with:
    Plugging in this Teensy and running tail -f /var/log/syslog produces nothing on my computer (Ubuntu 14.04). Also, this Teensy does not appear on the lsusb list:
    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 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
    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
    Then, if I press the reset button on Teensy, it stops running the sketch and this gets added to syslog:
    Apr 20 10:44:06 2-204-ivan kernel: [ 834.682504] usb 2-1.5: new full-speed USB device number 6 using ehci-pci
    Apr 20 10:44:06 2-204-ivan kernel: [ 834.775224] usb 2-1.5: New USB device found, idVendor=16c0, idProduct=0478
    Apr 20 10:44:06 2-204-ivan kernel: [ 834.775230] usb 2-1.5: New USB device strings: Mfr=0, Product=0, SerialNumber=1
    Apr 20 10:44:06 2-204-ivan kernel: [ 834.775233] usb 2-1.5: SerialNumber: 00007640
    Apr 20 10:44:06 2-204-ivan kernel: [ 834.776792] hid-generic 0003:16C0:0478.0003: hidraw0: USB HID v1.11 Device [HID 16c0:0478] on usb-0000:00:1d.0-1.5/input0
    And Teensy now appears on the usb devices list:
    Bus 002 Device 006: ID 16c0:0478 Van Ooijen Technische Informatica Teensy Halfkay Bootloader
    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 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
    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
    Also, if I upload any sketch (I thought it was my sketch with SoftwareSerial causing problems, but anything at all does this), my brand new case 1 Teensy turns into case 2 - no serial device mode, and asks for a manual reset on upload.

  24. #24
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,834
    What is your cable situation? Did the case 1 cable stay with that Teensy when you went to case 2 state?

    Teensy is robust on cables that were 'bad' with ATtiny avr usage - though I have had a couple get power to a Teensy but not show up and they are in the trash - though I'm sure they worked before. Just a note in case you moved the 'good' Teensy to the 'bad' cable and didn't consider it a possible factor. I lost an hour the other night thinking my Win 8.1 tablet was the trouble when the Teensy powered but wouldn't program or show up - until I swapped the cable.

    Also: If you ever do get a sketch to upload - try putting something like this in your setup() before any Serial output:
    Code:
    while (!Serial && (millis() <= 6000));
    Last edited by defragster; 04-20-2015 at 08:38 AM.

  25. #25
    Junior Member
    Join Date
    Sep 2014
    Posts
    7
    OK, solution found, I think the problem was with my copy of Teensy Loader. (same cable all the time and I don't think I was flooding the serial port, it behaved exactly the same for sketches without any Serial output at all)

    If someone finds themselves in the same situation, to wit (happened under 32 bit Ubuntu 14.04 for me):
    1) A Teensy was working ok, then on sketch upload Teensy Loader cannot do an automatic reset and asks you to manually press the reset button. This keeps on happening on every upload.
    2) Sketches upload to Teensy via Teensy Loader and you can see them running, (LEDs come on and off, other external devices move/buzz, etc), but there is no "serial port" to talk to, even once Teensy Loader has done uploading a sketch and you manually restarted the Teensy. Even though you selected "USB type: Serial" in Tools menu.
    3) Once Teensy is plugged in to USB and after you press the reset button, you can find Teensy Halfkay Bootloader device ID 16C0:0478 in your list of USB devices, but no "Serial Teensyduino" device appears while the sketch is running.

    I downloaded a fresh copy of Arduino IDE and Teensyduino especially since robsoles (thank you ) recommended I update anyway. Uploaded the Blink sketch into the Teensy that was acting up, it asked me to manually reset it for the last time and has worked flawlessly ever since.

Tags for this Thread

Posting Permissions

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