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
  • Just to add to the above post.

    If I us the createFile function without the FILE_FLAG_OVERLAPPED The readfile detects the in Packet without a problem.

    But I need to use the FILE_FLAG_OVERLAPPED because I need the function to return and not hang the thread until the packet arrives. what to do ?

    This one doesn´t work 'ReadHandle = CreateFile _ (DevicePathName, _ (GENERIC_READ Or GENERIC_WRITE), _ (FILE_SHARE_READ Or FILE_SHARE_WRITE), _ Security, _ OPEN_EXISTING, _ FILE_FLAG_OVERLAPPED, _ 0)

    This one works but the thread hangs untill the packet arrives 'O PACOTE F0 QUANDO O VB ESPERA EM LOOP ... ReadHandle = CreateFile _ (DevicePathName, _ (GENERIC_READ Or GENERIC_WRITE), _ (FILE_SHARE_READ Or FILE_SHARE_WRITE), _ Security, _ OPEN_EXISTING, _ 0, _ 0)

Reply
  • Just to add to the above post.

    If I us the createFile function without the FILE_FLAG_OVERLAPPED The readfile detects the in Packet without a problem.

    But I need to use the FILE_FLAG_OVERLAPPED because I need the function to return and not hang the thread until the packet arrives. what to do ?

    This one doesn´t work 'ReadHandle = CreateFile _ (DevicePathName, _ (GENERIC_READ Or GENERIC_WRITE), _ (FILE_SHARE_READ Or FILE_SHARE_WRITE), _ Security, _ OPEN_EXISTING, _ FILE_FLAG_OVERLAPPED, _ 0)

    This one works but the thread hangs untill the packet arrives 'O PACOTE F0 QUANDO O VB ESPERA EM LOOP ... ReadHandle = CreateFile _ (DevicePathName, _ (GENERIC_READ Or GENERIC_WRITE), _ (FILE_SHARE_READ Or FILE_SHARE_WRITE), _ Security, _ OPEN_EXISTING, _ 0, _ 0)

Children