hanwen / go-mtpfs

Mount MTP devices over FUSE
Other
683 stars 85 forks source link

LIBUSB_ERROR_TIMEOUT on Samsung Galaxy S4 #125

Open wjhendr opened 7 years ago

wjhendr commented 7 years ago

I read through the other threads regarding this issue (e.g. https://github.com/hanwen/go-mtpfs/issues/33) but it is still not working for me.


$ /tmp/go/bin/go-mtpfs -usb-timeout=10000 -debug=mtp,usb,data /mnt

MTP request OpenSession [614...]
send: 0x10 bytes with ep 0x1:
0000: ...
MTP sendreq failed: LIBUSB_ERROR_TIME
OpenSession failed: LIBUSB_ERROR_TIMEOUT: attempting reset
USB: ReleaseInterface 0x0, err: <nil>
USB: Close, err: <nil>
USB: Open, err: <nil
USB: ClaimInterface 0x0, err: <nil>
MTP request OpenSession [870...]
send: 0x10 bytes with ep 0x1:
0000: ...
MTP sendreq failed: LIBUSB_ERROR_TIMEOUT
Configure failed: OpenSession after reset: LIBUSB_ERROR_TIMEOUT

$ mtp-detect
libmtp version: 1.1.9

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
    Found 1 device(s):
  Samsung: Galaxy models (MTP) (04e8:6860) @ bus 3, dev 118
Attempting to connect device(s)
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.

I have made sure the phone's screen is unlocked and that the media storage is using MTP (not Camera/PTP).

Fedora 20 64-bit libusb-0.1.5-3.fc20.x86_64 fuse-2.9.4-1.fc20.x86_64

UPDATE: I updated libmtp packages to 1.1.13, but I still get the exact same error messages when I run both commands.

nyovaya commented 7 years ago

Debian stretch here - same problem. Samsung Galaxy S3

go-mtpfs -usb-timeout=10000 -debug=mtp,usb,data /mnt
2017/08/04 01:52:25 fatal error LIBUSB_ERROR_PIPE; closing connection.
2017/08/04 01:52:25 MTP request OpenSession [1176730933]
send: 0x10 bytes with ep 0x4:
0000: 1000 0000 0100 0210 0000 0000 357d 2346  ............5}#F
2017/08/04 01:52:35 MTP sendreq failed: LIBUSB_ERROR_TIMEOUT
2017/08/04 01:52:35 OpenSession failed: LIBUSB_ERROR_TIMEOUT; attempting reset
2017/08/04 01:52:35 USB: ReleaseInterface 0x0, err: <nil>
2017/08/04 01:52:35 USB: Close, err: <nil>
2017/08/04 01:52:36 USB: Open, err: <nil>
2017/08/04 01:52:36 USB: ClaimInterface 0x0, err: <nil>
2017/08/04 01:52:36 MTP request OpenSession [369740717]
send: 0x10 bytes with ep 0x4:
0000: 1000 0000 0100 0210 0000 0000 adcb 0916  ................
2017/08/04 01:52:46 MTP sendreq failed: LIBUSB_ERROR_TIMEOUT
2017/08/04 01:52:46 Configure failed: OpenSession after reset: LIBUSB_ERROR_TIMEOUT

mtp-detect
libmtp version: 1.1.13

Listing raw device(s)
Device 0 (VID=04e8 and PID=685c) is a Samsung Galaxy models (MTP+ADB).
   Found 1 device(s):
   Samsung: Galaxy models (MTP+ADB) (04e8:685c) @ bus 1, dev 16
Attempting to connect device(s)
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.
hanwen commented 7 years ago

there is little we can do here. the mtp library is asking for a new session, and then the device doesn't return in time.

Does this work with other software (on other platforms?)

Maybe you could try increasing the timeout.

LKHN commented 6 years ago

I had same error. After deleting gvfs-mtp package everything was worked perfectly on Manjaro 17.1.6.

crosspath commented 2 years ago

Just to mention: I had the same error on Samsung Galaxy A32 (codename SM-A325F). I ran android-file-transfer, it showed error that device is busy by kiod process. There were 2 buttons: continue and stop process. I stopped it, and go-mtpfs became working. Sometimes go-mtpfs shows this error:

2021/12/15 22:27:25 fatal error LIBUSB_ERROR_TIMEOUT; closing connection.
2021/12/15 22:27:26 SendObject failed LIBUSB_ERROR_TIMEOUT

I increased timeout value to 10 seconds: -usb-timeout 10000. Now it works!