2017-06-26 06:25 AM
This is my first experience with USB as virtual keyboard.
I have configured in CubeMX a Human Interface Device (HID). After that, to have someting written in my notepad I have written the following function:uint8_t USB_TX_Buffer[8];
USB_TX_Buffer[0]= 'H'; USB_TX_Buffer[1]= 'e'; USB_TX_Buffer[2]= 'l'; USB_TX_Buffer[3]= 'l'; USB_TX_Buffer[4]= 'o'; USB_TX_Buffer[5]= '\0'; USBD_HID_SendReport(hUsbDeviceFS, USB_TX_Buffer, 6); HAL_Delay(1000);But I obtain only the movement of the mouse! Can someone suggest me the right way?Solved! Go to Solution.
2017-06-27 07:21 AM
Now it is working perfectly!
I have only to understand how to manage the capital letters. The others are working perfectly!2017-06-27 03:17 AM
Hi
Gottardello.Deni
,You may find a HID example in the Cube firmware package relevant to the STM32 device you are using
, as in this folder : STM32Cube_FW_F4_V1.0\Projects\STM324xG_EVAL\Applications\USB_Host\HID_Standalone.
It is a typical application on how to use the STM32F4xx USB OTG Host peripheral to interact with an USB HID Device such as a Mouse or a Keyboard.
You can look on this ST prese
ntation labs described how to create the HID device with CubeMX:Hope this helps you.
Regards
Imen
2017-06-27 07:21 AM
Now it is working perfectly!
I have only to understand how to manage the capital letters. The others are working perfectly!