Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 17 of 17

Thread: Teensy 2.0 and LC Not Writing to USB Serial

  1. #1
    Junior Member
    Join Date
    Feb 2020
    Posts
    7

    Teensy 2.0 and LC Not Writing to USB Serial

    I have done this with two Teensy 2.0's and a Teensy LC with the same results for each. My Arduino IDE is 1.8.12, Teensyduino is the latest Linux 64 bit (as of yesterday), and Teensy loader is 1.48. Running on Ubuntu 18.04.

    Note, at least one of the Teensy 2.0's has been used in the last several weeks to power a "turn NeoPixel lights to different settings using buttons" prototype. This was successful.

    First, I open up Arduino IDE, connect the Teensy 2.0 or LC via USB, and load the following example code to verify they work:

    Code:
    const int ledPin = 11;
    
    void setup() {
      // initialize the digital pin as an output.
      pinMode(ledPin, OUTPUT);
    }
    
    void loop() {
      digitalWrite(ledPin, HIGH);   // set the LED on
      delay(1000);                  // wait for a second
      digitalWrite(ledPin, LOW);    // set the LED off
      delay(1000);                  // wait for a second
    }
    Success!

    Then I load the following code to test writing to Serial (serial monitor is open and set to 9600 baud; I have also tried this with 115200 baud):

    Code:
    void setup() {
      Serial.begin(9600);
    }
    
    void loop() {
      Serial.println("Hello");
      delay(1000);
    }
    When I upload, I simply get "An error occurred while uploading the sketch". No other error messages printed above or below that (just the little white lines about how much memory I'm using). The Serial doesn't print. I tried this on all three microprocessors before and after updating Arduino IDE, Teensyduino, and Teensy loader. I also restarted my computer. Still fails. Any ideas what's going on here?

  2. #2
    Member
    Join Date
    Jan 2020
    Location
    Port Elizabeth
    Posts
    46
    I have the same environment as you, except I use Ubuntu 18.10
    To recap, your devices and device to PC communication worked for several weeks. Then you started encountering communications difficulties between device and PC.

    Exactly the same thing happened to me. It was most frustrating. It turned out that the problem was caused by my USB cables and connectors. After going through my stock of USB cables and carefully remaking all connections the problem was solved. As long as I don't disturb my USB connections my Teensy life is problem free.

    The problem lay with me. Over time I have accumulated lots of old USB cables and I made the mistake of dipping into my old stock. I think that the connectors are of poor quality and corrode over time.

    I have a sneaking suspicion that the Arduino routines handling PC to Teensy communication are not as robust as they might be. But I can't back up my claim with hard evidence so for the time being I will grant them the presumption of innocence.

    Now I use magnetic attachment USB cables. They are much easier to use, allowing one to make and break connections with ease and without disturbing the vulnerable USB connector on the device. I have retrofitted all my devices with these cables. This is a real blessing for devices, such as my smartphone, that need frequent charging.
    This is where I bought my cables
    https://www.aliexpress.com/item/1000006327495.html

    Some of the cables I bought provide power only while others provide power and data.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,473
    Before pouring a lot of time into hardware troubleshooting, check for ModemManager interfering and make sure you have the latest udev rules proper installed.

    https://www.pjrc.com/teensy/49-teensy.rules

    Ubuntu recently updated the default config for ModemManager, causing it to again interfere with Teensy and Arduino and many other USB devices! ModemManager has a bug where it doesn't respect the normal ID_MM_DEVICE_IGNORE in the "strict" filter config Ubuntu recently started using as its default setting. The ModemManager developers are aware of this problem and have fixed their code upstream, but it will likely be years until those fixes become part of any Ubuntu LTS release. Until then, ModemManager is again causing pain & suffering for so many Linux uses.

    ModemManager is difficult to delete. Normal apt remove doesn't delete it. You need at least apt purge. Even if you manage to get rid of ModemManager, it has an annoying habit of coming back from the dead as you update Ubuntu.

    So get the latest udev rules. We updated that file recently, to add a second way to ask ModemManager not to interfere with Teensy (ID_MM_DEVICE_IGNORE was supposed to be the official way, but that no longer works on Ubuntu). If you installed the udev rules quite some time ago, you may have the older copy without "ID_MM_PORT_IGNORE". Make sure you have the latest udev rules, so you're protected when/if some Ubuntu update again imposes ModemManager upon your system.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,473
    Also, check to make sure there isn't an extra copy of "teensy_serialmon" left running. Quit Arduino, then run "ps aux | grep teensy_serialmon" in a terminal. If it shows a process by that name, use "killall teensy_serialmon" to make it exit.

  5. #5
    Member
    Join Date
    Jan 2020
    Location
    Port Elizabeth
    Posts
    46
    Thanks Paul for that timely reminder. I have updated the udev rules file.

  6. #6
    Junior Member
    Join Date
    Feb 2020
    Posts
    7
    Sorry for the late reply. I had to attend to other life things!

    I ordered a new serial cable and tested it with the Teensy 2.0. No dice. I also updated with the latest `49-teensy.rules` at `/etc/udev/rules/`, ran `sudo apt-get purge modemmanager`, and did `killall teensy_serialmon`. I'm still getting the same error (on Teensy 2.0 and LC) when I upload the code (and no serial output): "An error occurred while uploading the sketch".

    To double-check the Teensies and cables were working still, I successfully uploaded the "Blink" example again.

    Not sure where to go now. Based on what you've both said I'm betting my recent upgrade to Ubuntu 18.04 (from 16.04) may be to blame.

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,473
    Quote Originally Posted by r.schuster3 View Post
    I ordered a new serial cable and tested it with the Teensy 2.0. No dice.
    Do you mean USB cable? All the advice in this thread has been for a regular USB cable and wouldn't apply for a "serial cable", where you would need to connect to specific pins and use Serial1 rather than Serial in your code.

    Maybe you mean a USB to serial cable? If so, Please be specific about the exact cable and how you're really using it. Photos are best, so we can see how you've actually connected the wires (mistakes like TX-to-TX instead of RX-to-TX are common). The exact code you're running matters too, especially using the correct name in the code for the pins where you've connected.

    I'm pretty sure you don't mean this sort of serial cable, do you?


  8. #8
    Member
    Join Date
    Jan 2020
    Location
    Port Elizabeth
    Posts
    46
    RSchuster,
    To help diagnose the problem I suggest you provide the following information:
    1) The output from the command lsusb
    For example, from my machine
    Code:
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 018: ID 1546:01a8 U-Blox AG [u-blox 8]
    Bus 001 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
    Bus 001 Device 066: ID 16c0:0483 Van Ooijen Technische Informatica Teensyduino Serial
    Bus 001 Device 006: ID 2001:3c22 D-Link Corp. 
    Bus 001 Device 005: ID 1a40:0101 Terminus Technology Inc. Hub
    Bus 001 Device 004: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
    Bus 001 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub
    Bus 001 Device 002: ID 046d:c52f Logitech, Inc. Unifying Receiver
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    You should have a line that looks something like "Teensyduino Serial"

    2) Give us the output from the Teensy loader, the small window that appears when you compile and upload. You can find the output under Help|Verbose info
    Below is an example from my machine where I deliberately create the error by leaving another serial monitor open and connected to the Teensy
    Code:
    08:20:30.430 (post_compile 1): Begin, version=1.51
    08:20:30.481 (loader): Teensy Loader 1.51, begin program
    08:20:30.506 (loader): File "AverageExample.ino.hex". 20796 bytes, 1% used
    08:20:30.510 (loader): Listening for remote control on port 3149
    08:20:30.510 (loader): initialized, showing main window
    08:20:30.531 (loader): remote connection 4 opened
    08:20:30.531 (post_compile 1): Sending command: comment: Teensyduino 1.51 - LINUX64 (teensy_post_compile)
    08:20:30.531 (loader): remote cmd from 4: "comment: Teensyduino 1.51 - LINUX64 (teensy_post_compile)"
    08:20:30.531 (loader): remote cmd from 4: "status"
    08:20:30.597 (post_compile 1): Status: 1, 0, 0, 0, 0, 0, /tmp/arduino_build_801525/, AverageExample.ino.hex
    08:20:30.597 (post_compile 1): Sending command: auto:on
    08:20:30.598 (loader): remote cmd from 4: "auto:on"
    08:20:30.598 (post_compile 1): Disconnect
    08:20:30.609 (loader): remote connection 4 closed
    08:20:30.729 (post_compile 2): Begin, version=1.51
    08:20:30.729 (loader): remote connection 4 opened
    08:20:30.734 (post_compile 2): Sending command: comment: Teensyduino 1.51 - LINUX64 (teensy_post_compile)
    08:20:30.734 (loader): remote cmd from 4: "comment: Teensyduino 1.51 - LINUX64 (teensy_post_compile)"
    08:20:30.734 (loader): remote cmd from 4: "status"
    08:20:30.811 (post_compile 2): Status: 1, 1, 0, 0, 0, 0, /tmp/arduino_build_801525/, AverageExample.ino.hex
    08:20:30.811 (post_compile 2): Disconnect
    08:20:30.821 (post_compile 3): Running teensy_reboot: /home/peter/Downloads/arduino-1.8.12/hardware/teensy/../tools/teensy_reboot
    08:20:30.873 (loader): remote connection 5 opened
    08:20:30.873 (loader): remote connection 4 closed
    08:20:30.873 (loader): remote connection 5 closed
    08:20:30.874 (reboot 4): Begin, version=1.51
    08:20:30.874 (reboot 4): location = /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:30.874 (reboot 4): portlabel = /dev/ttyACM0 Serial
    08:20:30.874 (reboot 4): Only location /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2 will be tried
    08:20:30.874 (reboot 4): portprotocol = Teensy
    08:20:30.883 (loader): remote connection 4 opened
    08:20:30.885 (reboot 4): add device: subsys=usb, type=usb_device, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:30.885 (reboot 4):   devnode=/dev/bus/usb/001/064, subsystem=usb, ifacenum=-1
    08:20:30.885 (reboot 4): add child:  subsys=usb, type=usb_interface, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0
    08:20:30.885 (reboot 4):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:30.885 (reboot 4):   model=36 (Teensy 4.0)
    08:20:30.885 (reboot 4): add child:  subsys=tty, type=(null), location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0/tty/ttyACM0
    08:20:30.885 (reboot 4):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:30.885 (reboot 4):   devnode=/dev/ttyACM0, subsystem=tty, ifacenum=0
    08:20:30.885 (reboot 4): add child:  subsys=usb, type=usb_interface, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.1
    08:20:30.885 (reboot 4):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:30.927 (loader): remote cmd from 4: "show:arduino_attempt_reboot"
    08:20:30.927 (loader): got request to show arduino rebooting message
    08:20:30.934 (loader): remote cmd from 4: "comment: Teensyduino 1.51 - LINUX64 (teensy_reboot)"
    08:20:30.934 (loader): remote cmd from 4: "status"
    08:20:31.020 (loader): remote cmd from 4: "status"
    08:20:31.179 (loader): remote cmd from 4: "status"
    08:20:31.235 (ports 5): unknown action: unbind
    08:20:31.235 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0/tty/ttyACM0
    08:20:31.235 (ports 5):   devnode=/dev/bus/usb/001/064, subsystem=usb, ifacenum=-1
    08:20:31.239 (ports 5): unknown action: unbind
    08:20:31.239 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.1
    08:20:31.265 (loader): remote connection 4 opened
    08:20:31.265 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0
    08:20:31.265 (loader): remote connection 4 closed
    08:20:31.763 (ports 5): unknown action: unbind
    08:20:31.772 (ports 5): del device: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:31.805 (ports 5): add device: subsys=usb, type=usb_device, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:31.805 (ports 5):   devnode=/dev/bus/usb/001/065, subsystem=usb, ifacenum=-1
    08:20:31.805 (ports 5): usb_add: /dev/bus/usb/001/065 (Teensy 4.0) Bootloader
    08:20:31.824 (ports 5): add child:  subsys=usb, type=usb_interface, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0
    08:20:31.824 (ports 5):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:31.824 (ports 5): usb_add: /dev/bus/usb/001/065 (Teensy 4.0) Bootloader
    08:20:31.825 (ports 5): add child:  subsys=hid, type=(null), location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0/0003:16C0:0478.001E
    08:20:31.825 (ports 5):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:31.825 (ports 5):   model=36 (Teensy 4.0)
    08:20:31.825 (ports 5): usb_add: /dev/bus/usb/001/065 (Teensy 4.0) Bootloader
    08:20:31.829 (ports 5): add child:  subsys=hidraw, type=(null), location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0/0003:16C0:0478.001E/hidraw/hidraw3
    08:20:31.829 (ports 5):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:31.829 (ports 5): usb_add: /dev/bus/usb/001/065 (Teensy 4.0) Bootloader
    08:20:31.830 (ports 5): unknown action: bind
    08:20:31.832 (ports 5): unknown action: bind
    08:20:31.839 (ports 5): unknown action: bind
    08:20:31.894 (loader): Device came online, code_size = 2031616
    08:20:31.894 (loader): Board is: Teensy 4.0 (IMXRT1062), version 1.05
    08:20:31.895 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0/0003:16C0:0478.001E/hidraw/hidraw3
    08:20:31.896 (ports 5): unknown action: unbind
    08:20:31.897 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0/0003:16C0:0478.001E
    08:20:31.898 (ports 5): unknown action: unbind
    08:20:31.904 (loader): File "AverageExample.ino.hex". 20796 bytes, 1% used
    08:20:31.909 (loader): set background IMG_ONLINE
    08:20:31.921 (loader): File "AverageExample.ino.hex". 20796 bytes, 1% used
    08:20:31.925 (loader): elf appears to be for Teensy 4.0 (IMXRT1062) (2031616 bytes)
    08:20:31.925 (loader): elf binary data matches hex file
    08:20:31.925 (loader): elf file is for Teensy 4.0 (IMXRT1062)
    08:20:31.929 (loader): begin operation
    08:20:31.935 (loader): flash, block=0, bs=1024, auto=1
    08:20:31.935 (loader):  gauge old value = 0
    08:20:31.935 (loader): flash, block=1, bs=1024, auto=1
    08:20:32.109 (loader):  gauge old value = 1
    08:20:32.111 (loader): flash, block=2, bs=1024, auto=1
    08:20:32.111 (loader):  gauge old value = 2
    08:20:32.112 (loader): flash, block=3, bs=1024, auto=1
    08:20:32.112 (loader):  gauge old value = 3
    08:20:32.113 (loader): flash, block=4, bs=1024, auto=1
    08:20:32.113 (loader):  gauge old value = 4
    08:20:32.119 (loader): flash, block=5, bs=1024, auto=1
    08:20:32.119 (loader):  gauge old value = 5
    08:20:32.122 (loader): flash, block=6, bs=1024, auto=1
    08:20:32.122 (loader):  gauge old value = 6
    08:20:32.125 (loader): flash, block=7, bs=1024, auto=1
    08:20:32.126 (loader):  gauge old value = 7
    08:20:32.128 (loader): flash, block=8, bs=1024, auto=1
    08:20:32.129 (loader):  gauge old value = 8
    08:20:32.131 (loader): flash, block=9, bs=1024, auto=1
    08:20:32.131 (loader):  gauge old value = 9
    08:20:32.134 (loader): flash, block=10, bs=1024, auto=1
    08:20:32.134 (loader):  gauge old value = 10
    08:20:32.138 (loader): flash, block=11, bs=1024, auto=1
    08:20:32.138 (loader):  gauge old value = 11
    08:20:32.142 (loader): flash, block=12, bs=1024, auto=1
    08:20:32.142 (loader):  gauge old value = 12
    08:20:32.145 (loader): flash, block=13, bs=1024, auto=1
    08:20:32.145 (loader):  gauge old value = 13
    08:20:32.147 (loader): flash, block=14, bs=1024, auto=1
    08:20:32.147 (loader):  gauge old value = 14
    08:20:32.149 (loader): flash, block=15, bs=1024, auto=1
    08:20:32.149 (loader):  gauge old value = 15
    08:20:32.151 (loader): flash, block=16, bs=1024, auto=1
    08:20:32.151 (loader):  gauge old value = 16
    08:20:32.152 (loader): flash, block=17, bs=1024, auto=1
    08:20:32.152 (loader):  gauge old value = 17
    08:20:32.154 (loader): flash, block=18, bs=1024, auto=1
    08:20:32.154 (loader):  gauge old value = 18
    08:20:32.155 (loader): flash, block=19, bs=1024, auto=1
    08:20:32.156 (loader):  gauge old value = 19
    08:20:32.158 (loader): flash, block=20, bs=1024, auto=1
    08:20:32.158 (loader):  gauge old value = 20
    08:20:32.160 (loader): sending reboot
    08:20:32.164 (loader): begin wait_until_offline
    08:20:32.260 (ports 5): unknown action: unbind
    08:20:32.265 (loader): HID/linux: something changed, try reading a descriptor
    08:20:32.265 (loader): HID/linux: Device was just disconnected
    08:20:32.265 (loader): offline, waited 2
    08:20:32.265 (loader): end operation, total time = 0.336 seconds
    08:20:32.265 (loader): set background IMG_REBOOT_OK
    08:20:32.273 (loader): redraw timer set, image 14 to show for 1200 ms
    08:20:32.274 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0
    08:20:32.834 (ports 5): unknown action: unbind
    08:20:32.839 (ports 5): del device: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:32.850 (ports 5): add device: subsys=usb, type=usb_device, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:32.850 (ports 5):   devnode=/dev/bus/usb/001/066, subsystem=usb, ifacenum=-1
    08:20:32.850 (ports 5): usb_add: /dev/bus/usb/001/066 (Teensy 4.0) Serial
    08:20:33.474 (loader): redraw, image 9
    08:20:40.770 (loader): Verbose Info event
    3) Give us an excerpt from the compile/link result menu at the bottom of the Arduino IDE. For example
    Code:
    Opening Teensy Loader...
    /home/peter/Downloads/arduino-1.8.12/hardware/teensy/../tools/arm/bin/arm-none-eabi-size -A /tmp/arduino_build_801525/AverageExample.ino.elf
    Sketch uses 20784 bytes (1%) of program storage space. Maximum is 2031616 bytes.
    Global variables use 45748 bytes (8%) of dynamic memory, leaving 478540 bytes for local variables. Maximum is 524288 bytes.
    /home/peter/Downloads/arduino-1.8.12/hardware/teensy/../tools/teensy_post_compile -file=AverageExample.ino -path=/tmp/arduino_build_801525 -tools=/home/peter/Downloads/arduino-1.8.12/hardware/teensy/../tools -board=TEENSY40 -reboot -port=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2 -portlabel=/dev/ttyACM0 Serial -portprotocol=Teensy 
    An error occurred while uploading the sketch
    This information may help us to understand the problem.

  9. #9
    Junior Member
    Join Date
    Feb 2020
    Posts
    7
    Quote Originally Posted by PaulStoffregen View Post
    Do you mean USB cable? All the advice in this thread has been for a regular USB cable and wouldn't apply for a "serial cable", where you would need to connect to specific pins and use Serial1 rather than Serial in your code.

    Maybe you mean a USB to serial cable? If so, Please be specific about the exact cable and how you're really using it. Photos are best, so we can see how you've actually connected the wires (mistakes like TX-to-TX instead of RX-to-TX are common). The exact code you're running matters too, especially using the correct name in the code for the pins where you've connected.

    I'm pretty sure you don't mean this sort of serial cable, do you?

    My bad! This was entirely a typo! I meant to say "USB" cable, but was staring at the code sample I'd posted that said `Serial`. I have been using USB cables (and the built in USB ports) with the Teensies this whole time.

  10. #10
    Junior Member
    Join Date
    Feb 2020
    Posts
    7
    Quote Originally Posted by PDOS View Post
    RSchuster,
    To help diagnose the problem I suggest you provide the following information:
    1) The output from the command lsusb
    For example, from my machine
    Code:
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 018: ID 1546:01a8 U-Blox AG [u-blox 8]
    Bus 001 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
    Bus 001 Device 066: ID 16c0:0483 Van Ooijen Technische Informatica Teensyduino Serial
    Bus 001 Device 006: ID 2001:3c22 D-Link Corp. 
    Bus 001 Device 005: ID 1a40:0101 Terminus Technology Inc. Hub
    Bus 001 Device 004: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
    Bus 001 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub
    Bus 001 Device 002: ID 046d:c52f Logitech, Inc. Unifying Receiver
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    You should have a line that looks something like "Teensyduino Serial"

    2) Give us the output from the Teensy loader, the small window that appears when you compile and upload. You can find the output under Help|Verbose info
    Below is an example from my machine where I deliberately create the error by leaving another serial monitor open and connected to the Teensy
    Code:
    08:20:30.430 (post_compile 1): Begin, version=1.51
    08:20:30.481 (loader): Teensy Loader 1.51, begin program
    08:20:30.506 (loader): File "AverageExample.ino.hex". 20796 bytes, 1% used
    08:20:30.510 (loader): Listening for remote control on port 3149
    08:20:30.510 (loader): initialized, showing main window
    08:20:30.531 (loader): remote connection 4 opened
    08:20:30.531 (post_compile 1): Sending command: comment: Teensyduino 1.51 - LINUX64 (teensy_post_compile)
    08:20:30.531 (loader): remote cmd from 4: "comment: Teensyduino 1.51 - LINUX64 (teensy_post_compile)"
    08:20:30.531 (loader): remote cmd from 4: "status"
    08:20:30.597 (post_compile 1): Status: 1, 0, 0, 0, 0, 0, /tmp/arduino_build_801525/, AverageExample.ino.hex
    08:20:30.597 (post_compile 1): Sending command: auto:on
    08:20:30.598 (loader): remote cmd from 4: "auto:on"
    08:20:30.598 (post_compile 1): Disconnect
    08:20:30.609 (loader): remote connection 4 closed
    08:20:30.729 (post_compile 2): Begin, version=1.51
    08:20:30.729 (loader): remote connection 4 opened
    08:20:30.734 (post_compile 2): Sending command: comment: Teensyduino 1.51 - LINUX64 (teensy_post_compile)
    08:20:30.734 (loader): remote cmd from 4: "comment: Teensyduino 1.51 - LINUX64 (teensy_post_compile)"
    08:20:30.734 (loader): remote cmd from 4: "status"
    08:20:30.811 (post_compile 2): Status: 1, 1, 0, 0, 0, 0, /tmp/arduino_build_801525/, AverageExample.ino.hex
    08:20:30.811 (post_compile 2): Disconnect
    08:20:30.821 (post_compile 3): Running teensy_reboot: /home/peter/Downloads/arduino-1.8.12/hardware/teensy/../tools/teensy_reboot
    08:20:30.873 (loader): remote connection 5 opened
    08:20:30.873 (loader): remote connection 4 closed
    08:20:30.873 (loader): remote connection 5 closed
    08:20:30.874 (reboot 4): Begin, version=1.51
    08:20:30.874 (reboot 4): location = /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:30.874 (reboot 4): portlabel = /dev/ttyACM0 Serial
    08:20:30.874 (reboot 4): Only location /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2 will be tried
    08:20:30.874 (reboot 4): portprotocol = Teensy
    08:20:30.883 (loader): remote connection 4 opened
    08:20:30.885 (reboot 4): add device: subsys=usb, type=usb_device, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:30.885 (reboot 4):   devnode=/dev/bus/usb/001/064, subsystem=usb, ifacenum=-1
    08:20:30.885 (reboot 4): add child:  subsys=usb, type=usb_interface, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0
    08:20:30.885 (reboot 4):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:30.885 (reboot 4):   model=36 (Teensy 4.0)
    08:20:30.885 (reboot 4): add child:  subsys=tty, type=(null), location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0/tty/ttyACM0
    08:20:30.885 (reboot 4):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:30.885 (reboot 4):   devnode=/dev/ttyACM0, subsystem=tty, ifacenum=0
    08:20:30.885 (reboot 4): add child:  subsys=usb, type=usb_interface, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.1
    08:20:30.885 (reboot 4):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:30.927 (loader): remote cmd from 4: "show:arduino_attempt_reboot"
    08:20:30.927 (loader): got request to show arduino rebooting message
    08:20:30.934 (loader): remote cmd from 4: "comment: Teensyduino 1.51 - LINUX64 (teensy_reboot)"
    08:20:30.934 (loader): remote cmd from 4: "status"
    08:20:31.020 (loader): remote cmd from 4: "status"
    08:20:31.179 (loader): remote cmd from 4: "status"
    08:20:31.235 (ports 5): unknown action: unbind
    08:20:31.235 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0/tty/ttyACM0
    08:20:31.235 (ports 5):   devnode=/dev/bus/usb/001/064, subsystem=usb, ifacenum=-1
    08:20:31.239 (ports 5): unknown action: unbind
    08:20:31.239 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.1
    08:20:31.265 (loader): remote connection 4 opened
    08:20:31.265 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0
    08:20:31.265 (loader): remote connection 4 closed
    08:20:31.763 (ports 5): unknown action: unbind
    08:20:31.772 (ports 5): del device: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:31.805 (ports 5): add device: subsys=usb, type=usb_device, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:31.805 (ports 5):   devnode=/dev/bus/usb/001/065, subsystem=usb, ifacenum=-1
    08:20:31.805 (ports 5): usb_add: /dev/bus/usb/001/065 (Teensy 4.0) Bootloader
    08:20:31.824 (ports 5): add child:  subsys=usb, type=usb_interface, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0
    08:20:31.824 (ports 5):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:31.824 (ports 5): usb_add: /dev/bus/usb/001/065 (Teensy 4.0) Bootloader
    08:20:31.825 (ports 5): add child:  subsys=hid, type=(null), location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0/0003:16C0:0478.001E
    08:20:31.825 (ports 5):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:31.825 (ports 5):   model=36 (Teensy 4.0)
    08:20:31.825 (ports 5): usb_add: /dev/bus/usb/001/065 (Teensy 4.0) Bootloader
    08:20:31.829 (ports 5): add child:  subsys=hidraw, type=(null), location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0/0003:16C0:0478.001E/hidraw/hidraw3
    08:20:31.829 (ports 5):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:31.829 (ports 5): usb_add: /dev/bus/usb/001/065 (Teensy 4.0) Bootloader
    08:20:31.830 (ports 5): unknown action: bind
    08:20:31.832 (ports 5): unknown action: bind
    08:20:31.839 (ports 5): unknown action: bind
    08:20:31.894 (loader): Device came online, code_size = 2031616
    08:20:31.894 (loader): Board is: Teensy 4.0 (IMXRT1062), version 1.05
    08:20:31.895 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0/0003:16C0:0478.001E/hidraw/hidraw3
    08:20:31.896 (ports 5): unknown action: unbind
    08:20:31.897 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0/0003:16C0:0478.001E
    08:20:31.898 (ports 5): unknown action: unbind
    08:20:31.904 (loader): File "AverageExample.ino.hex". 20796 bytes, 1% used
    08:20:31.909 (loader): set background IMG_ONLINE
    08:20:31.921 (loader): File "AverageExample.ino.hex". 20796 bytes, 1% used
    08:20:31.925 (loader): elf appears to be for Teensy 4.0 (IMXRT1062) (2031616 bytes)
    08:20:31.925 (loader): elf binary data matches hex file
    08:20:31.925 (loader): elf file is for Teensy 4.0 (IMXRT1062)
    08:20:31.929 (loader): begin operation
    08:20:31.935 (loader): flash, block=0, bs=1024, auto=1
    08:20:31.935 (loader):  gauge old value = 0
    08:20:31.935 (loader): flash, block=1, bs=1024, auto=1
    08:20:32.109 (loader):  gauge old value = 1
    08:20:32.111 (loader): flash, block=2, bs=1024, auto=1
    08:20:32.111 (loader):  gauge old value = 2
    08:20:32.112 (loader): flash, block=3, bs=1024, auto=1
    08:20:32.112 (loader):  gauge old value = 3
    08:20:32.113 (loader): flash, block=4, bs=1024, auto=1
    08:20:32.113 (loader):  gauge old value = 4
    08:20:32.119 (loader): flash, block=5, bs=1024, auto=1
    08:20:32.119 (loader):  gauge old value = 5
    08:20:32.122 (loader): flash, block=6, bs=1024, auto=1
    08:20:32.122 (loader):  gauge old value = 6
    08:20:32.125 (loader): flash, block=7, bs=1024, auto=1
    08:20:32.126 (loader):  gauge old value = 7
    08:20:32.128 (loader): flash, block=8, bs=1024, auto=1
    08:20:32.129 (loader):  gauge old value = 8
    08:20:32.131 (loader): flash, block=9, bs=1024, auto=1
    08:20:32.131 (loader):  gauge old value = 9
    08:20:32.134 (loader): flash, block=10, bs=1024, auto=1
    08:20:32.134 (loader):  gauge old value = 10
    08:20:32.138 (loader): flash, block=11, bs=1024, auto=1
    08:20:32.138 (loader):  gauge old value = 11
    08:20:32.142 (loader): flash, block=12, bs=1024, auto=1
    08:20:32.142 (loader):  gauge old value = 12
    08:20:32.145 (loader): flash, block=13, bs=1024, auto=1
    08:20:32.145 (loader):  gauge old value = 13
    08:20:32.147 (loader): flash, block=14, bs=1024, auto=1
    08:20:32.147 (loader):  gauge old value = 14
    08:20:32.149 (loader): flash, block=15, bs=1024, auto=1
    08:20:32.149 (loader):  gauge old value = 15
    08:20:32.151 (loader): flash, block=16, bs=1024, auto=1
    08:20:32.151 (loader):  gauge old value = 16
    08:20:32.152 (loader): flash, block=17, bs=1024, auto=1
    08:20:32.152 (loader):  gauge old value = 17
    08:20:32.154 (loader): flash, block=18, bs=1024, auto=1
    08:20:32.154 (loader):  gauge old value = 18
    08:20:32.155 (loader): flash, block=19, bs=1024, auto=1
    08:20:32.156 (loader):  gauge old value = 19
    08:20:32.158 (loader): flash, block=20, bs=1024, auto=1
    08:20:32.158 (loader):  gauge old value = 20
    08:20:32.160 (loader): sending reboot
    08:20:32.164 (loader): begin wait_until_offline
    08:20:32.260 (ports 5): unknown action: unbind
    08:20:32.265 (loader): HID/linux: something changed, try reading a descriptor
    08:20:32.265 (loader): HID/linux: Device was just disconnected
    08:20:32.265 (loader): offline, waited 2
    08:20:32.265 (loader): end operation, total time = 0.336 seconds
    08:20:32.265 (loader): set background IMG_REBOOT_OK
    08:20:32.273 (loader): redraw timer set, image 14 to show for 1200 ms
    08:20:32.274 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2/1-7.4.2:1.0
    08:20:32.834 (ports 5): unknown action: unbind
    08:20:32.839 (ports 5): del device: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:32.850 (ports 5): add device: subsys=usb, type=usb_device, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2
    08:20:32.850 (ports 5):   devnode=/dev/bus/usb/001/066, subsystem=usb, ifacenum=-1
    08:20:32.850 (ports 5): usb_add: /dev/bus/usb/001/066 (Teensy 4.0) Serial
    08:20:33.474 (loader): redraw, image 9
    08:20:40.770 (loader): Verbose Info event
    3) Give us an excerpt from the compile/link result menu at the bottom of the Arduino IDE. For example
    Code:
    Opening Teensy Loader...
    /home/peter/Downloads/arduino-1.8.12/hardware/teensy/../tools/arm/bin/arm-none-eabi-size -A /tmp/arduino_build_801525/AverageExample.ino.elf
    Sketch uses 20784 bytes (1%) of program storage space. Maximum is 2031616 bytes.
    Global variables use 45748 bytes (8%) of dynamic memory, leaving 478540 bytes for local variables. Maximum is 524288 bytes.
    /home/peter/Downloads/arduino-1.8.12/hardware/teensy/../tools/teensy_post_compile -file=AverageExample.ino -path=/tmp/arduino_build_801525 -tools=/home/peter/Downloads/arduino-1.8.12/hardware/teensy/../tools -board=TEENSY40 -reboot -port=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.4/1-7.4.2 -portlabel=/dev/ttyACM0 Serial -portprotocol=Teensy 
    An error occurred while uploading the sketch
    This information may help us to understand the problem.
    Output of `lsusb`:
    Code:
    ryan@ryan-ThinkPad-T460s:~$ lsusb
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 004: ID 04f2:b52c Chicony Electronics Co., Ltd 
    Bus 001 Device 011: ID 16c0:0483 Van Ooijen Technische Informatica Teensyduino Serial
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Output of Teensy Loader:
    Code:
    09:26:26.802 (post_compile 1): Begin, version=1.51
    09:26:26.883 (loader): Teensy Loader 1.51, begin program
    09:26:26.892 (loader): Listening for remote control on port 3149
    09:26:26.892 (loader): initialized, showing main window
    09:26:26.904 (loader): remote connection 10 opened
    09:26:26.904 (post_compile 1): Sending command: comment: Teensyduino 1.51 - LINUX64 (teensy_post_compile)
    09:26:26.904 (loader): remote cmd from 10: "comment: Teensyduino 1.51 - LINUX64 (teensy_post_compile)"
    09:26:26.905 (loader): remote cmd from 10: "status"
    09:26:26.998 (post_compile 1): Status: 0, 0, 0, 0, 0, 0, /tmp/arduino_build_205249/, test_serial.ino.hex
    09:26:26.998 (post_compile 1): Sending command: dir:/tmp/arduino_build_274178/
    09:26:26.998 (loader): remote cmd from 10: "dir:/tmp/arduino_build_274178/"
    09:26:26.998 (post_compile 1): Sending command: file:test_serial.ino.hex
    09:26:26.998 (loader): remote cmd from 10: "file:test_serial.ino.hex"
    09:26:27.023 (loader): File "test_serial.ino.hex". 3200 bytes, 10% used
    09:26:27.031 (loader): remote cmd from 10: "status"
    09:26:27.125 (post_compile 1): Status: 1, 0, 0, 0, 0, 0, /tmp/arduino_build_274178/, test_serial.ino.hex
    09:26:27.125 (post_compile 1): Sending command: auto:on
    09:26:27.126 (loader): remote cmd from 10: "auto:on"
    09:26:27.126 (post_compile 1): Disconnect
    09:26:27.136 (loader): remote connection 10 closed
    09:26:31.112 (post_compile 2): Begin, version=1.51
    09:26:31.112 (loader): remote connection 10 opened
    09:26:31.112 (post_compile 2): Sending command: comment: Teensyduino 1.51 - LINUX64 (teensy_post_compile)
    09:26:31.112 (loader): remote cmd from 10: "comment: Teensyduino 1.51 - LINUX64 (teensy_post_compile)"
    09:26:31.112 (loader): remote cmd from 10: "status"
    09:26:31.112 (loader): file changed
    09:26:31.122 (loader): File "test_serial.ino.hex". 3200 bytes, 10% used
    09:26:31.217 (post_compile 2): Status: 1, 1, 0, 0, 0, 0, /tmp/arduino_build_274178/, test_serial.ino.hex
    09:26:31.217 (post_compile 2): Disconnect
    09:26:31.228 (loader): remote connection 10 closed
    09:26:31.255 (post_compile 3): Begin, version=1.51
    09:26:31.255 (loader): remote connection 10 opened
    09:26:31.255 (post_compile 3): Sending command: comment: Teensyduino 1.51 - LINUX64 (teensy_post_compile)
    09:26:31.255 (loader): remote cmd from 10: "comment: Teensyduino 1.51 - LINUX64 (teensy_post_compile)"
    09:26:31.255 (loader): remote cmd from 10: "status"
    09:26:31.350 (post_compile 3): Status: 1, 1, 0, 0, 0, 0, /tmp/arduino_build_274178/, test_serial.ino.hex
    09:26:31.350 (post_compile 3): Disconnect
    09:26:31.360 (post_compile 4): Running teensy_reboot: /home/ryan/ryan_stuff/projects/microprocessing/arduino-1.8.12/hardware/teensy/../tools/teensy_reboot
    09:26:31.361 (loader): remote connection 10 closed
    09:26:31.361 (loader): remote connection 10 opened
    09:26:31.361 (loader): remote connection 10 closed
    09:26:31.365 (reboot 5): Begin, version=1.51
    09:26:31.365 (reboot 5): location = /dev/ttyS4
    09:26:31.365 (reboot 5): portlabel = /dev/ttyS4
    09:26:31.365 (reboot 5): portprotocol = serial
    09:26:31.365 (reboot 5): Serial device /dev/ttyS4 will be tried first
    09:26:31.392 (loader): remote connection 10 opened
    09:26:31.393 (reboot 5): add device: subsys=usb, type=usb_device, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
    09:26:31.393 (reboot 5):   devnode=/dev/bus/usb/001/011, subsystem=usb, ifacenum=-1
    09:26:31.393 (reboot 5): add child:  subsys=usb, type=usb_interface, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0
    09:26:31.393 (reboot 5):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
    09:26:31.393 (reboot 5):   model=27 (Teensy 2.0)
    09:26:31.394 (reboot 5): add child:  subsys=tty, type=(null), location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/tty/ttyACM0
    09:26:31.394 (reboot 5):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
    09:26:31.394 (reboot 5):   devnode=/dev/ttyACM0, subsystem=tty, ifacenum=0
    09:26:31.395 (reboot 5): add child:  subsys=usb, type=usb_interface, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1
    09:26:31.395 (reboot 5):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
    09:26:31.473 (loader): remote cmd from 10: "show:arduino_attempt_reboot"
    09:26:31.473 (loader): got request to show arduino rebooting message
    09:26:31.481 (loader): remote cmd from 10: "comment: Teensyduino 1.51 - LINUX64 (teensy_reboot)"
    09:26:31.482 (loader): remote cmd from 10: "status"
    09:26:31.596 (loader): remote cmd from 10: "status"
    09:26:31.600 (ports 6): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/tty/ttyACM0
    09:26:31.600 (ports 6):   devnode=/dev/bus/usb/001/011, subsystem=usb, ifacenum=-1
    09:26:31.664 (loader): remote connection 10 opened
    09:26:31.664 (loader): remote connection 10 closed
    09:26:31.666 (ports 6): unknown action: unbind
    09:26:31.666 (ports 6): unknown action: unbind
    09:26:31.666 (ports 6): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0
    09:26:31.666 (ports 6): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1
    09:26:31.666 (ports 6): unknown action: unbind
    09:26:31.666 (ports 6): del device: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
    09:26:32.063 (ports 6): add device: subsys=usb, type=usb_device, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
    09:26:32.063 (ports 6):   devnode=/dev/bus/usb/001/012, subsystem=usb, ifacenum=-1
    09:26:32.063 (ports 6): usb_add: /dev/bus/usb/001/012 (Teensy 2.0) Bootloader
    09:26:32.065 (ports 6): add child:  subsys=usb, type=usb_interface, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0
    09:26:32.065 (ports 6):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
    09:26:32.065 (ports 6): usb_add: /dev/bus/usb/001/012 (Teensy 2.0) Bootloader
    09:26:32.069 (ports 6): add child:  subsys=hid, type=(null), location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/0003:16C0:0478.0004
    09:26:32.069 (ports 6):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
    09:26:32.069 (ports 6):   model=27 (Teensy 2.0)
    09:26:32.069 (ports 6): usb_add: /dev/bus/usb/001/012 (Teensy 2.0) Bootloader
    09:26:32.069 (ports 6): add child:  subsys=hidraw, type=(null), location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/0003:16C0:0478.0004/hidraw/hidraw0
    09:26:32.069 (ports 6):   parent location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
    09:26:32.069 (ports 6): usb_add: /dev/bus/usb/001/012 (Teensy 2.0) Bootloader
    09:26:32.070 (ports 6): unknown action: bind
    09:26:32.071 (ports 6): unknown action: bind
    09:26:32.072 (ports 6): unknown action: bind
    09:26:32.251 (loader): Device came online, code_size = 32256
    09:26:32.251 (loader): Board is: Teensy 2.0 (ATMEGA32U4)
    09:26:32.252 (ports 6): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/0003:16C0:0478.0004/hidraw/hidraw0
    09:26:32.253 (ports 6): unknown action: unbind
    09:26:32.254 (ports 6): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/0003:16C0:0478.0004
    09:26:32.254 (ports 6): unknown action: unbind
    09:26:32.260 (loader): File "test_serial.ino.hex". 3200 bytes, 10% used
    09:26:32.266 (loader): set background IMG_ONLINE
    09:26:32.278 (loader): File "test_serial.ino.hex". 3200 bytes, 10% used
    09:26:32.285 (loader): elf appears to be for Teensy 2.0 (ATMEGA32U4) (32256 bytes)
    09:26:32.285 (loader): elf binary data matches hex file
    09:26:32.285 (loader): elf file is for Teensy 2.0 (ATMEGA32U4)
    09:26:32.291 (loader): begin operation
    09:26:32.294 (loader): flash, block=0, bs=128, auto=1
    09:26:32.450 (loader):  gauge old value = 0
    09:26:32.453 (loader): flash, block=1, bs=128, auto=1
    09:26:32.458 (loader):  gauge old value = 1
    09:26:32.459 (loader): flash, block=2, bs=128, auto=1
    09:26:32.464 (loader):  gauge old value = 2
    09:26:32.465 (loader): flash, block=3, bs=128, auto=1
    09:26:32.470 (loader):  gauge old value = 3
    09:26:32.471 (loader): flash, block=4, bs=128, auto=1
    09:26:32.476 (loader):  gauge old value = 4
    09:26:32.479 (loader): flash, block=5, bs=128, auto=1
    09:26:32.484 (loader):  gauge old value = 5
    09:26:32.486 (loader): flash, block=6, bs=128, auto=1
    09:26:32.491 (loader):  gauge old value = 6
    09:26:32.493 (loader): flash, block=7, bs=128, auto=1
    09:26:32.498 (loader):  gauge old value = 7
    09:26:32.499 (loader): flash, block=8, bs=128, auto=1
    09:26:32.504 (loader):  gauge old value = 8
    09:26:32.505 (loader): flash, block=9, bs=128, auto=1
    09:26:32.510 (loader):  gauge old value = 9
    09:26:32.511 (loader): flash, block=10, bs=128, auto=1
    09:26:32.516 (loader):  gauge old value = 10
    09:26:32.517 (loader): flash, block=11, bs=128, auto=1
    09:26:32.522 (loader):  gauge old value = 11
    09:26:32.524 (loader): flash, block=12, bs=128, auto=1
    09:26:32.529 (loader):  gauge old value = 12
    09:26:32.530 (loader): flash, block=13, bs=128, auto=1
    09:26:32.534 (loader):  gauge old value = 13
    09:26:32.536 (loader): flash, block=14, bs=128, auto=1
    09:26:32.540 (loader):  gauge old value = 14
    09:26:32.541 (loader): flash, block=15, bs=128, auto=1
    09:26:32.546 (loader):  gauge old value = 15
    09:26:32.547 (loader): flash, block=16, bs=128, auto=1
    09:26:32.552 (loader):  gauge old value = 16
    09:26:32.553 (loader): flash, block=17, bs=128, auto=1
    09:26:32.559 (loader):  gauge old value = 17
    09:26:32.560 (loader): flash, block=18, bs=128, auto=1
    09:26:32.565 (loader):  gauge old value = 18
    09:26:32.566 (loader): flash, block=19, bs=128, auto=1
    09:26:32.571 (loader):  gauge old value = 19
    09:26:32.572 (loader): flash, block=20, bs=128, auto=1
    09:26:32.577 (loader):  gauge old value = 20
    09:26:32.578 (loader): flash, block=21, bs=128, auto=1
    09:26:32.583 (loader):  gauge old value = 21
    09:26:32.584 (loader): flash, block=22, bs=128, auto=1
    09:26:32.589 (loader):  gauge old value = 22
    09:26:32.590 (loader): flash, block=23, bs=128, auto=1
    09:26:32.595 (loader):  gauge old value = 23
    09:26:32.596 (loader): flash, block=24, bs=128, auto=1
    09:26:32.601 (loader):  gauge old value = 24
    09:26:32.603 (loader): sending reboot
    09:26:32.603 (loader): begin wait_until_offline
    09:26:32.606 (ports 6): unknown action: unbind
    09:26:32.607 (ports 6): del child: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0
    09:26:32.610 (ports 6): unknown action: unbind
    09:26:32.619 (ports 6): del device: location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
    09:26:32.653 (loader): HID/linux: something changed, try reading a descriptor
    09:26:32.653 (loader): HID/linux: Device was just disconnected
    09:26:32.653 (loader): offline, waited 1
    09:26:32.653 (loader): end operation, total time = 0.363 seconds
    09:26:32.654 (loader): set background IMG_REBOOT_OK
    09:26:32.662 (loader): redraw timer set, image 14 to show for 1200 ms
    09:26:33.082 (ports 6): add device: subsys=usb, type=usb_device, location=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
    09:26:33.082 (ports 6):   devnode=/dev/bus/usb/001/013, subsystem=usb, ifacenum=-1
    09:26:33.082 (ports 6): usb_add: /dev/bus/usb/001/013 (Teensy 2.0) Serial
    09:26:33.864 (loader): redraw, image 9
    09:26:35.387 (loader): Verbose Info event
    Output in Arduino IDE:
    Code:
    Sketch uses 3200 bytes (9%) of program storage space. Maximum is 32256 bytes.
    Global variables use 73 bytes (2%) of dynamic memory, leaving 2487 bytes for local variables. Maximum is 2560 bytes.
    /home/ryan/ryan_stuff/projects/microprocessing/arduino-1.8.12/hardware/teensy/../tools/teensy_post_compile -file=test_serial.ino -path=/tmp/arduino_build_274178 -tools=/home/ryan/ryan_stuff/projects/microprocessing/arduino-1.8.12/hardware/teensy/../tools -board=TEENSY2 -reboot -port=/dev/ttyS4 -portlabel=/dev/ttyS4 -portprotocol=serial 
    An error occurred while uploading the sketch
    This is all with the Teensy 2.0 and new USB cable.

    Also, what exactly is meant by "leaving another serial monitor on and connecting it to the Teensy"? I have closed all serial monitor windows and `ps aux | grep teensy_serialmon` shows nothing. But is there possibly another way a serial monitor could be on?
    Last edited by r.schuster3; 03-13-2020 at 04:37 PM. Reason: Extra question

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,473
    This line from lsusb means Teensy is connected.

    Code:
    Bus 001 Device 011: ID 16c0:0483
    That means your Teensy and your USB cable are working properly! 16c0:0483 is the proper ID for Teensy running in USB serial mode.

    Something is probably wrong with your machine's setup.

    What do you see from this command?

    Code:
    cat /etc/udev/rules.d/49-teensy.rules

  12. #12
    Junior Member
    Join Date
    Feb 2020
    Posts
    7
    Quote Originally Posted by PaulStoffregen View Post
    This line from lsusb means Teensy is connected.

    Code:
    Bus 001 Device 011: ID 16c0:0483
    That means your Teensy and your USB cable are working properly! 16c0:0483 is the proper ID for Teensy running in USB serial mode.

    Something is probably wrong with your machine's setup.

    What do you see from this command?

    Code:
    cat /etc/udev/rules.d/49-teensy.rules
    That gives me;
    Code:
    # 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", ENV{ID_MM_PORT_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.
    #
    # ModemManager tends to interfere with USB Serial devices like Teensy.
    # Problems manifest as the Arduino Serial Monitor missing some incoming
    # data, and "Unable to open /dev/ttyACM0 for reboot request" when
    # uploading.  If you experience these problems, disable or remove
    # ModemManager from your system.  If you must use a modem, perhaps
    # try disabling the "MM_FILTER_RULE_TTY_ACM_INTERFACE" ModemManager
    # rule.  Changing ModemManager's filter policy from "strict" to "default"
    # may also help.  But if you don't use a modem, completely removing
    # the troublesome ModemManager is the most effective solution.

  13. #13
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,388
    i'm not sure if it's necessary or the right incantation, but have you tried sudo systemctl restart udev.service that restarts the udev service so it sees any changes to rules.d/

  14. #14
    Junior Member
    Join Date
    Feb 2020
    Posts
    7
    I tried it. No luck

  15. #15
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,388
    i'm having trouble understanding your IDE output
    /home/ryan/ryan_stuff/projects/microprocessing/arduino-1.8.12/hardware/teensy/../tools/teensy_post_compile -file=test_serial.ino -path=/tmp/arduino_build_274178 -tools=/home/ryan/ryan_stuff/projects/microprocessing/arduino-1.8.12/hardware/teensy/../tools -board=TEENSY2 -reboot -port=/dev/ttyS4 -portlabel=/dev/ttyS4 -portprotocol=serial

    why is it saying ttyS4 ??? i would expect ttyACM0 ??? what are you selecting in IDE Tools > Port ? my verbose load output shows

    /home/linux/arduino-1.8.11/hardware/teensy/../tools/teensy_post_compile -file=sketch_mar16a.ino -path=/tmp/arduino_build_954583 -tools=/home/linux/arduino-1.8.11/hardware/teensy/../tools -board=TEENSY2 -reboot -port=/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.4 -portlabel=/dev/ttyACM0 Serial -portprotocol=Teensy

    can you attach a photo of your teensy 2 with cables attached?

  16. #16
    Junior Member
    Join Date
    Feb 2020
    Posts
    7
    My God, you sweet, sweet genius. I changed the port to `/dev/ttyACM0 Serial (Teensy2.0)` (it _was_ on `/dev/ttyS4`). Now I am seeing serial monitor output after upload! I still get that weird "An error occurred ..." line in Arudino IDE, but everything appears to be working regardless!

  17. #17
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,388
    Quote Originally Posted by r.schuster3 View Post
    I still get that weird "An error occurred ..." line in Arudino IDE, but everything appears to be working regardless!
    you might do a ps uax | grep tee and look for orphaned teensy tasks that might need to be killed, in particular teensy_ports -J2

Posting Permissions

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