Sending data to a HID device RRS feed

  • Question

  • I have been working on a HID application sending/receiving data from a microcontroller.

    Currently I am working on a function to send the data to the microcontroller.

    Send_result = SendHID_data(HIDfile, "Testing!");

    The HIDfile is a handle created using CreateFile function. It has successfully retrieved the VID and PID.

    BOOLEAN SendHID_data(HANDLE HIDfile, char *data)

        Buffer[0] = '0';
        memcpy(&Buffer[1], data, 8);
        return(HidD_SetOutputReport(HIDfile, (PVOID)Buffer[0], 9));

    Buffer is a global char array.

    While testing with USBanalyzer there appears to be no "outgoing" data on the selected USB VID, PID and the

    return value of the new function is zero as expected. Any ideas ?

    Randy Seedle

    Thursday, February 1, 2018 8:38 PM

All replies