android
  #1  
Old 12-28-2007, 06:46 AM
sdyson sdyson is offline
Junior Member
 
Join Date: Dec 2007
Posts: 6
Default MTP mode in Ubuntu Gutsy Gibbon

I've successfully got MTP mode to work in Ubuntu Gutsy Gibbon so thought I'd share the details here.

First of all this uses a library called libmtp. The version in the Gutsy Gibbon repositories is 0.2.1 and does not work with the Sansa View. Unless you can find an alternative repository you're going to need to build this yourself. But don't worry, it's straightforward. Download the latest version from http://libmtp.sourceforge.net (I got 0.2.4) and unpack the archive. Then in a console cd to the directory you just unpacked and run the following 3 commands:

Code:
./configure
sudo make
sudo make install
Next you need to edit /etc/udev/rules.d/libmtp.rules in your favourite editor and add the Sansa View to the list of devices as follows. Notice the MODE is 666 to ensure your own user has access to the device. You will need to restart for these changes to take effect.

Code:
# SanDisk Sansa View
ATTRS{idVendor}=="0781", ATTRS{idProduct}=="74b0", SYMLINK+="libmtp-%k", MODE="666", GROUP="audio"
Now we want to make sure everything is working so you want to install mtp-tools using the package manager or as follows:

Code:
sudo apt-get install mtp-tools
Connect the Sansa View to the PC using the supplied cable and then run the following command:

Code:
mtp-detect
This will detect any available MTP devices and print out lots of information about the View if successful.

At this stage you should be able to use the View as an MTP device using your preferred media application. I use Amarok which is packaged with MTP support in Gutsy Gibbon. All you need to do is go to Media Devices in the configuration dialog and add an 'MTP Media Device', then press the connect button on the 'Devices' view.
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 12-28-2007, 08:30 AM
Symbolis Symbolis is offline
Junior Member
 
Join Date: Dec 2007
Posts: 4
Default

I seem to have hit a snag.

Code:
symbolis@symbolis-desktop:~$ mtp-detect
libmtp version: 0.2.1

Attempting to connect device(s)
Potential MTP Device with VendorID:0781 and ProductID:74b0 responded to control message 2 with a response that was too short. Problems may arrise but continuing
Device 1 (VID=0781 and PID=74b0) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
usb_claim_interface(): Device or resource busy
LIBMTP PANIC: Unable to initialize device 1
LIBMTP PANIC: configure_usb_devices() error code: 7 on line 1806
Detect: There has been an error connecting. Exiting
symbolis@symbolis-desktop:~$
Any ideas?
Reply With Quote

  #3  
Old 12-28-2007, 09:03 AM
sdyson sdyson is offline
Junior Member
 
Join Date: Dec 2007
Posts: 6
Default

Looks like you are still running against libmtp 0.2.1. Run through the installation of 0.2.4 again and double check the output for errors - particularly the configure stage. In particular watch out for libusb missing. If it is missing install it through synaptic.
Reply With Quote

  #4  
Old 12-28-2007, 09:22 AM
sdyson sdyson is offline
Junior Member
 
Join Date: Dec 2007
Posts: 6
Default

If that doesn't work then try configure without the prefix. You may need to reboot afterwards.

Code:
./configure
Reply With Quote

  #5  
Old 12-30-2007, 03:10 AM
bike bike is offline
Junior Member
 
Join Date: Dec 2007
Posts: 5
Default

Ah, I was about to publish my experiences as well. One advantage of libmtb over the UMS/MSC hack is you get album art. Using the new libmtp I'm able to get it working at a libmtp device with amarok. I'm able to transfer music on and off, although it doesn't come off with album art for some reason.

Have you been able to get playlists working?
Reply With Quote

  #6  
Old 12-30-2007, 03:29 AM
advcomp2019's Avatar
advcomp2019 advcomp2019 is offline
Ultra Senior Member
 
Join Date: Jun 2007
Posts: 4,838
Default

Bike, have you tried embedding the album art. Then transferring the songs.
Reply With Quote

  #7  
Old 12-30-2007, 10:44 AM
sdyson sdyson is offline
Junior Member
 
Join Date: Dec 2007
Posts: 6
Default

You can use album art in MSC mode. You just need to drop a file named folder.jpg in the album directory.

If you use Amarok there is a cool script called CopyCover that will copy the album covers from the Amarok profile directory to the album's directory:
http://kde-apps.org/content/show.php...17&forumpage=7
Reply With Quote

  #8  
Old 01-19-2008, 07:17 AM
Sciamano Sciamano is offline
Member
 
Join Date: Dec 2007
Posts: 144
Default

I'm having the same problem as Symbolis: I've libusb (and -dev) installed, followed the installation procedure, but still when I launch mtp-tools it says it's using libmtp version 0.2.1

Any help? My View is on its way...
__________________
My Players:
SanDisk Sansa View 16Gb / SanDisk Sansa Express 2Gb / Cowon iAudio M3 20Gb

Linux How-To: Easy Video Conversions for the Sansa View
Reply With Quote

  #9  
Old 02-02-2008, 01:10 PM
Sciamano Sciamano is offline
Member
 
Join Date: Dec 2007
Posts: 144
Default

I managed to make it work, but Amarok does not connect to the View...
__________________
My Players:
SanDisk Sansa View 16Gb / SanDisk Sansa Express 2Gb / Cowon iAudio M3 20Gb

Linux How-To: Easy Video Conversions for the Sansa View
Reply With Quote

  #10  
Old 02-03-2008, 06:07 AM
Sciamano Sciamano is offline
Member
 
Join Date: Dec 2007
Posts: 144
Default

Ok, now it works. For anyone interested, I followed the instructions written by sdyson here but they did not work for me. After compiling libmtp-0.2.5 I kept receiving errors when trying 'mtp-detect'.

This is what I did, it solved the problem for me but YMMV:

1) Open a terminal and write:
Code:
sudo aptitude reinstall libmtp6
2) Restart your PC.
3) It should now work

I have no idea how or why it worked, but it did...
__________________
My Players:
SanDisk Sansa View 16Gb / SanDisk Sansa Express 2Gb / Cowon iAudio M3 20Gb

Linux How-To: Easy Video Conversions for the Sansa View
Reply With Quote

  #11  
Old 02-03-2008, 04:36 PM
sdyson sdyson is offline
Junior Member
 
Join Date: Dec 2007
Posts: 6
Default

If you're using Ubuntu Gutsy then all that does is install 0.2.1.
Reply With Quote

  #12  
Old 02-04-2008, 11:51 AM
Sciamano Sciamano is offline
Member
 
Join Date: Dec 2007
Posts: 144
Default

Quote:
Originally Posted by sdyson View Post
If you're using Ubuntu Gutsy then all that does is install 0.2.1.
That's what it should do. But not what it does.
Unless you can explain why mtp-tools now reports using libmtp-0.2.5
__________________
My Players:
SanDisk Sansa View 16Gb / SanDisk Sansa Express 2Gb / Cowon iAudio M3 20Gb

Linux How-To: Easy Video Conversions for the Sansa View
Reply With Quote

  #13  
Old 02-07-2008, 07:43 AM
Sciamano Sciamano is offline
Member
 
Join Date: Dec 2007
Posts: 144
Default

Ok, I had the same problem on another computer: when trying mtp-detect it would output:

Code:
mtp-detect: error while loading shared libraries: libmtp.so.7: cannot open shared object file: No such file or directory
A suggestion that makes more sense to me (and which worked) is this.
Follow the tutorial written by sdyson, but just after editing the file /etc/udev/rules.d/libmtp.rules do the following:

open a terminal and write:

Code:
sudo ldconfig
Now it will work.
Hope this helps someone else in my same situation.
__________________
My Players:
SanDisk Sansa View 16Gb / SanDisk Sansa Express 2Gb / Cowon iAudio M3 20Gb

Linux How-To: Easy Video Conversions for the Sansa View
Reply With Quote

  #14  
Old 02-11-2008, 01:08 PM
foxx foxx is offline
Junior Member
 
Join Date: Dec 2007
Location: Germany
Posts: 44
Lightbulb

Hello,

I packaged libmtp 0.2.6 and Rhythmbox 0.11.5, mtpfs 0.8svn, Gnomad2 2.9.1 linked against it in my Ubuntu Gutsy repository. You can get it by adding my repository http://ubuntu.jbbr.net/

Code:
sudo wget http://ubuntu.jbbr.net/gutsy.list -O /etc/apt/sources.list.d/jbbr.list
wget -q http://ubuntu.jbbr.net/jbbr_ubuntu.asc -O- | sudo apt-key add - && sudo apt-get update
Afterwards do a upgrade. Rhythmbox should be upgraded and libmtp should be installed with this upgrade. If you like to use gnomad2 or mtpfs you can install them

Code:
sudo apt-get upgrade
sudo apt-get install mtpfs gnomad2
With mtpfs you can "mount" your player like a mass storage device. Do:

Code:
mkdir ~/MTP
mtpfs ~/MTP
to have your player accessible in /home/username/MTP

Regards,
foxx
Reply With Quote

  #15  
Old 04-13-2008, 11:32 AM
ellocco ellocco is offline
Junior Member
 
Join Date: Apr 2008
Posts: 10
Default mtpfs

Quote:
Originally Posted by foxx View Post
Hello,
[...]

Code:
mkdir ~/MTP
mtfs ~/MTP
to have your player accessible in /home/username/MTP

Regards,
foxx
You probably mean "mtpfs", but I can not understand,
why this mounts my device, as I understand it you just
establish a mtp filesystem at the new location "~/MTP"

Regards,

Stefan
Reply With Quote

  #16  
Old 04-13-2008, 12:07 PM
foxx foxx is offline
Junior Member
 
Join Date: Dec 2007
Location: Germany
Posts: 44
Default

Hello,

Quote:
Originally Posted by ellocco View Post
You probably mean "mtpfs"
Thank you, I changed this line.
Quote:
Originally Posted by ellocco View Post
but I can not understand,
why this mounts my device, as I understand it you just
establish a mtp filesystem at the new location "~/MTP"
It looks like it automatically looks for MTP device attached via USB. If you have only one MTP device attached its getting mounted - I don't know whats happening if you attach more than one device.

Regards,
foxx
__________________
http://jbbr.net/ - Get YouName@jbbr.net with Jabber, E-Mail and more for free!
Reply With Quote

  #17  
Old 04-13-2008, 01:57 PM
ellocco ellocco is offline
Junior Member
 
Join Date: Apr 2008
Posts: 10
Default

Here are my investigation results to this problem (the problem is not yet resolved, state Apr-2008):
http://www.jpberlin.de/st.pofahl/htm...-protocol.html

Regards,

ellocco
Reply With Quote

  #18  
Old 04-13-2008, 02:08 PM
ellocco ellocco is offline
Junior Member
 
Join Date: Apr 2008
Posts: 10
Default mtpfs

Quote:
Originally Posted by foxx View Post
Hello,
[...]

It looks like it automatically looks for MTP device attached via USB. If you have only one MTP device attached its getting mounted - I don't know whats happening if you attach more than one device.

Regards,
foxx
Here on my machine it does not work, ls gives the feedback:
Code:
ls -la /media/mtp
ls: /media/mtp: Der Socket ist nicht verbunden
("Der Socket ist nicht verbunden" means: "socket is not connected")

And then from time to time a warning window pops up, that says:
"Eingehängter Datenträger /media/mtp reagiert nicht ..."
(Mounted device /media/mtp is not responding ...)

So, for me it is not yet the solution to the problem :-(

Regards,

ellocco
Reply With Quote

  #19  
Old 04-13-2008, 02:09 PM
foxx foxx is offline
Junior Member
 
Join Date: Dec 2007
Location: Germany
Posts: 44
Default

I don't understand you problem: If you player is detected by the installed libmtp version (try it by using "mtp-detect") mtpfs should mount it like expected - doesnt it mount on you machine?
Are you using my repository? Gutsy ships only libmtp 0.2.1 by default but players like the YP-T10 by Samsung are only supported from 0.2.4.

Regards,
foxx

EDIT: I started writing my answer before you post appeared... Which libmtp version are you using and which player are you using? Does "mtp-detect" detect you player?
__________________
http://jbbr.net/ - Get YouName@jbbr.net with Jabber, E-Mail and more for free!
Reply With Quote

  #20  
Old 04-13-2008, 02:23 PM
ellocco ellocco is offline
Junior Member
 
Join Date: Apr 2008
Posts: 10
Default mtp-detect breaks down ...

Quote:
Originally Posted by foxx View Post
I don't understand you problem: If you player is detected by the installed libmtp version (try it by using "mtp-detect") mtpfs should mount it like expected - doesnt it mount on you machine?
Are you using my repository?
No, - not yet.
Quote:
Originally Posted by foxx View Post
Gutsy ships only libmtp 0.2.1 by default but players like the YP-T10 by Samsung are only supported from 0.2.4.

Regards,
foxx

EDIT: I started writing my answer before you post appeared... Which libmtp version are you using and which player are you using? Does "mtp-detect" detect you player?
a.) I use libmtp vers.0.2.6.1. - b.) No, "mtp-detect" breaks down with an error-message, here is another post from me to this topic:
http://www.anythingbutipod.com/forum...237#post237237
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 05:14 AM.