We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Thanks in Advance. I am using keil HID example and win-api to make a usb hid device for sending and receiving data using interrupt transfer. I define the package size as 64 bytes, and of cause if the data sended by the device less than 64 bytes, the host(Overlapped mode) will come up with a timeout error. And I do search in the forum, everybody says I should send a ZLP(zero length package), but I could not find any detail about what ZLP real is, and how to send a ZLP by the device or by the host. So I will appreciate if anybody tell me what can I do. Forgive my fool. Thanks again.
"if the data sended by the device less than 64 bytes, the host(Overlapped mode) will come up with a timeout error."
Sounds like you already send a short packet.
http://www.keil.com/forum/13037/ Tsuneo Chinzei, 20-Aug-2008 21:05 GMT For Input report over the interrupt IN endpoint, ZLP is attached to the transfer when the transfer size is just the multiple of wMaxPacketSize ( usually 64 for FS ), to show the end of transfer. That is, ZLP is attached as the short packet at the end of transfer. On other transfer size, ZLP is not required, because it is terminated by short packet.
John, thank you very much.I think I have understand what you mining. In fact, I have mix up the Hid and the vendor device. Sorry to border you. Thanks again.