Subject: lost bytes in USB interrupt transfer
To: None <>
List: tech-kern
Date: 02/18/2007 16:40:42
I've no idea whether this is in fact a problem with NetBSD's USB stack or rather a hardware problem or something else. However, I've also no idea how to track that down and am hoping that knowledgeable people here will be able to teach me how to do that.

I'm trying to communicate to a Mastergard A19 series UPS via USB. Thanks to extremly helpful people at Masterguard, I was able to find out that the protocol is rather simple. You issue a vendor specific write (bmRequestType UT_WRITE_VENDOR_ENDPOINT) to the control endpoint, bmRequest 0x0d, put the string you would send over the serial line in the data field and read back the response from endpoint 1.

However, about half of the time, the response is missing a few (one to four or five) characters at the front. As that is an interrupt transfer, I've no idea how that may happen. I never experience any other mangling of the response string.

That's on 4.0beta2. Any idea what's happening or how to debug it?
After all, it's not impossible that the problem lies within the UPS's USB module.