An easy way to get Serial with HID?

Status
Not open for further replies.

jwatte

Well-known member
Because the Linux USB serial driver keeps wedging on high data amounts, I'm using HID to send/receive data to the Teensy. This is not wedging, so yay!
But, I'd like to also use the serial port for smaller debug data type stuff.
Is there an easy way to get HID + Serial on the Teensy 3.2? The default project settings don't have an option like that, but perhaps there's some simple config file change that will enable this?
 
You could try editing usb_desc.h. See the comments in that file for instructions.

What specifically does "wedging" mean?
 
Wedging typically means stopping reading/writing data, or being very intermittent about how much it reads/writes.

As I increase throughput on USB serial on Linux, I end up running into this. It's been happening for years, with more than one kind of device (for example, LUFA on ATMega32u4, as well as Teensy 3, as well as OpenCM 9.04 which is a STM ARM.) And it's happened with several different code bases, that just open the device, and makes it raw using <termios.h>

It may, of course, be something I'm doing wrong on the Linux side, in several different code bases, against several different devices. Perhaps something about flow control? Never been able to figure it out.
I also don't have a good setup to do USB bus analysis at the electrical/packet level; maybe that would let me see what's going on. (Is there a plugin for Saleae that does this?)
But I don't get that problem using HID (or, for LUFA, raw bulk,) so I just use that!
 
Is there a plugin for Saleae that does this?!

Yes there is (look for USB LS and FS in 'More Analyzers'). Unfortunately it is a bit unstable and often detects error packets if they are perfectly ok. But it is definitely better than nothing.

Trace 6/7
usb.jpg
 
Which pins do you hook up the Logic Analyzer to for these pin... Obviously seeing some USB information for the USB host code might be beneficial.
 
Obviously seeing some USB information for the USB host code might be beneficial.
Yes, it definitely is! I'm currently programming the MAX3241 on a USB Host shield and I felt somehow blind before I found that the Saleae has that analyzer :)) Just connect it to D+ and D-.
 
Last edited:
Status
Not open for further replies.
Back
Top