I believe that LibUsb.freeTransfer is used to release the memory associated with the transfer structure when you're finally finished transferring data.
When you're using the bulk transfer interface, you're specifying a timeout for the device to fill the transfer buffer that you provided with data and return the transfer buffer back to you via the callback. That timeout period is being exceeded before the buffer is being filled, and this could be for various reasons. Two possibilities come to mind: a)the device simply doesn't have more data to send, or b) you may not be invoking LibUsb.handleEvents (sufficiently/repeatedly) in time for the transfer buffer(s) to be filled.
I'm not aware (but I'm not an expert either) of a 'clearPipes' option when you encounter the timeout. In my software, I normally stop/start (ie restart) the device when I encounter an error like this, but that may be a heavy-handed approach for you.
How much data/how often are you expecting from the device? How many/size transfer buffers are you making available to the device? How are you managing the USB bus transfer processing, invoking the LibUsb.handleEvents() method call, is it via a dedicated thread or runnable?
Denny