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

HID CONTROL TRANSFERS

Something curious is happening with my USB HID device.

It is a Full-speed Device. The curious thing is that my VB software transfers 64 bytes of data (EP0 CONTROL TRANSFER) to the device only one time each 05 SOF signals of the USB line. So, instead of 64 KB/s I am only having 64/5 Kb/s data transfer rate.

I have even set my VB software to run in High priority mode - So it has nothing to do with Windows priorities.

Would anyone have a clue how I can increase the data transfer rate ?

Parents
  • Yes It really worked !!!

    Everything is fine. I am finding a problem in the READFILE function, though.
    I think you´ll know the answer.

    Supose the device sends an IN PACKET. If I run the ReadFile function AFTER the packet has arrived to the Host, the function gets back with the correct result.

    In the other hand, if I make a loop for the readffile function to detect the arrival of a packet, it never finds it the loop goes on forever.

    How can I make the readFile function detect the packet while in the loop ?

    Please find below the loop I am using in VB6

    While (NumberOfBytesRead < 64) recv_buf(0) = 1 result = ReadFile(ReadHandle, recv_buf(0),
    CLng(Capabilities.InputReportByteLength), NumberOfBytesRead, HIDOverlapped) DoEvents
    Wend

    Thanks

    Antonio

Reply
  • Yes It really worked !!!

    Everything is fine. I am finding a problem in the READFILE function, though.
    I think you´ll know the answer.

    Supose the device sends an IN PACKET. If I run the ReadFile function AFTER the packet has arrived to the Host, the function gets back with the correct result.

    In the other hand, if I make a loop for the readffile function to detect the arrival of a packet, it never finds it the loop goes on forever.

    How can I make the readFile function detect the packet while in the loop ?

    Please find below the loop I am using in VB6

    While (NumberOfBytesRead < 64) recv_buf(0) = 1 result = ReadFile(ReadHandle, recv_buf(0),
    CLng(Capabilities.InputReportByteLength), NumberOfBytesRead, HIDOverlapped) DoEvents
    Wend

    Thanks

    Antonio

Children