I have a problem with mtp's GetDeviceInfo. I am connecting some embedded device for which the MTP implemention is not yet ready, but it should respond to OpenSession and GetDeviceInfo. The problem I have is that I get request for only 64 bytes from libmtp. This is the max packet size as the device is Full Speed device. It responds correctly if I send request with libusb (e.g. I request 100 bytes it is able to send 100 bytes in two usb packets). But with libmtp I get only one request for 64 bytes with GetDeviceInfo. The exchange looks like this:
- first I get OpenSession request - the response is 12 bytes long - it fits the 64 maxPacketSize - it is sent OK
- then I get GetDeviceInfo request - the response is 72 bytes (I created small PTP structure) or few hundered bytes for MTP device info - both exceeding maximum packet size for USB - so I would expect that after reading first packet (64 bytes) I get another request from host for 64 bytes of data - but I do not, instead libmtp seems to parse incomplete data and I get:
- LIBMTP LIBMTP_Open_Raw_Device_Uncached[1905]: LIBMTP PANIC: Unable to read device information on device 119 on bus 1, trying to continue
So the problem seems to be that libmtp expects to get response in a single packet - is this correct? If I had HS device the response would fit into single packet but for FS device it does not.
I can do more tests of the FS device configuration if you need, just tell me what kind of test would be helpful.
P.S. I don't know who should be the owner of this ticket so please adjust this according to the needs.
Anonymous