Google Pixel C (VID=18d1 and PID=5203) supports USB3.0 USB device mode, hence it supports MTP over USB 3.0.
However, using the latest git version libmtp, a 500-byte data copy from device will fail. Attached full debug of mtp-getfile.
It seems like the ptp_usb_getdata() in libusb1-glue.c does not take Superspeed into account. It is still using PTP_USB_BULK_HS_MAX_PACKET_LEN_READ in some if statements for zero reads. The max packet length is 1024 in Superspeed so this could be where this error come from.
If I added the following code in front of ptp_usb_getdata() in libusb1-glue.c:
and then replace all occurrences of PTP_USB_BULK_HS_MAX_PACKET_LEN_READ in that function with MAX_READ, then the 500-byte file copy will work.
I haven't done many tests so far with this fix yet. But I think this is a bug so filing this ticket for tracking.
Thanks.
Anonymous
hmm, we should use the maximum packetsize we already use in getpacket.
can you try attached patch?
Sorry for late reply. I haven't logged in since then :P
I saw you have merged the fix in libopenusb1-glue.c which takes ptp_usb->inep_maxpacket.
Tried with libmtp 1.1.10 and it works. Thanks.