PORTS Forum

Ports and Interfaces => USB => Topic started by: lcpoon on November 27, 2014, 03:39:45 am

Title: HID lost data
Post by: lcpoon on November 27, 2014, 03:39:45 am
I am using "generichid_vb" to communicate with my device. FYI, my device always returns data whenever I send data to it.

If I send data to it and then purposely closed the VB app. When I re-opened the VB app and try to read data from it, the data is no longer there. I did try to comment out "MyHid.FlushQueue(hidHandle)" but the problem is still there.

With the VB app opened forever, I have no problem to send and to read data, even with a long delay in betweem send and read commands.

I suspected that the VB app kills all the pending queue when I launched it, please advise.

Title: Re: HID lost data
Post by: Tsuneo on November 28, 2014, 08:25:20 am
Quote
I suspected that the VB app kills all the pending queue when I launched it

it’s the feature of Windows HID driver.
When a PC application opens the HID driver, the driver assigns brand-new input buffer to the handle.

Tsuneo