Teensy USB Vendor and Product ID

I'm writing a shell script to setup udev rules so that my Teensy4.1 shows up under `/dev/Teensy_%n` (where %n increments if more than one is connected). I found this link that lists the product and vendor ids we should expect but when I run lsusb on my linux machine or look under the usb tree on my mac, I find that the product ID is different. The link says it whould be `0478` but both of my systems find it as `0483`. Is this something that changes based on the model of Teensy I'm using or has the productID changed since that page was last updated?

What I have currently works for the Teensy4.1's I have on hand but I am hoping for the udev rules to apply for any model of Teensy that I connect.

My current udev rule:
Code:
SUBSYSTEM=="tty", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0483", ACTION=="add|change", SYMLINK+="Teensy_%n

From my linux machine:
1709057963898.png


From my mac:
1709057992189.png
 
PID 0478 is Teensy in bootloader mode.

That mode uses HID protocol, not serial, so it should not be detected by the Linux cdc-acm driver, nor would it appear as a tty device due to any other driver. Normally on modern Linux systems, it would be detected by the hidraw driver.

To answer your question about PID changes, yes, Teensy can use many different PIDs. When using Arduino IDE, click the Tools > USB Type menu. Those many different USB types Teensy can implement use different PID.

I'm sure you already know about the PJRC published udev rules, but here's a link just in case:


You might want to incorporate some of that into your custom udev rule, if you intend to use it on a variety of Linux systems. In particular, the ID_MM_DEVICE_IGNORE and ID_MM_PORT_IGNORE stuff (usually) keeps the troublesome ModemManager on most distros from causing all sorts of annoying problems.
 
Back
Top