hanwen / go-mtpfs

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

Go-mtpfs always gives the "fatal error LIBUSB_ERROR_TIMEOUT; closing connection." when started, even if it seems to work fine afterwards. #137

Open nsajko opened 5 years ago

nsajko commented 5 years ago

I remember being quite confused by this before, one can think because of the message ("fatal") that go-mtpfs will not work at all, instead it seems to work fine.

Here is the output of go-mtpfs with arguments -usb-timeout=10000 -debug=mtp,usb,data /mnt

2019/06/26 20:28:36 fatal error LIBUSB_ERROR_TIMEOUT; closing connection.
2019/06/26 20:28:36 MTP request OpenSession [930781991]
send: 0x10 bytes with ep 0x1:
0000: 1000 0000 0100 0210 0000 0000 279b 7a37  ............'.z7
recv: 0x10 bytes with ep 0x81:
0000: 1000 0000 0300 1e20 0000 0000 eb64 af0f  ....... .....d..
2019/06/26 20:28:36 MTP response SessionAlreadyOpened [263152875]
2019/06/26 20:28:36 MTP request CloseSession []
send: 0xc bytes with ep 0x1:
0000: 0c00 0000 0100 0310 0000 0000            ............
recv: 0xc bytes with ep 0x81:
0000: 0c00 0000 0300 0120 0000 0000            ....... ....
2019/06/26 20:28:36 MTP response OK []
2019/06/26 20:28:36 MTP request OpenSession [1392425907]
send: 0x10 bytes with ep 0x1:
0000: 1000 0000 0100 0210 0000 0000 b3bb fe52  ...............R
recv: 0xc bytes with ep 0x81:
0000: 0c00 0000 0300 0120 0000 0000            ....... ....
2019/06/26 20:28:36 MTP response OK []
2019/06/26 20:28:36 MTP request GetStorageIDs []
send: 0xc bytes with ep 0x1:
0000: 0c00 0000 0100 0410 0100 0000            ............
recv: 0x14 bytes with ep 0x81:
0000: 1400 0000 0200 0410 0100 0000 0100 0000  ................
0010: 0100 0100                                ....
2019/06/26 20:28:36 MTP data 0x14 bytes
recv: 0xc bytes with ep 0x81:
0000: 0c00 0000 0300 0120 0100 0000            ....... ....
2019/06/26 20:28:36 MTP response OK []
2019/06/26 20:28:36 MTP decoded &mtp.Uint32Array{Values:[]uint32{0x10001}}
2019/06/26 20:28:36 MTP request GetStorageInfo [65537]
send: 0x10 bytes with ep 0x1:
0000: 1000 0000 0100 0510 0200 0000 0100 0100  ................
recv: 0x58 bytes with ep 0x81:
0000: 5800 0000 0200 0510 0200 0000 0300 0200  X...............
0010: 0000 00d0 f18c 0500 0000 0000 babf 0200  ................
0020: 0000 0000 0040 1849 006e 0074 0065 0072  .....@.I.n.t.e.r
0030: 006e 0061 006c 0020 0073 0068 0061 0072  .n.a.l. .s.h.a.r
0040: 0065 0064 0020 0073 0074 006f 0072 0061  .e.d. .s.t.o.r.a
0050: 0067 0065 0000 0000                      .g.e....
2019/06/26 20:28:36 MTP data 0x58 bytes
recv: 0xc bytes with ep 0x81:
0000: 0c00 0000 0300 0120 0200 0000            ....... ....
2019/06/26 20:28:36 MTP response OK []
2019/06/26 20:28:36 MTP decoded &mtp.StorageInfo{StorageType:0x3, FilesystemType:0x2, AccessCapability:0x0, MaxCapability:0x58cf1d000, FreeSpaceInBytes:0x2bfba0000, FreeSpaceInImages:0x40000000, StorageDescription:"Internal shared storage", VolumeLabel:""}
2019/06/26 20:28:36 MTP request GetDeviceInfo []
send: 0xc bytes with ep 0x1:
0000: 0c00 0000 0100 0110 0300 0000            ............
recv: 0x15b bytes with ep 0x81:
0000: 5b01 0000 0200 0110 0300 0000 6400 0600  [...........d...
0010: 0000 6400 266d 0069 0063 0072 006f 0073  ..d.&m.i.c.r.o.s
0020: 006f 0066 0074 002e 0063 006f 006d 003a  .o.f.t...c.o.m.:
0030: 0020 0031 002e 0030 003b 0020 0061 006e  . .1...0.;. .a.n
0040: 0064 0072 006f 0069 0064 002e 0063 006f  .d.r.o.i.d...c.o
0050: 006d 003a 0020 0031 002e 0030 003b 0000  .m.:. .1...0.;..
0060: 0000 0021 0000 0001 1002 1003 1004 1005  ...!............
0070: 1006 1007 1008 1009 100a 100b 100c 100d  ................
0080: 1010 1014 1015 1016 1017 1019 101a 101b  ................
0090: 1001 9802 9803 9804 9805 9810 9811 98c1  ................
00a0: 95c2 95c3 95c4 95c5 9506 0000 0002 4003  ..............@.
00b0: 4004 4005 4006 4001 c805 0000 0001 d402  @.@.@.@.........
00c0: d403 5001 5007 d400 0000 001c 0000 0000  ..P.P...........
00d0: 3001 3004 3005 3008 3009 300b 3001 3802  0.0.0.0.0.0.0.8.
00e0: 3804 3807 3808 380b 380d 3801 b902 b903  8.8.8.8.8.8.....
00f0: b982 b983 b984 b905 ba10 ba11 ba14 ba82  ................
0100: ba06 b911 3812 380b 4800 4d00 4400 2000  ....8.8.H.M.D. .
0110: 4700 6c00 6f00 6200 6100 6c00 0000 084e  G.l.o.b.a.l....N
0120: 006f 006b 0069 0061 0020 0036 0000 0004  .o.k.i.a. .6....
0130: 3100 2e00 3000 0000 1150 004c 0045 0047  1...0....P.L.E.G
0140: 0041 0052 0031 0037 0041 0032 0031 0030  .A.R.1.7.A.2.1.0
0150: 0033 0032 0034 0038 0000 00              .3.2.4.8...
2019/06/26 20:28:36 MTP data 0x15b bytes
recv: 0xc bytes with ep 0x81:
0000: 0c00 0000 0300 0120 0300 0000            ....... ....
2019/06/26 20:28:36 MTP response OK []
2019/06/26 20:28:36 MTP decoded &mtp.DeviceInfo{StandardVersion:0x64, MTPVendorExtensionID:0x6, MTPVersion:0x64, MTPExtension:"microsoft.com: 1.0; android.com: 1.0;", FunctionalMode:0x0, OperationsSupported:[]uint16{0x1001, 0x1002, 0x1003, 0x1004, 0x1005, 0x1006, 0x1007, 0x1008, 0x1009, 0x100a, 0x100b, 0x100c, 0x100d, 0x1010, 0x1014, 0x1015, 0x1016, 0x1017, 0x1019, 0x101a, 0x101b, 0x9801, 0x9802, 0x9803, 0x9804, 0x9805, 0x9810, 0x9811, 0x95c1, 0x95c2, 0x95c3, 0x95c4, 0x95c5}, EventsSupported:[]uint16{0x4002, 0x4003, 0x4004, 0x4005, 0x4006, 0xc801}, DevicePropertiesSupported:[]uint16{0xd401, 0xd402, 0x5003, 0x5001, 0xd407}, CaptureFormats:[]uint16{}, PlaybackFormats:[]uint16{0x3000, 0x3001, 0x3004, 0x3005, 0x3008, 0x3009, 0x300b, 0x3801, 0x3802, 0x3804, 0x3807, 0x3808, 0x380b, 0x380d, 0xb901, 0xb902, 0xb903, 0xb982, 0xb983, 0xb984, 0xba05, 0xba10, 0xba11, 0xba14, 0xba82, 0xb906, 0x3811, 0x3812}, Manufacturer:"HMD Global", Model:"Nokia 6", DeviceVersion:"1.0", SerialNumber:"PLEGAR17A2103248"}
2019/06/26 20:28:36 MTP request GetStorageInfo [65537]
send: 0x10 bytes with ep 0x1:
0000: 1000 0000 0100 0510 0400 0000 0100 0100  ................
recv: 0x58 bytes with ep 0x81:
0000: 5800 0000 0200 0510 0400 0000 0300 0200  X...............
0010: 0000 00d0 f18c 0500 0000 0000 babf 0200  ................
0020: 0000 0000 0040 1849 006e 0074 0065 0072  .....@.I.n.t.e.r
0030: 006e 0061 006c 0020 0073 0068 0061 0072  .n.a.l. .s.h.a.r
0040: 0065 0064 0020 0073 0074 006f 0072 0061  .e.d. .s.t.o.r.a
0050: 0067 0065 0000 0000                      .g.e....
2019/06/26 20:28:36 MTP data 0x58 bytes
recv: 0xc bytes with ep 0x81:
0000: 0c00 0000 0300 0120 0400 0000            ....... ....
2019/06/26 20:28:36 MTP response OK []
2019/06/26 20:28:36 MTP decoded &mtp.StorageInfo{StorageType:0x3, FilesystemType:0x2, AccessCapability:0x0, MaxCapability:0x58cf1d000, FreeSpaceInBytes:0x2bfba0000, FreeSpaceInImages:0x40000000, StorageDescription:"Internal shared storage", VolumeLabel:""}
2019/06/26 20:28:36 MTP request GetStorageInfo [65537]
send: 0x10 bytes with ep 0x1:
0000: 1000 0000 0100 0510 0500 0000 0100 0100  ................
recv: 0x58 bytes with ep 0x81:
0000: 5800 0000 0200 0510 0500 0000 0300 0200  X...............
0010: 0000 00d0 f18c 0500 0000 0000 babf 0200  ................
0020: 0000 0000 0040 1849 006e 0074 0065 0072  .....@.I.n.t.e.r
0030: 006e 0061 006c 0020 0073 0068 0061 0072  .n.a.l. .s.h.a.r
0040: 0065 0064 0020 0073 0074 006f 0072 0061  .e.d. .s.t.o.r.a
0050: 0067 0065 0000 0000                      .g.e....
2019/06/26 20:28:37 MTP data 0x58 bytes
recv: 0xc bytes with ep 0x81:
0000: 0c00 0000 0300 0120 0500 0000            ....... ....
2019/06/26 20:28:37 MTP response OK []
2019/06/26 20:28:37 MTP decoded &mtp.StorageInfo{StorageType:0x3, FilesystemType:0x2, AccessCapability:0x0, MaxCapability:0x58cf1d000, FreeSpaceInBytes:0x2bfba0000, FreeSpaceInImages:0x40000000, StorageDescription:"Internal shared storage", VolumeLabel:""}
2019/06/26 20:28:37 FUSE mounted