2023-10-26 12:54 PM
I am trying to use the usb COMPOSITE library. (AL94.I-Cube-USBD-COMPOSITE.1.0.3)
Followed the instruction How to generate the code from MXcude for USB CDC and USB HID.
the code compile successfully. and I can see those devices when I attach my NUCLEO bord to the computer.
But I could not find any documentation how to send information to the CDC or receive.
also for the HID Keyboard.
where can I find information how to use this library?
To receive and send information for both devices.
2023-10-26 01:02 PM
I tried : USBD_HID_Keybaord_SendReport (&hUsbDevice,buffer,8);
but I didn't receive anything on the computer. I assume I need to specify the interface number, or the end point number.
2023-11-02 09:23 AM
Hello @Zariss and welcome to the Community :),
I think DualCore_Standalone example available in STM32F4 package can help you.
In fact, this example describes how to use USB device application based on the STM32F4xx multi core support feature integrating the Device Communication Class (CDC) and Human Interface (HID) in the same project.
Also, Composite CDC-HID example is available in the STM32CubeH7 MCU package.
So, you can get inspired from these examples to create USB Composite application with STM32F4.
I hope this help you!
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-11-06 09:57 AM
Thank you for your reply.
In the example Composite CDC-HID works fine with CDC and HID mouse.
but when I try to use it in HID keyboard. it does not work. When I send a key pressed to the computer. there is a message received by the computer. But it is not recognised as a keyboard. is it possible that it is a bug in the firmware?
2023-11-06 10:00 AM
I am using this function call:
statusReportSend=USBD_HID_SendReport (&hUsbDeviceFS,&keyBuffer[0],8);