- How did the USB host calculate the polling time for a plug in device?
- Posted by Alex.Z on August 10th, 2007
I was devoloping driver for a USB HID keyboard device, using the USB
hid protocol, transfering data with a interrupt endpoint.
My computer had a USB 2.0 host, and the OS is WinXP. When the USB HID
keyboard was plugged in, the device driver would return 0x0a as
bInterval of the endpoint descriptor.
But the USB host send the ping packet every 4 ms, how did this polling
time come. And when I disable the EHCI, the USB host send the ping
packet every 8 ms, that is not the value what I expected.
How did the USB host calculate the polling time in a winxp system?
Thanks for your reply.
- Posted by Robert Marquardt on August 10th, 2007
Alex.Z wrote:
Most OSes use the next power of 2 for the polling interval so 8 msec is
quite normal. 4 msec is unusual.
BTW where is the problem? Even a low-speed microcontroller should be
able to answer without problems.
- Posted by Tim Roberts on August 18th, 2007
"Alex.Z" <zhouxl.zz@gmail.com> wrote:
What speed is the device? Your numbers don't match. An bInterval of 0x0a
should result in 0.5 second for a low/full speed device, and 64ms for a
high speed device.
Do you really mean a "ping" packet? Or do you mean an "IN" packet?
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
- Polling, Polling, Polling (networking questions) (Laptops/Notebooks) by none
- How to simulate a HID device plug-out and plug-in by code and API(or DDK)? (Drivers) by smtppop
- How to calculate the time Complexity? (Programming) by Alan Johnson
- SCSI device polling problem (Storage Devices) by Lil' Dave
- Tape Device Polling (Drivers) by Stephen Boettcher

