AnsweredAssumed Answered

Getting HID Input report -  WriteEP Vs GetReport?

Question asked by S S on Mar 20, 2019
Latest reply on Apr 15, 2019 by soledad


We are using a small Python program as HID host that communicates with our LPC4357 based HID device.

Inside the EP Handler, after reading, we are sending an input buffer. Example code

{input_report as well as output_report is allocated in the USB ram area)

case USB_EVT_OUT::

USBD_API->hw->ReadEP(hUsb, pHidCtrl->epout_adr, output_report);

//do some processing

USBD_API->hw->WriteEP(hUsb, pHidCtrl->epin_adr, input_report, 64);



Then in the GetReport Handler we have the following code


*pBuffer = input_report;

 *plength = 64;


Now at the host end, we are receiving input report due to getreport not due to WriteEP in the EP handler.  For example, even if we comment the WriteEP, the fetching input at the host end works, not the other way around.  What is the use of WriteEP ?  Does it depend on the host command whether the host receives Input sent via WriteEP Vs GetReport? In other words, maybe we are not using the right command to receive what WriteEP has sent?