ttyACM ports missing with teensy arduino on Ubuntu

So, I was reverifying my teensyduino MRF24J40 code recently, and ran into a most infuriating problem, where the /dev/ttyACMXXX devices simply didn’t exist! I could upload code to the teensy via the arduino GUI, and teensy-halfkay could see the device ok, but lsusb didn’t show the device. Weird.

I found lots of stupid terrible advice around the internet, including such insanity as “mknod blah” to simply create the devices, and even such batshit crazy suggestions like updating the rxtx jars that arduino uses. No, no, no.

I still don’t realllly know what’s going on, but someone hinted that because my device might be flooding data out the “serial” (USB CDC ACM serial) port from the instant it’s connected, the linux detection might be getting confused.

Well, I could still program the device ok, somehow, so I tried simply programming the basic teensyduino blink demo. That worked, and it started blinking, and presto, ttyACM0 got created!

NOW I could reprogram with my own mrf24j40 demo code, and I could watch the output on ttyACM0 as expected. Good news.

Except, if I unplug the device, and plug it in again, ttyACM is gone, and doesn’t come back until I reprogram with something else.

Something’s clearly broken, and it happened recently, and I’m grumpy, but at least I have a terrible workaround :(

  1. Usually Teensyduino just needs the Tools > USB Type menu to be set to “Serial” for Teensy to appear as a /dev/ttyACM0 device on Linux. It’s important to remember that Teensy doesn’t actually become a serial device until it starts running code built with that option.

    This is very different than Arduino, which is always a serial device, and always remains the same from the moment you plug it in, no matter what code you load. With Teensy, your PC actually sees the device “unplug” and reconnect as a different device every time you reprogram it.

    I believe we exchanged several emails about this specific problem and ultimately it looked like there’s some strange or corrupt USB communication going on here. The kernel is taking 10+ seconds to detect devices, and other strangeness slowness is happening.

    Since someone just sent me a link to this page, I wanted to post a quick followup for anyone who gets here via google or other searches. If you’re used to Arduino, where a serial port is always present, Teensy is very different. The Tools > USB Type controls what type of device Teensy will become when your code runs.

  2. Yep, that’s me. Sorry, I really should have come back here and updated this post. Paul’s right, something is broken on my system. It used to work flawlessly, and something odd happened that neither of us have been able to work out yet.

    So, yeah, anyone reading _this_ post, should treat it the same way _I_ treated advice like “mknod /dev/ttyACM0”

    ie, with a large grain of salt!

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>