Code Monkey home page Code Monkey logo

Comments (15)

hanwen avatar hanwen commented on August 12, 2024

What device is this? What happens if you pass -debug=mtp,usb,data on the
cmd line?

On Sun, Mar 24, 2013 at 3:30 PM, nick knouf [email protected]:

I followed the conversation on the recently-closed bug for Samsung devices
(#29 #29), but unfortunately I
am still hit by the LIBUSB_ERROR_TIMEOUT bug. I'm on Debian Wheezy.

I'm on the latest revision of go-mtpfs, I believe:

731851chttps://github.com/hanwen/go-mtpfs/commit/731851c9363ffa26206219b9fbec1897f0b3d9d1

The debug logs don't provide much info for me:

nknouf@nomadicsounds go-mtpfs> ../../../../bin/go-mtpfs -debug=usb,mtp
-usb-timeout=10000 /media/noteII
2013/03/24 10:28:49 MTP request OpenSession [1101278637]
2013/03/24 10:28:59 MTP sendreq failed: LIBUSB_ERROR_TIMEOUT
2013/03/24 10:28:59 OpenSession failed: LIBUSB_ERROR_TIMEOUT; attempting
reset
2013/03/24 10:28:59 USB: ReleaseInterface 0x0, err:
2013/03/24 10:28:59 USB: Close, err:
2013/03/24 10:29:00 USB: Open, err:
2013/03/24 10:29:00 USB: ClaimInterface 0x0, err:
2013/03/24 10:29:00 MTP request OpenSession [1267048825]
2013/03/24 10:29:10 MTP sendreq failed: LIBUSB_ERROR_TIMEOUT
2013/03/24 10:29:10 Configure failed: OpenSession after reset:
LIBUSB_ERROR_TIMEOUT
nknouf@nomadicsounds go-mtpfs>

Any suggestions of what else to try?

—
Reply to this email directly or view it on GitHubhttps://github.com/hanwen/go-mtpfs/issues/33
.

Han-Wen Nienhuys - [email protected] - http://www.xs4all.nl/~hanwen

from go-mtpfs.

zeitkunst avatar zeitkunst commented on August 12, 2024

This is a Samsung Galaxy Note II (SGH-I317).

Here's the output of the command:

nknouf@nomadicsounds ~> /tmp/go/bin/go-mtpfs -debug=mtp,usb,data /media/noteII/2013/03/25 09:41:19 MTP request OpenSession [1754715671]
send: 0x10 bytes with ep 0x1:
0000: 1000 0000 0100 0210 0000 0000 17d6 9668  ...............h
2013/03/25 09:41:24 MTP sendreq failed: LIBUSB_ERROR_TIMEOUT
2013/03/25 09:41:24 OpenSession failed: LIBUSB_ERROR_TIMEOUT; attempting reset
2013/03/25 09:41:25 USB: ReleaseInterface 0x0, err: <nil>
2013/03/25 09:41:25 USB: Close, err: <nil>
2013/03/25 09:41:26 USB: Open, err: <nil>
2013/03/25 09:41:26 USB: ClaimInterface 0x0, err: <nil>
2013/03/25 09:41:26 MTP request OpenSession [605559377]
send: 0x10 bytes with ep 0x1:
0000: 1000 0000 0100 0210 0000 0000 511a 1824  ............Q..$
2013/03/25 09:41:31 MTP sendreq failed: LIBUSB_ERROR_TIMEOUT
2013/03/25 09:41:31 Configure failed: OpenSession after reset: LIBUSB_ERROR_TIMEOUT
nknouf@nomadicsounds ~>

from go-mtpfs.

hanwen avatar hanwen commented on August 12, 2024

does it help if you run mtp-detect first?

On Mon, Mar 25, 2013 at 2:42 PM, nick knouf [email protected]:

This is a Samsung Galaxy Note II (SGH-I317).

Here's the output of the command:

/media/noteII/2013/03/25 09:41:19 MTP request OpenSession [1754715671]
send: 0x10 bytes with ep 0x1:
0000: 1000 0000 0100 0210 0000 0000 17d6 9668 ...............h
2013/03/25 09:41:24 MTP sendreq failed: LIBUSB_ERROR_TIMEOUT
2013/03/25 09:41:24 OpenSession failed: LIBUSB_ERROR_TIMEOUT; attempting
reset
2013/03/25 09:41:25 USB: ReleaseInterface 0x0, err:
2013/03/25 09:41:25 USB: Close, err:
2013/03/25 09:41:26 USB: Open, err:
2013/03/25 09:41:26 USB: ClaimInterface 0x0, err:
2013/03/25 09:41:26 MTP request OpenSession [605559377]
send: 0x10 bytes with ep 0x1:
0000: 1000 0000 0100 0210 0000 0000 511a 1824 ............Q..$
2013/03/25 09:41:31 MTP sendreq failed: LIBUSB_ERROR_TIMEOUT
2013/03/25 09:41:31 Configure failed: OpenSession after reset:
LIBUSB_ERROR_TIMEOUT
nknouf@nomadicsounds ~>

—
Reply to this email directly or view it on GitHubhttps://github.com/hanwen/go-mtpfs/issues/33#issuecomment-15393549
.

Han-Wen Nienhuys - [email protected] - http://www.xs4all.nl/~hanwen

from go-mtpfs.

zeitkunst avatar zeitkunst commented on August 12, 2024

Unfortunately not:

nknouf@nomadicsounds bin> mtp-detect 
libmtp version: 1.1.3

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y.
   Found 1 device(s):
   Samsung: GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y (04e8:6860) @ bus 3, dev 10
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.
nknouf@nomadicsounds bin> ./go-mtpfs -debug=mtp,usb,data -usb-timeout=10000 /media/noteII
2013/03/25 20:11:41 MTP request OpenSession [1617960171]
send: 0x10 bytes with ep 0x1:
0000: 1000 0000 0100 0210 0000 0000 eb1c 7060  ..............p`
2013/03/25 20:11:51 MTP sendreq failed: LIBUSB_ERROR_TIMEOUT
2013/03/25 20:11:51 OpenSession failed: LIBUSB_ERROR_TIMEOUT; attempting reset
2013/03/25 20:11:51 USB: ReleaseInterface 0x0, err: <nil>
2013/03/25 20:11:51 USB: Close, err: <nil>
2013/03/25 20:11:52 USB: Open, err: <nil>
2013/03/25 20:11:52 USB: ClaimInterface 0x0, err: <nil>
2013/03/25 20:11:52 MTP request OpenSession [447404457]
send: 0x10 bytes with ep 0x1:
0000: 1000 0000 0100 0210 0000 0000 a9d9 aa1a  ................
2013/03/25 20:12:02 MTP sendreq failed: LIBUSB_ERROR_TIMEOUT
2013/03/25 20:12:02 Configure failed: OpenSession after reset: LIBUSB_ERROR_TIMEOUT
nknouf@nomadicsounds bin>

However, here the strange thing: I had an old udev rule when I was trying to get this work in the past. If I have had a problem connecting, giving the errors above, and then if I run mtp-detect and unplug/replug in the device, then my udev rule fires and the device is mounted properly---most of the time. I can't quite figure out the conditions where this does not work. I wish I could provide a more reproducible answer.

Let me know if you need any more information.

from go-mtpfs.

hanwen avatar hanwen commented on August 12, 2024

can you disable all udev rules relating to this device? It's possible that they interfere with what you're trying to do.

from go-mtpfs.

asrail avatar asrail commented on August 12, 2024

I had a similar issue with Galaxy SIII Mini which fixed updating libmtp to 1.1.6 from 1.1.5. He was using libmtp 1.1.3, probably too old to work.
Those Galaxy phones exposes the internal memory as a micro SD card, and the actual micro SD card as an external card.

For the OP, look for a backport version of libmtp or pick one newer from somewhere else.

from go-mtpfs.

phpmoli avatar phpmoli commented on August 12, 2024

updating libmtp to 1.1.6 did NOT solve my issue.
using:
debian-wheezy 7.1
libmtp 1.1.6-20 from debian-jessie-testing
compiled go-mtpfs myself without errors

mounted dir is empty, was working(!) for the first 5-6 times, none after, still after rebooted android and debian.

from go-mtpfs.

labos-medialab avatar labos-medialab commented on August 12, 2024

Do you have also external SD Card plugged in? If you do please try removing it and then mounting again.

from go-mtpfs.

phpmoli avatar phpmoli commented on August 12, 2024

i dont have an sdcard.
but anyway, i realized that this protocol only works when the device in awake - which is a very questionable design choice to say at least.

from go-mtpfs.

hanwen avatar hanwen commented on August 12, 2024

You can't connect to a sleeping device for security reasons.

To the other bugreport: more recent versions do not use libmtp, but a pure Go implementation of MTP. You may have more luck with that.

from go-mtpfs.

intuited avatar intuited commented on August 12, 2024

I have a Galaxy S3 SGH-I747M; laptop is running Ubuntu 12.04.3 LTS. I acquired go-mtpfs by running go get github.com/hanwen/go-mtpfs about 7 hours ago.

I've been having problems similar or identical to those described by the OP. I've discovered that my go-mtpfs invocation will succeed under certain circumstances.

Until recently, I had the backported mtp backend for GVFS installed via PPA. To successfully connect go-mtpfs, I had to

  • plug the phone in and immediately run mtp-detect. This would work and also prevent GVFS from connecting to the phone.
  • run mtp-detect again. It would hang on Attempting to connect device(s). I hit CTRL-C to cancel it.
  • then run go-mtpfs. It would work. WIthout the second mtp-detect, it would fail (I don't recall exactly why).

Since this was super complicated, I ppa-purged the ppa:langdalepl/gvfs-mtp PPA and rebooted. Now I can just do go-mtpfs without having to run mtp-detect twice first. I still have to do that before GVFS attempts (unsuccessfully) to connect to the phone; if I wait too long after plugging in the phone, it will fail, IIRC with the same timeout error quoted by the OP.

This strategy seems to work consistently, although I've only just discovered that it's possible. Recommendations on ways to make mounting happen more smoothly? Can I write a udev rule to prevent GVFS from flailing and instead cause my phone to be mounted via go-mtpfs?

Thanks for this project, by the way. Until I discovered this, it was looking like I would have to root my phone, since GVFS (even in Ubuntu 12.10) can't create files on my phone's storage space (internal or external SD card), and adb push can't access the external SD card.

from go-mtpfs.

hanwen avatar hanwen commented on August 12, 2024

I have no idea about udev. You'd have to ask around on the udev mailing lists?

from go-mtpfs.

likewhoa avatar likewhoa commented on August 12, 2024

Running into similar issue with my Nexus 6 phone. I will update issue with debug output on my end tomorrow. so far I am running both go-{mtpfs,fuse} from HEAD as of this posting. It seems this issue is not just for Samsung devices only.

from go-mtpfs.

hanwen avatar hanwen commented on August 12, 2024

@likewhoa - can you open a separate issue? Samsung uses a different MTP stack, so typically exhibits separate problems.

from go-mtpfs.

likewhoa avatar likewhoa commented on August 12, 2024

@hanwen sure, I will this morning.

from go-mtpfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.