Skip to main content
Graduate II
August 19, 2024
Question

Read data in device sent by host over USB HID

  • August 19, 2024
  • 1 reply
  • 839 views

In an STM32CubeIDE USB HID project for an STM32F103C8 board I can send data from the device to the host using the USBD_HID_SendReport() function, like so:

USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t*)&hid_report,sizeof(hid_report));

How can I read data in the device sent over USB HID by the host?

In particular, I'd like to send arbitrary data (say, 1024 bytes) from the host using something like hid_write() from libusb's hidapi and then read it in the STM32 device.
How can I do that?

    This topic has been closed for replies.

    1 reply

    Graduate II
    August 20, 2024

    Anyone?