Flaco from France

New user? Tell us about yourself!
flaco
Posts: 4
Joined: Sat Oct 16, 2021 10:30 pm

Re: Flaco from France

Post by flaco »

arkadiusz.makarenko wrote: Wed Oct 27, 2021 9:30 pm Did you use ST HAL USB Host stack by any chance or some 3rd party usb stacks?
ST HAL. Never tried others.
I remember I had to tweak the HID classes however : many mouse and keyboard did not work, and they support only boot modes. Also they contain a lot on non-finished code for data report parsing, which make copies of copies of the report data. I chose to remove most of that bloat and make my own.
Another challenge was sending messages to the devices : I guess it was that the send functions were not integrated inside the state machines, which prevented the messages from being sent correctly most of the times.
And maybe another thing : to correctly receive the modifier key events from some keyboards, I had to place them in some kind of polling mode (by default they send their reports only on key press/release, but these keyboards did not for modifier keys!)
User avatar
arkadiusz.makarenko
Moderator Team
Moderator Team
Posts: 1208
Joined: Wed Jun 19, 2019 7:36 am
Location: Edinburgh

Re: Flaco from France

Post by arkadiusz.makarenko »

flaco wrote: Wed Oct 27, 2021 10:18 pm
arkadiusz.makarenko wrote: Wed Oct 27, 2021 9:30 pm Did you use ST HAL USB Host stack by any chance or some 3rd party usb stacks?
ST HAL. Never tried others.
I remember I had to tweak the HID classes however : many mouse and keyboard did not work, and they support only boot modes. Also they contain a lot on non-finished code for data report parsing, which make copies of copies of the report data. I chose to remove most of that bloat and make my own.
Another challenge was sending messages to the devices : I guess it was that the send functions were not integrated inside the state machines, which prevented the messages from being sent correctly most of the times.
And maybe another thing : to correctly receive the modifier key events from some keyboards, I had to place them in some kind of polling mode (by default they send their reports only on key press/release, but these keyboards did not for modifier keys!)
I have noticed that stm32f105 and stm32f107 usb stack is buggy as well, it gets much better on f4 and f7. Many devices which I couldn't even read descriptors on f1 work fine on f4/f7. Other limitation was that usb stack only reads one first interface on each device, so if you have combo device keyboard +mouse only keyboard would be recognised. LL libraries are complete, but HAL methods were hardcoded. Their code actually looks like example code which you need to heavly modify to own use.
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
Post Reply

Return to “INTRODUCE YOURSELF”