cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 USB hid host - non boot protocol

luc_besson
Associate
Posted on September 17, 2013 at 00:48

Dear All,

Although this is my first post here, I am quite often reading my.st.com forum, when I need to find solution for my problems.

Unfortunatley, this time I could not find the answer in existing threads for above problem:

I am trying to implement independent controller for multiaxis joystick. The plan is that stm32f4 will act as a ''bridge'' between USB hid and CAN bus.

My setup is as in the picture:

http://sdey7tkk.home.pl/kreator/data/documents/setup.jpg

I have run mouse and keyboard hid host based on provided by stm examples without any problems. The problem is that library support only boot protocol as I understand, so only mouse- and keyboards-like devices. My multi-axis controller is non boot protocol device.

System is initializing ok, device is also recognized and enumerated, results received via uart terminal are as follow:

System Initializing... Done! System Ready Device Attached > Low speed device detected VID : 046Dh PID : C626h > HID device connected Manufacturer : 3Dconnexion Product : SpaceNavigator Serial Number : N/A Enumeration done! USBH_USR_UserInput! Device is not supported!

Last message is sent by stm32 after not passing above condition in usbh_hid_core.c src file:

''(...) if(pphost->device_prop.Itf_Desc[0].bInterfaceSubClass == HID_BOOT_CODE) { (...) } else {pphost->usr_cb->DeviceNotSupported();}''

Connected Axis controller is not boot protocol device - it is report protocol device. Its interfece descriptor is stated above:

http://sdey7tkk.home.pl/kreator/data/documents/Urz=C4=85dzenie=20USB=20interfejsu=20HID3d.html

As in report descriptor: data are being sent in 3 reports:

Report ID 01: 3x16 bit values of linear movements (X, Y, Z)

Report ID 02: 3x16 bit values of rotational movements (Rx, Ry, Rz)

Report ID 03: 1x8 bit value byte buttons state (Button)

Report ID 04: 1x8 bit value LED state report send to the device

Report IDs 05-11 are never sent in this version of usb device.

For better visualisation, below is a screen from USB sniffer application:

http://sdey7tkk.home.pl/kreator/data/documents/3d=2002.jpg

Has anyone experience or know how to receive data sent by usb hid non boot protocol device with several report ids?

I think not only me is interested in other than boot protocol hid devices implentation on stm32f4.

Best regards and thanks in advance for your help!

1 REPLY 1
Hobbyist
Associate II

Are you to solve the problem of reading full speed USB joystick using stm32 host library? If yes, provide me help,?