Showing results for 
Search instead for 
Do you mean 
Reply
SanDisk User
Sciamano
Posts: 26
Registered: ‎01-18-2008
0

How to: MTP mode in (K)Ubuntu Gutsy

[ Edited ]
Hi, I succeeded in making (K)Ubuntu see my View as an MTP device.
Basically, all that is needed is to update the libmtp library installed with (K)Ubuntu (0.2.1) to the latest version (0.2.5 at the time of writing).

This was not so straight forward for me, since I kept receiving errors, but I managed to solve it, so if anyone is interested, here is my step by step:

1) in the terminal: sudo aptitude install libusb-0.1-4 libusb-dev

2) download the latest libmtp from http://libmtp.sourceforge.net/index.php?page=download

3) unpack it to a directory, then open a terminal and 'cd' to it

4) compile as usual:
       ./configure
       make
  (if it gives errors, try 'sudo make')
       sudo make install

5) install mtp-tools: sudo aptitude install mtp-tools

6) edit, with your favorite text editor, the file /etc/udev/rules.d/libmtp.rules
    and add the following lines to it:

# SanDisk Sansa View
ATTRS{idVendor}=="0781", ATTRS{idProduct}=="74b0", SYMLINK+="libmtp-%k", MODE="666", GROUP="audio"


7) open a terminal and give the command: sudo ldconfig

8 ) save and restart your PC

9) once linux has loaded again, plug your Sansa View to an USB port and then open a terminal and try: mtp-detect
It should now give a looooong output, which means everyhting was installed correctly.

Hope this helps someone!



Message Edited by Sciamano on 02-25-2008 10:24 PM
SanDisk Guru
PromisedPlanet
Posts: 1,669
Registered: ‎10-07-2007
0

Re: How to: MTP mode in (K)Ubuntu Gutsy

And geeks wonder why the general public isn't flocking to Linux.
 
:smileywink: (signed, a self-professed geek)
SanDisk User
Sciamano
Posts: 26
Registered: ‎01-18-2008
0

Re: How to: MTP mode in (K)Ubuntu Gutsy

[ Edited ]
In the last few years Linux has become very user-friendly, and it can be used easily by the "general public" for "general purposes". It's not a "geek only" OS anymore, and spreading this myth does not help.
Consider that we are talking about making a *Microsoft* protocol (MTP) work under Linux... If you think about it, it's kind of magic.

Anyway no one is required to use the View as an MTP device under Linux. One could still use it as a MSC/UMS device using the known "trick" (turn the View on - put it in "Hold" - keep the "left button" on the wheel pressed - connect the cable), but if anyone still prefers MTP, this is the way to do it...

Of course the way the Express and the Clip work, that is spontaneously switch to MSC/UMS mode if they don't "find" the MTP protocol present on the computer, is way better. Or even the option to select the protocol via software, like it is with the e200 series, is much better.
But it's not Linux's fault if the View behaves differently... :smileywink:


Message Edited by Sciamano on 02-03-2008 05:11 PM
Newbie
BostonAdvocat
Posts: 4
Registered: ‎02-24-2008
0

Re: How to: MTP mode in (K)Ubuntu Gutsy

Thank you for the excellent write up. It worked for me with some differences.

My setup
  • Kubuntu 7.04 (Feisty Fawn)
  • Amarok 1.4.7 Music player (latest release)
  • Sansa View 16 GB (firmware according to 'mtp-detect': 01.02.09A)


The first thing I did when I got it a few days ago was update to the latest firware, 1.02.09 on 2/23/08. I was using it in MSC mode in Amarok 1.4.5 and it successfully transfered songs. However, there were plenty of minor problems when playing the mp3's when transferring in MSC mode. What was frustrating was that this was inconsistent even between songs on the same album. One song would display correctly under a given album, but another song from the same album wouldn't display. It would show up under the "Unknown Album". Some careful double checking confirmed this. This and other problems listed below affected some mp3s, but not others. As for the album art, all the art was embedded within the mp3 files, not as JPGs within folders. I prefer to keep the art embedded within the files for better maintainability.

Problems
  • Artist name was unknown
  • Album title was unknown
  • Album art missing
My best guess after eliminating common possibilities is that the player can only read certain versions of ID3v2. There are multiple versions of ID3v2 and because these mp3's come from so many different sources it's likely that there's great variance in versions even within a single album. THIS CAN BE FIXED using EasyTAG to harmonize all your mp3s into a single version. Rather than try that, however, I attempted to try connecting via MTP mode. It does in fact work. You need to follow the poster's instructions carefully. And unlike the aforementioned problems, MTP synchronization syncs all the information without any problems. It did cause Amarok to freeze up a few times when syncing more than a few songs, but after terminating the app, the songs it turns out did make it to the player.

The one problem I had with MTP after getting everything installed was with Amarok not finding the player. First off, I want to say that even though MTP synchronization works for my Sansa View, the device does not show up on my system as any kind of attached device. Running
ls /dev/sd*
doesn't yield anything other than my existing hard drives. Same for
ls /dev/hd*

In order to get Amarok to recognize the device, I had to run
mtp-detect
from the command line first. For this to be acceptable on a daily basis, Amarok does allow you to specify pre-connect commands on a per-device basis. That's great.

Here's how you add your MTP device to Amarok. Open Amarok and go to
  1. Settings -> Media Devices -> Add Device ...
  2. In the drop down, select "MTP Media Device"
  3. In the text box labeled "Enter a name for this device" give it a name like "Sansa View"
  4. Leave the bottom field blank. You will not provide a mount point.
  5. Click OK
The device should now be listed under Media Devices. The the right of the combo box for the Sansa media device is a button with an icon of 3 gears. Click on this to configure your media device.

In the first text box labeled "Pre-Connect command" enter "mtp-detect".
Click OK

Amarok will now run the command each time you try to connect to the device. For me, this is necessary in order for Amarok to see it. Otherwise it gives me an error stating that there is no MTP device connected to my computer.

Here's the problem for me (anyone else getting this?): Amarok doesn't remember the pre-connect command. A couple of times, right after I enter it and click OK, I can go right back in and the text box is blank. Other times command disappeared only after closing Amarok.  Perhaps this is an unknown bug or just specific to my system. In any case, every morning when I plug in my View to download the latest podcasts, I'll have to re-enter the pre-connect command. Lucky for me, I rarely reboot my computer so Amarok is always open and in my system tray. If this isn't resolved, then if the aforementioned MSC related problems are resolved, I'll switch back to MSC mode.

I'd recommend the following Ubuntu Forums thread for more information:
http://ubuntuforums.org/showthread.php?p=4398072#post4398072
SanDisk Guru
Enigma
Posts: 2,108
Registered: ‎07-28-2007
0

Re: How to: MTP mode in (K)Ubuntu Gutsy

i agree with promised planet on this one, theres no way the general public is meant to use linux.

You can see for yourself in some of the postings here. People that dont know about lock switches or recovery modes and firwmare files, stuff that you and I would think is easy as pie ( i like pie).

ANY person I have ever met, that uses linux, is somewhat computer proficient.

Great For Beginners:
How To Videos
FAQ's and Stickies
Any-Video-Converter
____________________________
- Enigma
SanDisk User
Sciamano
Posts: 26
Registered: ‎01-18-2008
0

Re: How to: MTP mode in (K)Ubuntu Gutsy

i agree with promised planet on this one, theres no way the general public is meant to use linux.

This is a prejudice plain and simple. Most Mac users praise the "ease of use" of their OS, which is not so different than linux.
Actually they share more than what one would expect.



You can see for yourself in some of the postings here. People that dont know about lock switches or recovery modes and firwmare files, stuff that you and I would think is easy as pie ( i like pie).

That's true. But lots of people don't know what a coil or a spark plug are, still they are allowed to drive cars. :smileywink:



ANY person I have ever met, that uses linux, is somewhat computer proficient.

That's because like 99% of personal computers come with Windows installed on them. And you need to even KNOW that linux exists in order to try it.
As things stand today, linux is not ready for the masses yet, but that's going to change. In the last few years giant steps have been made in this direction. Only a couple of years ago, just installing linux needed very specific skills and computer knowledge. Today, installing Ubuntu Linux only takes about 20 minutes, and people don't have to do anything except answering a few easy questions. Anyone can do it, literally.

SanDisk Guru
Enigma
Posts: 2,108
Registered: ‎07-28-2007
0

Re: How to: MTP mode in (K)Ubuntu Gutsy

I dont disagree with the fact that anyone can do it.... windows is even going this route to please those open source fan boys
Great For Beginners:
How To Videos
FAQ's and Stickies
Any-Video-Converter
____________________________
- Enigma
SanDisk User
Sciamano
Posts: 26
Registered: ‎01-18-2008
0

Re: How to: MTP mode in (K)Ubuntu Gutsy

We'll see about that. It's not the first time that Microsoft declares similar "apertures", but they all went dead letter in the past.
Anyway we're going way too much off-topic here. Let's go back talking about Sansas.
SanDisk User
Posts: 55
Registered: ‎07-25-2007
0

Re: How to: MTP mode in (K)Ubuntu Gutsy

[ Edited ]
I can not remember the name of the thread but there is a more comprehensive guide to installing the latest libmtp 0.2.51 which requires newer packages that were not available in the standard repos. I followed that guide and have 0.2.51 working on debian based os and have been using it with the view fine. I have not had issues with connecting to the player in Amarok and Rhythmbox. I have not been able to get Banshee to compile with libmtp support properly on ubuntu. Thats why I'm switching back to Gentoo I can have the latest software compiled the way I need it.

Oh and did I forget the fact that gentoo is for the 3l337.


Message Edited by mistawright on 02-25-2008 04:10 PM
SanDisk User
Sciamano
Posts: 26
Registered: ‎01-18-2008
0

Re: How to: MTP mode in (K)Ubuntu Gutsy

Installing the latest libmtp (from source) on Ubuntu is easy, and there should be no need for packages not available in the standard repos!
I constantly update my libmtp through the SVN and it works perfectly without any "special need". :-)