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

Thread: Teensy 4.1 no serial port when connected to Raspberry Pi 4

  1. #1
    Junior Member
    Join Date
    May 2020
    Location
    Victorville, CA
    Posts
    11

    Teensy 4.1 no serial port when connected to Raspberry Pi 4

    Hello,

    I've been playing around with a sketch using my mac, and everything has been working just fine. However, I needed to move the Teensy to another room to connect it to some hardware and figured I would just use a Pi to upload sketch changes to the Teensy 4.1.

    So I installed the 32 bit version of Raspberry Pi OS, did a sudo apt-get update / upgrade, then I installed Arduino IDE 1.8.19 from their website and made sure it worked. Then I followed the directions on this site to install the Teensy support using the 32 bit ARM version and as far as the software goes, everything seems to be working fine. The IDE runs and when I check a sketch, the Teensy uploader fires off and is running.

    My problem is that I cannot see any serial ports under /dev for the Teensy and none show up in the IDE (except for /dev/ttyAMA0 - but that port is there even when the Teensy is not plugged in).

    The USB cable is a proper 4 conductor cable that I was using on my Mac to program the Teensy, I just moved it over to the Pi when I moved the hardware.

    The power supply for the Pi is an aftermarket (but very popular and supported) power supply designed for the Pi 4.

    Under Tools, USB Type is just 'Serial' and there is an active sketch running on the Teensy.

    Any ideas why the USB port might not be showing up on the Pi?

    Edit: executing lsusb only shows this when the Pi is connected:

    Code:
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,563
    Maybe you kernel lacks the cdc_acm driver?

    Try watching the syslog messages as you plug and unplug the USB cable. On Ubuntu you would run "tail -f /var/log/syslog" in a terminal. The kernel should give info about what's happening. If the problem isn't obvious, copy all the syslog stuff here so we can see what you see on the screen.

  3. #3
    Junior Member
    Join Date
    May 2020
    Location
    Victorville, CA
    Posts
    11
    OK, I'll do that ... I was thinking maybe just installing Ubuntu might be a better option anyway.

    Is there a way to compile and upload sketches just using the terminal? It would be more convenient to just use SSH while working remotely like this.

  4. #4
    Junior Member
    Join Date
    May 2020
    Location
    Victorville, CA
    Posts
    11
    OK, I ran the tail command as you wrote it and nothing happens at all when I plug and unplug the Teensy... no updates on the screen and no added text to the syslog

    Here are the last few lines from the syslog ... I executed the command, then I went over there and unplugged then plugged in the Teensy - saw the lights light up after plugging it in etc. but as you can see ... nothing...

    Code:
    Jun 16 15:48:39 raspberry4 dbus-daemon[403]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.47' (uid=1000 pid=1111 comm="pipanel ")
    Jun 16 15:48:39 raspberry4 systemd[1]: Starting Hostname Service...
    Jun 16 15:48:39 raspberry4 dbus-daemon[403]: [system] Successfully activated service 'org.freedesktop.hostname1'
    Jun 16 15:48:39 raspberry4 systemd[1]: Started Hostname Service.
    Jun 16 15:48:41 raspberry4 dbus-daemon[652]: [session uid=1000 pid=652] Activating service name='ca.desrt.dconf' requested by ':1.22' (uid=1000 pid=1111 comm="pipanel ")
    Jun 16 15:48:41 raspberry4 dbus-daemon[652]: [session uid=1000 pid=652] Successfully activated service 'ca.desrt.dconf'
    Jun 16 15:48:44 raspberry4 PackageKit: refresh-cache transaction /13_dddcebea from uid 1000 finished with success after 7742ms
    Jun 16 15:48:49 raspberry4 PackageKit: get-updates transaction /14_caeaaaab from uid 1000 finished with success after 4715ms
    Jun 16 15:49:09 raspberry4 systemd[1]: systemd-hostnamed.service: Succeeded.
    Jun 16 15:58:55 raspberry4 systemd[1]: Started Session 4 of user michael.

  5. #5
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,771
    First thing I would do if I were you would be to try different USB cable... Maybe power only cable?

    It has been awhile since I tried out T4 with 32 bit raspi OS... I have been testing RPI4 with Ubuntu 22.04 64 bits and programming Teensy and that works.

    Maybe I will try to program the other T4 I have with latest Raspian.

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,563
    Quote Originally Posted by EasyGoing1 View Post
    and nothing happens at all when I plug and unplug the Teensy...
    Sounds like a charge-only USB cable with only 2 wires for power, no data wires at all.

  7. #7
    Junior Member
    Join Date
    May 2020
    Location
    Victorville, CA
    Posts
    11
    Quote Originally Posted by KurtE View Post
    First thing I would do if I were you would be to try different USB cable... Maybe power only cable?

    It has been awhile since I tried out T4 with 32 bit raspi OS... I have been testing RPI4 with Ubuntu 22.04 64 bits and programming Teensy and that works.

    Maybe I will try to program the other T4 I have with latest Raspian.

    It's definitely a 4 wire cable, because it is the same cable I was using to program the Teensy when using my Mac ... I merely transferred the cable with the Teensy into the other room.

    BUT, I installed Ubuntu 22.04 Desktop - 64 bit version onto the Pi ... I'll know soon if it will work or not.
    Last edited by EasyGoing1; 06-17-2022 at 01:51 AM.

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,563
    Download Teensyduino software matching the Linux software distro. It doesn't matter if the ARM processor on RPi4 could run 64 bit software. It matters what software you are actually running. If you installed a 32 bit system, then you need the 32 bit version, even if the CPU has capability for 64 bits.

    But no amount of software reinstall will solve a USB hardware problem. If the kernel isn't printing any syslog message, that's a sure sign the USB hardware isn't connected or working properly. Even just touching a 1.5K resistor from either USB data signal to 3.3V will cause the kernel to detect a hardware attach event. If you're getting no syslog messages at all when the hardware is plugged in, and the hardware does work when plugged into a normal PC, there's something wrong with the USB hardware connection.

    Just a very quick test, while watching syslog, plug in a USB mouse or keyboard or flash drive or other known good USB device. The kernel always prints a syslog message about detecting a new USB device, and whether it is low/full/high/super speed.

  9. #9
    Junior Member
    Join Date
    May 2020
    Location
    Victorville, CA
    Posts
    11
    Quote Originally Posted by PaulStoffregen View Post
    Download Teensyduino software matching the Linux software distro. It doesn't matter if the ARM processor on RPi4 could run 64 bit software. It matters what software you are actually running. If you installed a 32 bit system, then you need the 32 bit version, even if the CPU has capability for 64 bits.

    But no amount of software reinstall will solve a USB hardware problem. If the kernel isn't printing any syslog message, that's a sure sign the USB hardware isn't connected or working properly. Even just touching a 1.5K resistor from either USB data signal to 3.3V will cause the kernel to detect a hardware attach event. If you're getting no syslog messages at all when the hardware is plugged in, and the hardware does work when plugged into a normal PC, there's something wrong with the USB hardware connection.

    Just a very quick test, while watching syslog, plug in a USB mouse or keyboard or flash drive or other known good USB device. The kernel always prints a syslog message about detecting a new USB device, and whether it is low/full/high/super speed.
    Yeah, I went with the 64 bit Arduino IDE and the Linux Installer (AARCH64 / Jetson TX2) from your site (I didn't know that AARCH and ARM were essentially interchangeable terms).

    I still don't know what the problem was, but I managed to fix it.

    I ran tail again on the Pi (now running Ubuntu 22.03 64) and plugging it in and unplugging it did absolutely nothing, so wanting to make sure it wasn't something with the USB ports, I plugged another USB device and tail lit up like a Christmas tree ... so I took the cable and the Teensy back over to my Mac and plugged it in and same thing ... absolutely NOTHING ... SO, I held down the button for 15 seconds, and let it reset. Then I re-plugged it in to give a power cycle and it came up to where I was able to upload a sketch by hitting upload then hitting the button on the Teensy ... the sketch uploaded then the Teensy came back as a serial port again.

    Took it back over to the Pi and it's registering fine now with the IDE seeing it as a (Teensy) in the port selection.

    No idea what happened or how it happend, but I'm glad it's finally working.

    My last question is: Is there a way to compile then upload sketches to the Teensy using JUST Terminal - no GUI?

    Mike
    Last edited by EasyGoing1; 06-17-2022 at 05:24 AM.

  10. #10
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,563
    Quote Originally Posted by EasyGoing1 View Post
    Is there a way to compile then upload sketches to the Teensy using JUST Terminal - no GUI?
    Yes, there are several ways. Maybe better to start a new thread, rather than discussing this under "no serial port".

  11. #11
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,771
    Quote Originally Posted by EasyGoing1 View Post
    Took it back over to the Pi and it's registering fine now with the IDE seeing it as a (Teensy) in the port selection.

    No idea what happened or how it happend, but I'm glad it's finally working.

    My last question is: Is there a way to compile then upload sketches to the Teensy using JUST Terminal - no GUI?
    Glad it is working! I will probably still check to see if everything still works on the latest RPI release 32 bits... Programmed an SD card last night, will try later today.
    As I mentioned my other RPI4 has ubuntu 64 bit on it.

    As for doing it headless... As Paul mentioned, probably a different topic. But you might want to do a search as several including myself have done it in the past...

    You could look at the thread: https://forum.pjrc.com/threads/53548...Teensy-Support
    Although not sure if they have official builds yet for RPI?

    In the past I often would simply build it on my PC, copy the hex file to the RPI. And then use teensy_loader_cli to program the RPI. At one point I hacked up a Teensy install to allow it to SCP the hex file to my RPI, to a specific location on the RPI. I also had a simple script on RPI, that looked for an updated file in a directory and would automatically do the teensy_loader_cli.

    But again different topic.

Posting Permissions

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