USBHost_t36 - Interface to COMPOSITE HID device

I am trying to use USBHost_t36 to gather data from a DeFelsko coating thickness gage instrument. The coating instrument is configured as a composite HID USB device. I can plug it into a computer and hold the sensor to a metal surface and it sends the coating thickness out over the USB. I typically open a scratch buffer in Notepad++ and see the readings appear as if they had been typed on a keyboard.

Efforts to do the same with a Teensy 4.1 using USBHost_t36 have not been successful. I am using the "Examples/Digitizer" example from the github and I can connect a logitech keyboard and receive keystrokes. I can also connect a logitech mouse and see movements and button clicks using USBHost_t36. If I connect the coating thickness device the Teensy will announce when the device is connected or disconnected but there is no output generated when the instrument transmits readings. Here is the output when I connect the instrument, trigger several readings and then disconnect the instrument.

*** Device HID1 15cd:22 - connected ***<LF>
manufacturer: DeFelsko<LF>
product: PosiTector<LF>
Serial: 875555<LF>
*** Device HID1 - disconnected ***<LF>

added the code shown
below to the example to determine if there were differences between how the Logitech keyboard was handled and how
the Defelsko keyboard is handled.

if(hid1) {Serial.print("hid1 is active - "); delay(500);}
if(keyboard1) {Serial.print("keyboard1 is active - "); delay(500);}
if(keyboard2) {Serial.print("keyboard2 is active - "); delay(500);}
//if(mouse1) {Serial.print("mouse1 is active - "); delay(500);}
if(joystick1) {Serial.print("joystick1 is active - "); delay(500);}
if(rawhid1) {Serial.print("rawhid1 is active - "); delay(500);}
if(rawhid2) {Serial.print("rawhid2 is active - "); delay(500);}

Then I repeated the earlier experiments. Here is the output for the Logitech K120:

SMS-Defelsko USB 2022-06-19 3
hid1 is active - keyboard1 is active -
*** Device KB1 46d:c31c - connected ***<LF>
manufacturer: Logitech<LF>
product: USB Keyboard<LF>
*** Device HID1 46d:c31c - connected ***<LF>
manufacturer: Logitech<LF>
product: USB Keyboard<LF>
hid1 is active - keyboard1 is active -
hid1 is active - keyboard1 is active -
hid1 is active - keyboard1 is active -
key 'x' 120 MOD: 0 OEM: 1B LEDS: 0<CR><LF>
hid1 is active - k
ey 'x' 120 MOD: 0 OEM: 1B LEDS: 0<CR><LF>
keyboard1 is active - hid1 is active -
*** Device KB1 - disconnected ***<LF>
*** Device HID1 - disconnected ***<LF>

Below is the resulting output when connecting the Defelsko.

hid1 is active - *** Device HID1 15cd:22 - connected ***<LF>
manufacturer: DeFelsko<LF>
product: PosiTector<LF>
Serial: 875555<LF>
hid1 is active -
hid1 is active -
hid1 is active -
*** Device HID1 - disconnected ***<LF>

So, the instrument is recognized as an HID device, but it is not recognized as either a keyboard or a mouse. Again, the manufacturer tells me that this is a composite HID device.

I hope to start digging through the USBHost_t36 source soon. But perhaps someone can offer an alternative example or a fix that will allow the use of the example code to receive the messages from the instrument.

Thanks for any help or assistance.
 
As a start you can try running the HIDDeviceInfo example sketch. It will provide you with the HID descriptors that the device puts out as well other info about device.
 
Back
Top