Teensy - DIY USB Protocol Analyzer, Packet modifier, USB wrapper, USB over LAN
Derzeit nur auf Englisch!
This page is under construction!
The Teensy is a wonderful small device with a lot of power and USB capability. See the official Website for more information.
I wrote a few programs to use the Teensy as dynamic USB device. The Teensy identifies itself as an USB device that is connected on another computer. All data is transferred through the Teensy. In this stage, its also possible to use the Teensy or the Raspberry Pi to analyze and modify the transmitted data and even send own data packets. The analyzer is more a spin off and a simple project. This page can be seen as educational information.
I wrote the program for the Teensy 2.0 and Teensy 3.2. There are two Teensy programs, one for Teensy 2.0 and one for Teensy 3.2. I had some data loss with the Teensy 2.0 and so I rewrote the whole program for the Teensy 3.2, which has a different processor architecture and more features. But later, I figured out, that the data loss came from the Raspberry Pi.
Meanwhile I prefer the Teensy 3.2, because it has more RAM, more I/O ports, a faster CPU and is easier to buy. The Teensy 2.0 seems to be sold out the most times.
The source codes of the programs are currently ugly and I have to clean up the code before I release it. But they work well and can be used as base for other projects. I tested them with various hardware. I tested it with USB gamepads/controllers and other HID devices. Mass storage devices should work too, but I test them later.
The programs are written in C and C++.
TODO: SOLDERING INSTRUCTIONS, MORE IMAGES
You can connect the Teensy with a with the USB Serial Converter to any computer which has the source USB device connected. I bought a USB to TTL-converter-module with builtin CP2102 which is compatible to the Teensy 2.0 5V level. The connection with the Teensy 2.0 is simple. See the table.
|Teensy 2.0||USB Serial Converter|
|RX Pin D2||TX|
|TX Pin D3||RX|
The Teensy 3.2 and the Raspberry Pi have the same logic level. You can connect them directly without logic level converter.
|Teensy 3.0||Raspberry Pi|
|GND||Pin 6 - GND|
|Pin 0 - RX1||Pin 8 - UART TXD|
|Pin 1 - TX1||Pin 10 - UART RXD|
You can connect the Teensy with a with the USB Serial Cable to any computer which has the source USB device connected. I bought the COM-FOUR PL2303HX USB to TTL RS232 COM Cable-Module Converter 1 meter.
I used a second Teensy 3.2 to have more I/O pins and the second Teensy is used as USB Serial Device. Both Teensys are connected together with their Serial 1 port.
The Teensy will be flashed over USB with the Teensy Loader. There is a GUI and a CLI version available. I prefer the CLI version. See Teensy Loader CLI/GUI for more information.
© 2023 by