Raw USB Serial

Status
Not open for further replies.

recri

Active member
I built a Teensy USB MIDI project years ago for interfacing a morse code key to a PC, it works great, but some people just can't figure out MIDI.

It turns out that there is another way to interface a morse code key to a PC over a serial port. It toggles CTS and DSR in one direction and RTS in the other. I've got a working example on my desk using a USB<->Serial converter connecting to a morse code program running in Wine on my Ubuntu laptop. It would be neat if I could extend the morse MIDI interface widget to support the morse Serial interface as a second option.

I've looked through the Teensy USB Serial code but I haven't found any sign of the full set of RS232 control signals. Is there any way to get at these signals in a Teensy implementation of USB Serial?
 
It looks like there is a notification defined in the CDC documentation for SERIAL_STATE which is intended to communicate UART bits, though it doesn't list CTS among the mapped UART signals. Sending a notification to the host appears to require setting up a notification specific interrupt endpoint in the usb serial interface, the management endpoint is receive only on the Teensy. And implementing additional capabilities would require fiddling with capability bits in the interface descriptor.

I'm confused by the status of CTS. I've got two programs that can see CTS changing state on /dev/ttyUSB0, and both programs call out the signal by that specific name, but the USB standard never mentions that signal by name. It must be defined in the FTDI drivers somewhere.

Oh, that's interesting, the FTDI chip is a vendor class device, it has no management endpoints at all, it's just bulk data endpoints, the UART bits must be free riding somewhere in the data protocol.
 
Status
Not open for further replies.
Back
Top