This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

No HID interrupt IN transfers

Hi
iÂ'm using the MCB2300 Board, with HID usb example.
But this example send continually reports to host, i would like send data to host only when the host call a readfile ,what i do???

Parents
  • > i would like send data to host only when the host call a readfile ,what i do???

    You can't.
    ReadFile() on a PC app accesses just to an input buffer on the HID device driver. It doesn't read from your HID device directly. So, the action caused by ReadFile() is not passed to the device.

    To do similar operation, you have to notify the request directly from the PC app to the device.
    Send an ouput report from your PC app, first.
    When the device receives the output report, the device fills the IN endpoint with an input report.
    This input report is sent to HID device driver, and held in the input buffer, automatically.
    And then, your PC app read the input report from the HID device driver.

    You may have interest on the discussion on this link.

    No HID interrupt IN transfers
    http://www.keil.com/forum/docs/thread15613.asp

    Tsuneo

Reply
  • > i would like send data to host only when the host call a readfile ,what i do???

    You can't.
    ReadFile() on a PC app accesses just to an input buffer on the HID device driver. It doesn't read from your HID device directly. So, the action caused by ReadFile() is not passed to the device.

    To do similar operation, you have to notify the request directly from the PC app to the device.
    Send an ouput report from your PC app, first.
    When the device receives the output report, the device fills the IN endpoint with an input report.
    This input report is sent to HID device driver, and held in the input buffer, automatically.
    And then, your PC app read the input report from the HID device driver.

    You may have interest on the discussion on this link.

    No HID interrupt IN transfers
    http://www.keil.com/forum/docs/thread15613.asp

    Tsuneo

Children
  • Tsuneo,

    I did this steps:

    Send an ouput report from your PC app, first.
    When the device receives the output report, the device fills the IN endpoint with an input report.
    This input report is sent to HID device driver, and held in the input buffer, automatically.
    And then, your PC app read the input report from the HID device driver.

    But when i call the readFile from pc host, the app hold , and donÂ't work anymore, only reseting the mcb board.

    what happened?