Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[MTP to Android device] libUSB timeout when copying files
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
fdelente
n00b
n00b


Joined: 04 Oct 2012
Posts: 40

PostPosted: Wed Feb 12, 2014 12:18 pm    Post subject: [MTP to Android device] libUSB timeout when copying files Reply with quote

Hello.

After mounting my Samsung Galaxy S4 Mini with go-mtps and starting to copy files, I get

2014/02/12 13:02:12 starting FUSE.
2014/02/12 13:02:35 sending file "file.mp3" to device: 124996940 bytes.
2014/02/12 13:02:44 fatal error LIBUSB_ERROR_TIMEOUT; closing connection.
2014/02/12 13:02:49 SendObject failed LIBUSB_ERROR_TIMEOUT

I have disabled the lock screen on the phone, but it doesn't solve the problem

I don't think this is gentoo-related, but I haven't found any solution by googling and the Samsung tech support told me everything was fine in Linux with MTP, can anybody here give me a hand?

Thanks!
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1789

PostPosted: Thu Feb 13, 2014 9:04 pm    Post subject: Reply with quote

Hello!
Everything is fine with MTP in Linux?
That's totally not my experience so far. It seems to suck. Hard!
I am using latest KDE and a generally ~amd64 system along with libmtp-9999 and still the connection is so bad that I don't bother using it. If you just want to access your ExtSD, try something like USBMassStorageEnabler from PlayStore or search XDA for something similar. For syncing folders, I just discovered BTSync today, there is an ebuild floating around somewhere (yeah, why the heck isn't this in portage?).
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
fdelente
n00b
n00b


Joined: 04 Oct 2012
Posts: 40

PostPosted: Tue Feb 18, 2014 3:38 pm    Post subject: Reply with quote

I went around the problem by installing an SSH server on the phone, and scp-ing my files from linux... but barely getting 1 Mb/s instead of around 20 Mb/s in USB mode... :^(
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1789

PostPosted: Tue Feb 18, 2014 3:42 pm    Post subject: Reply with quote

Really try btsync. There's ann ebuild somewhere. Works flawlessly for me. Or Plain old USB mode. Btw, with my new note 3,mtp seems to just work. Seems to be heavily device dependent if you have issues or not.
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
Fitzcarraldo
l33t
l33t


Joined: 30 Aug 2008
Posts: 768
Location: United Kingdom

PostPosted: Tue Feb 18, 2014 8:14 pm    Post subject: Reply with quote

Martux, as you're a KDE user, have you tried kde-misc/kio-mtp? It works well on my main laptop (~amd64). I can copy files from phone to laptop and vice versa without problems.
_________________
Clevo W230SS: amd64, OpenRC, NVIDIA, KDE / Compal NBLB2: ~amd64, OpenRC, FGLRX, KDE, dual booting with Windows 7 Professional 64-bit
Fitzcarraldo's blog
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1789

PostPosted: Tue Feb 18, 2014 9:15 pm    Post subject: Reply with quote

Yes, Fitzcarraldo. As I said this seems to work very device-specific. With my Note 2 it was driving me crazy, with the Note 3 it just works. Since some days I exclusively use BTSync (http://www.bittorrent.com/intl/sync) and it's just a charme :) The gentoo part runs as daemon, very nice.
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
Fitzcarraldo
l33t
l33t


Joined: 30 Aug 2008
Posts: 768
Location: United Kingdom

PostPosted: Wed Feb 19, 2014 10:15 am    Post subject: Reply with quote

I have a Samsung Galaxy Note II, and that works fine with kio-mtp (even though mtpfs is unreliable), so I'm surprised you had problems with your Note II. I'm running KDE 4.12.2 in Gentoo ~amd64 on the following hardware:

- Intel Core i7 720QM (1.6 GHz)
- 4 GB DDR3
- 15.6″ LCD (1920×1080)
- ATI Mobility Radeon HD 5650, 1 GB GDDR3
- 320 GB HDD
- Atheros Communications AR8131 Gigabit Ethernet controller
- Intel WiFi Link 5300
- Broadcom BCM2046 Bluetooth Device
- 4 x USB 2 ports
_________________
Clevo W230SS: amd64, OpenRC, NVIDIA, KDE / Compal NBLB2: ~amd64, OpenRC, FGLRX, KDE, dual booting with Windows 7 Professional 64-bit
Fitzcarraldo's blog
Back to top
View user's profile Send private message
undrwater
Apprentice
Apprentice


Joined: 28 Jan 2003
Posts: 279
Location: Caucasia

PostPosted: Fri Feb 21, 2014 8:04 pm    Post subject: Reply with quote

Martux wrote:
Really try btsync. There's ann ebuild somewhere. Works flawlessly for me. Or Plain old USB mode. Btw, with my new note 3,mtp seems to just work. Seems to be heavily device dependent if you have issues or not.


Are you using libmtp-9999? I've got the Note 3, and it sometimes works, but mostly not. Currently using libmtp-1.1.6-r1.

[edit]
Had to select "Media device (USB 3.0) in order for it to work...and seems pretty stable.
[/edit]
_________________
Open-mindedness is painful...
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1789

PostPosted: Fri Feb 21, 2014 10:05 pm    Post subject: Reply with quote

Yes, libmtp-9999 here. Is that option you selected in the kernel?
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
vaxbrat
l33t
l33t


Joined: 05 Oct 2005
Posts: 622
Location: DC Burbs

PostPosted: Sat Feb 22, 2014 8:08 pm    Post subject: MTP is a trainwreck Reply with quote

Both MS and the vendors are at fault for MTP. MS gets dinged for something that is not well thought out, and the vendors get blame for not executing and for only debugging against windows installs. I found all this out when I tried it with my Nexus 7 tablet and then started googling around about all of the errors I was getting.

I just use the ES File Explorer from Google Play and do all of the transfers with it on wifi from samba shares.
Back to top
View user's profile Send private message
i92guboj
Moderator
Moderator


Joined: 30 Nov 2004
Posts: 10222
Location: Córdoba (Spain)

PostPosted: Sat Feb 22, 2014 8:28 pm    Post subject: Reply with quote

Mtp never worked for me.

Fortunatelly you have adb, ssh, ftp, bluetooth (ugh...), owncloud and a few other proprietary options which I don't care about.

If you find the correct combo you don't even need to worry about the sync'ing, unlike with mtp. And it actually workS.

Edited: mtp always reminded me of gphoto and that stuff. It really doesn't serve any purpose that's not covered by any other better more general software/protocol that actually works and is usable in a number of architectures instead of just beeing valid for $RANDOMTOY
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1789

PostPosted: Mon Mar 03, 2014 8:52 pm    Post subject: Reply with quote

Here's maybe another nice option (at least for KDE users): kdeconnect.
There's no official ebuild, but there's a live ebuild around. Since today the "browse device" option is working very well. It's working via sftp and just integrates into dolphin :-D
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
Fitzcarraldo
l33t
l33t


Joined: 30 Aug 2008
Posts: 768
Location: United Kingdom

PostPosted: Tue Mar 04, 2014 6:57 am    Post subject: Reply with quote

Martux wrote:
Here's maybe another nice option (at least for KDE users): kdeconnect.
There's no official ebuild, but there's a live ebuild around. Since today the "browse device" option is working very well. It's working via sftp and just integrates into dolphin :-D

I started using KDE Connect a few weeks ago (KDE Connect – Link your Android device to your KDE desktop) and file transfers from my Samsung Galaxy Note II to my laptop are much, much faster than Bluetooth (which is no longer working for me anyway in KDE now that Bluez-5 has been unmasked :cry: ). However, when I last used KDE Connect there was no way of transferring files from my laptop to the phone, only from phone to laptop. Is now possible to transfer files in both directions?
_________________
Clevo W230SS: amd64, OpenRC, NVIDIA, KDE / Compal NBLB2: ~amd64, OpenRC, FGLRX, KDE, dual booting with Windows 7 Professional 64-bit
Fitzcarraldo's blog
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1789

PostPosted: Tue Mar 04, 2014 7:00 am    Post subject: Reply with quote

Have you tried with the dolphin integration? Should work!
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
Fitzcarraldo
l33t
l33t


Joined: 30 Aug 2008
Posts: 768
Location: United Kingdom

PostPosted: Thu Mar 06, 2014 7:04 pm    Post subject: Reply with quote

Martux wrote:
Here's maybe another nice option (at least for KDE users): kdeconnect.
There's no official ebuild, but there's a live ebuild around. Since today the "browse device" option is working very well. It's working via sftp and just integrates into dolphin :-D

There has been an official ebuild for KDE Connect in the main Portage tree since 20 February:

Code:
meshedgedx fitzcarraldo # eix -I kdeconnect
[I] kde-misc/kdeconnect
     Available versions:  (4) (~)0.4.2[1] (~)0.5 **9999[2]
       {aqua debug}
     Installed versions:  0.5(4)(21:06:31 24/02/14)(-aqua -debug)
     Homepage:            http://www.kde.org/
     Description:         Adds communication between KDE and your smartphone

[1] "sabayon" /var/lib/layman/sabayon
[2] "kde" /var/lib/layman/kde

I downgraded from the live ebuild in the overlay on 24 February and cannot see any 'browse device' option in the 0.5 version. KDE Connect does not work with the office network nor the hotel network, so I'll have to wait until I'm back at home in a couple of weeks in order to merge the 9999 ebuild again and try the latest live code from the kde overlay's Git repository. Anyway, until then I can continue to use kio-mtp with the USB cable, so the fact that Bluetooth no longer works because of Bluez-5 is not too much of an inconvenience.
_________________
Clevo W230SS: amd64, OpenRC, NVIDIA, KDE / Compal NBLB2: ~amd64, OpenRC, FGLRX, KDE, dual booting with Windows 7 Professional 64-bit
Fitzcarraldo's blog
Back to top
View user's profile Send private message
artbody
Guru
Guru


Joined: 15 Sep 2006
Posts: 318
Location: LB

PostPosted: Tue Sep 16, 2014 5:25 pm    Post subject: Reply with quote

i've a Galaxy S4
and the only thing i did was installing following packeges
Code:
 emerge  sys-fs/mtpfs kde-misc/kio-mtp


then connecting the usb-cable
settings on zhe Phone = mtp protocol

open dolphin > networks > mtp-devices

and voila there is my android.

it works
_________________
AMD 64 X2 4200+ Asus M2NPV-VM Sockel AM2 - 6GB DDR800 - Monitor:Samsung 245B 1920x1200 GeForce 6150

achim
Back to top
View user's profile Send private message
tw04l124
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 2328
Location: A t z e l, lower austria

PostPosted: Tue Sep 16, 2014 7:48 pm    Post subject: Reply with quote

I just wonder why you dont use android debug bride and make a full backup or copy the files in bash?

Works quite well on google nexus 4. And i think this feature is android specific so it should work on any newer android.
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 5919
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Tue Sep 16, 2014 9:17 pm    Post subject: Reply with quote

"MTP is like cancer"
~ Steve Ballmer

:roll:


could never get it really working that properly


instead I've been using the app AirDroid (transfers via WLan)


simple drag'n'drop there


and for those cases (emergencies) where files really need to be transferred adb push usually is enough :)
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.5.2

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1305
Location: PB, Germany

PostPosted: Thu Jul 16, 2015 7:20 am    Post subject: Reply with quote

Currently I'm using the mtp:// feature of my filebrowser Thunar, with some Android CM12.1 (5.1). That works with some drawbacks:

    * Only after unlocking the phone (security feature I agree with), and sometimes continues working after locking, but sometimes not. In that case only re-plugging USB works or manually disabling/enabling MTP in the device which is annoying.
    * Other apps have no idea about mtp:// . That means I can't even use a PDF-Reader or Picture-Viewer. I guess Thunar's MTP is done by gvfs, maybe also Gtk apps like geeqie (pictures) don't use gvfs, I did not step into that further.

However I would prefer a mount, say fuse would be an option.
What fuse module is recommended today as there are a few around:
Code:
# eix -c mtp --only-names -C sys-fs --pure-packages
sys-fs/go-mtpfs
sys-fs/jmtpfs
sys-fs/mtpfs
sys-fs/simple-mtpfs

Would that even work with hard unplugging, I mean no freezing, but of course data loss possible..? Could that work flawlessly with autofs?
_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G | amd64:Acer Z5610 (Core2QuadQ8200),i5-3470,VMware VM @ i7-2620M | amd64-prefix:OpenSuse | Lila-Theme
Back to top
View user's profile Send private message
nictki
n00b
n00b


Joined: 10 Jan 2007
Posts: 38
Location: somewhere else...

PostPosted: Thu Jul 16, 2015 8:03 am    Post subject: Reply with quote

@Massimo B.

I'm using sys-fs/simple-mtpfs with my N4 and N5,
and it works quite good and stable.

I tried sys-fs/mtpfs some time ago, but without success (very unstable connection or none)...
_________________
github
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1305
Location: PB, Germany

PostPosted: Thu Jul 16, 2015 9:30 am    Post subject: Reply with quote

How do you deal with disconnection when the phone is ringing? Just unplug, re-plug later? Or umount first?
nictki wrote:

I'm using sys-fs/simple-mtpfs with my N4 and N5,
and it works quite good and stable.
Thanks, works fine. ~16MB/s with unison to mirror some large trees.
_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G | amd64:Acer Z5610 (Core2QuadQ8200),i5-3470,VMware VM @ i7-2620M | amd64-prefix:OpenSuse | Lila-Theme
Back to top
View user's profile Send private message
nictki
n00b
n00b


Joined: 10 Jan 2007
Posts: 38
Location: somewhere else...

PostPosted: Thu Jul 16, 2015 10:28 am    Post subject: Reply with quote

Massimo B. wrote:
How do you deal with disconnection when the phone is ringing? Just unplug, re-plug later? Or umount first?


If you have to disconnect the phone, I would umount first
_________________
github
Back to top
View user's profile Send private message
tw04l124
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 2328
Location: A t z e l, lower austria

PostPosted: Thu Jul 16, 2015 11:04 am    Post subject: Reply with quote

personal expierence:

mtp did not worked for me in windows 7 (with my nexus 7) and I had issues on gentoo. I did not got it to work where adb worked out of the box instantly. As I needed adb for other things also, and when you want to tweak your android, its the only way here. I doubt you can access special folders with mtp. its limited to only a few folders on teh /sdcard mountpoint afaik.
android debug bridge with
adb push file
adb pull file
works quite well

and adb gives a line at each transfer how fast it was. and you can issue adb devices to see if your phone is connected in the first place.
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1305
Location: PB, Germany

PostPosted: Wed Jul 22, 2015 7:39 am    Post subject: Reply with quote

Massimo B. wrote:
nictki wrote:
I'm using sys-fs/simple-mtpfs with my N4 and N5,
and it works quite good and stable.
Thanks, works fine. ~16MB/s with unison to mirror some large trees.

First I was happy that rumours about unstable mtp were untrue... since today simple-mtpfs does not work anymore. I was using sys-fs/simple-mtpfs-0.2 from the tree, now I also tried the latest git revision from github:
Code:
$ simple-mtpfs ~/mnt/mtp/ -vvvv -fo
# ..after a very long time ...
LIBMTP PANIC: Trying to dump the error stack of a NULL device!
..just does not return for a long time. I tried rebooting the MTP device, my host, tried un/re-plugging usb... From the logs:
Code:
Jul 22 09:31:55 [kernel] usb 2-2: new high-speed USB device number 5 using xhci_hcd
Jul 22 09:31:55 [kernel] usb 2-2: New USB device found, idVendor=22b8, idProduct=2e82
Jul 22 09:31:55 [kernel] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 22 09:31:55 [kernel] usb 2-2: Product: Moto G 2014
Jul 22 09:31:55 [kernel] usb 2-2: Manufacturer: motorola
Jul 22 09:31:55 [kernel] usb 2-2: SerialNumber: ZX1D226WKX
Jul 22 09:32:05 [kernel] usb 2-2: reset high-speed USB device number 5 using xhci_hcd
Jul 22 09:32:14 [metalog] Got SIGUSR1 - enabling synchronous mode.
Jul 22 09:32:21 [kernel] usb 2-2: device descriptor read/64, error -110
                - Last output repeated twice -
Jul 22 09:32:37 [kernel] usb 2-2: reset high-speed USB device number 5 using xhci_hcd
Jul 22 09:32:52 [kernel] usb 2-2: device descriptor read/64, error -110
                - Last output repeated twice -
Jul 22 09:33:08 [kernel] usb 2-2: reset high-speed USB device number 5 using xhci_hcd
                - Last output repeated twice -
Jul 22 09:34:24 [kernel] usb 2-2: device descriptor read/64, error -110

I have also re-built gnome-base/gvfs without USE="mtp" to avoid conflicts, as with some mtp fuse mount I wouldn't use gvfs anyway.
_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G | amd64:Acer Z5610 (Core2QuadQ8200),i5-3470,VMware VM @ i7-2620M | amd64-prefix:OpenSuse | Lila-Theme
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum