Andy,
This problem occurs if USB length % 8 = 4. If the USB packet length satisfies this test, then the USB packet is broken up in to 2 USB packets where the 1st is the length/2-1 and second is length-(length/2-1). These 2 packets will be sent instead of the original packet. This ensures that neither USB packet will satisfy the condition.
I handled it at the lower levels of my host code like this (java):
ArrayList<ByteArray> dataList = new ArrayList<>();
if((data.getIndex() % == 4)
{
byte[] halfData = data.readArrayBytes();
int ba1_size = (halfData.length / 2) - 1;
int ba2_size = halfData.length - ba1_size;
ByteArray ba1 = new ByteArray(ba1_size, ENDIAN.BIG);
System.arraycopy(halfData, 0, ba1.getBytes(), 0, ba1_size);
ba1.setIndex(ba1_size);
ByteArray ba2 = new ByteArray(ba2_size, ENDIAN.BIG);
System.arraycopy(halfData, ba1_size, ba2.getBytes(), 0, ba2_size);
ba2.setIndex(ba2_size);
dataList.add(ba1);
dataList.add(ba2);
}
else
{
dataList.add(data);
}
Hope this helps.
Sam...