4

I have been trying to get my GalaxyS3 to play nice with Ubuntu12.04 to no avail. I've tried a bunch of different apps that dont work and now I'm trying to make one that does.

Now I am told that Samsung did some 'bad magic' with it's new devices and that I need to talk to it via the MTP protocol which Ubuntu cant do by default for whatever reason.

I like python so I'm trying this out using pymtp.

My current problem is that pymtp's connect function is failing:

import pymtp
oMTP = pymtp.MTP()
oMTP.connect()

This yields:

Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7310/P7510/N7000/I9100/Galaxy Tab 7.7/10.1/S2/Nexus/Note.
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
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.7/pymtp.py", line 443, in connect
    raise NoDeviceConnected
pymtp.NoDeviceConnected
Charles
  • 50,943
  • 13
  • 104
  • 142
Sheena
  • 15,590
  • 14
  • 75
  • 113
  • 2
    The last few generations of Samsung Android devices don't yet play well with MTP on Linux, including the Galaxy Nexus. This is an issue with the MTP bits themselves, not a specific issue with the Python bindings. Plug it in while tailing syslog for a collection of utter and complete fail. – Charles Dec 26 '12 at 17:56
  • 1
    Can you try to disconnect your devices in the graphic interface of Ubuntu and then run the same code? I suspect that Ubuntu is auto mounting your device in something like file:/run/user/1003/gvfs/mtp:host=%5Busb%3A002%2C007%5D/Storage Media, which prevent pymtp to connect to it itself. – J..y B..y Jan 03 '15 at 12:15

0 Answers0