Prev: NDIS6 NBL indication
Next: DTM and Vista x64 (v.6000)
From: Robert Marquardt on 3 Jan 2007 05:48 I lose reports on WinXP SP2. It has been verified that the reports are sentwith a hardware logger, but reading them in a thread loses reports occasionally. The reports are sent in chunks of about 10 from a low-speed HID device. Setting the number of input reports with HidD_SetNumInputBuffers to 128 does not help at all. Increasing the thread priority does not help either. I have two implementations of the reader thread in C and Delphi and both lose reports in the same manner. Running the C and the Delphi program in parallel shows that. So it is definitely the HID stack or the HID DLL losing reports.
From: Doron Holan [MS] on 4 Jan 2007 00:01 it is definitely not HID dll. are you posting multiple reads using overlapped i/o on the same handle or just one transfter at a time? -- Please do not send e-mail directly to this alias. this alias is for newsgroup purposes only. This posting is provided "AS IS" with no warranties, and confers no rights. "Robert Marquardt" <marquardt(a)codemercs.com> wrote in message news:eG5i9SyLHHA.4384(a)TK2MSFTNGP03.phx.gbl... >I lose reports on WinXP SP2. > It has been verified that the reports are sentwith a hardware logger, but > reading them in a thread loses reports occasionally. > The reports are sent in chunks of about 10 from a low-speed HID device. > Setting the number of input reports with HidD_SetNumInputBuffers to 128 > does not help at all. Increasing the thread priority does not help either. > I have two implementations of the reader thread in C and Delphi and both > lose reports in the same manner. Running the C and the Delphi program in > parallel shows that. So it is definitely the HID stack or the HID DLL > losing reports.
From: Robert Marquardt on 4 Jan 2007 03:29 Doron Holan [MS] wrote: > it is definitely not HID dll. are you posting multiple reads using > overlapped i/o on the same handle or just one transfter at a time? I have two implementations in C and Delphi. This is the Delphi read loop in the thread: if Device.ReadFileEx(Report[0], Device.Caps.InputReportByteLength, @DummyReadCompletion) then begin // wait for read to complete repeat SleepRet := SleepEx(Device.ThreadSleepTime, True); until Terminated or (SleepRet = WAIT_IO_COMPLETION); The C implementation is similar. Running the C and Delphi programs in parallel on the same device shows the same loss of reports so the data is lost in the HID.DLL or the HID drivers (it is a generic HID device). I also tested with a file handle not opened for overlapped IO and using simple ReadFile calls in a loop. There is no difference. All implementations lose reports. The loss is random. On some computers between 1 in 50 and 1 in 100 on others much less. Unfortunately the test computer for the device was the one losing almost no reports. On our current test setup the reports are sent in sequences of either 8 or 64 reports on a button press on the device. The device is low speed. There seems to be no difference in probability of loss if sending reports by pressing the button for 8 reports repeatedly or 64 reports at once. It cannot be a device bug, because the correct amount of reports are sent over the bus (verified with a hardware tracker).
From: Robert Marquardt on 4 Jan 2007 07:41 Doron Holan [MS] wrote: > it is definitely not HID dll. are you posting multiple reads using > overlapped i/o on the same handle or just one transfter at a time? The Windows drivers are innocent. We tested on Win 98 (OHCI and UHCI host controller), XP and Linux(!) and got the same result. The device is sending 8 reports (verified with Ellisys tracker) and once in a while one is lost. It can be any report of the sequence. This is really wierd!
From: Ray Trent on 4 Jan 2007 17:14
Sounds like a host controller bug/limitation. Wouldn't be the first one by any means. How fast are you sending those blobs of 8 packets? Does it make a difference whether the machine has an OHCI or UHCI USB controller? Robert Marquardt wrote: > Doron Holan [MS] wrote: > >> it is definitely not HID dll. are you posting multiple reads using >> overlapped i/o on the same handle or just one transfter at a time? > > The Windows drivers are innocent. We tested on Win 98 (OHCI and UHCI > host controller), XP and Linux(!) and got the same result. The device is > sending 8 reports (verified with Ellisys tracker) and once in a while > one is lost. It can be any report of the sequence. > > This is really wierd! -- Ray |