AnsweredAssumed Answered

HID device SetReport gets zero bytes when host sends 65 bytes

Question asked by S S on Mar 28, 2019
Latest reply on Apr 4, 2019 by Felipe García

Hi,

We have a small HID host program written in Python.  At the host end, we can get Feature report from the device.  However, when the host sends a feature report using setReport, at our device SetReport gets executed (we hit a  breakpoint in our SetReport handler) but length it receives  is ‘0’. AT the host side, we are sending 65 buffer including Report ID.

static ErrorCode_t HID_SetReport(USBD_HANDLE_T hHid, USB_SETUP_PACKET *pSetup, uint8_t * *pBuffer, uint16_t length)

{

         uint8_t j =0;

         uint16_t i = 0;

         uint8_t buf[10];

                /* we will reuse standard EP0Buf */

                if (length == 0) {

                                return LPC_OK;

                }

Since length is zero , it return LPC_OK

Any ideas?

Thanks

Outcomes