Jan,
I am using a large portion of your generic_hid_cs_62 code to talk to a custom HID device. When I send an OUT packet to the HID the HID responds by preparing data to be read by the next IN packet. When I send the IN packet from the PC the HID responds immediately (it takes about 10mS for the HID to prepare the packet after receiving OUT packet) with the newly prepared packet. However, what I read as a response from that IN packet at the PC is an older packet (I use sequence numbers to keep track of what data belongs to what packet). I keep polling the HID and it keeps sending the correct packet, but the packet read by the PC software is an old packet, not the new one. Finally, after about 300mS the right packet shows up in the software. If I wait 300mS after the OUT packet to send the IN packet from the PC, I get the right packet back in the code. Any faster than that and I am reading old packets until about 300mS has elapsed, even though the right packet has come across the USB bus numerous times and long before that (I am watching the traffic with a bus analyzer).
I am perplexed as to why this might be happening. Any help would be greatly appreciated. I am grateful for the contribution you and your site have made to help me in my understanding of the USB protocol.
Warm Regards,
Tim