Sandisk Sansa View on Ubuntu Linux
May 21st, 2008My girlfriend bought an 8GB Sansa View recently and I've been doing a lot of tinkering with it in Ubuntu 8.04 (both AMD64 and x86). Here is some of the knowledge I've gained in regards to the Sansa View and Ubuntu Linux. Please reply if you know any of this to be incorrect.
First of all, there are 2 modes you can use this device in, and they are mutually exclusive as far as working with them in Linux (that is, you don't have access to files added in MTP mode if you mount it in MSC mode).
MSC (Mass Storage Controller) Mode
By default, the device is in MTP (Microsoft Transfer Protocol) mode. More on this later. Most of us linux users are used to using MP3 players in MSC mode which is essentially just a USB flash drive.
To mount the device in MSC mode, you put the device in hold (slide the power switch down) and then hold down the left button on the direction pad for about 5 seconds and then connect it to your USB port. The device should then auto mount into '/media/Sansa View' as a flash drive and an icon should show up on your desktop.
Rhythmbox will not initially identify the device. To get rhythmbox to see the device, you simply place a text file into the root directory of the player named '.is_audio_player' (/media/Sansa View/.is_audio_player). Then it will show up in Rhythmbox and you can drag and drop your music onto it. However, rhythmbox seems to copy the music into the root instead of the 'MUSIC' folder. To change that behaviour, you can edit that '.is_audio_player' file to tell it where to copy the music. The following should work good for a '.is_audio_player' file for the Sansa View:
audio_folders=MUSIC/ folder_depth=2
This method should also work for other audio players like Amarok, Banshee, etc.
The Sansa View seems to prefer id3v2.3 tags, however, newver versions of id3 tagging libraries often use id3v2.4 tags. I use a program called easytag to organize my tags. You can install easy tag with:
sudo aptitude install easytag
You can setup easy tag to use the correct id3 tags by going into 'Settings' > 'Preferences' and clicking the 'ID3 Tag Settings' tab. You want to change the version setting for the id3v2 tags to 'id3v2.3' and leave it in UTF-16 encoding. Here is a screenshot of my preferences:
Once you change this setting, any files which have tags that are NOT in this version will show up red (unsaved). So you can simply load the folder you store your media in, select all, and save. They should now pass through correctly to the Sansa View in MSC mode (including album art discussed below).
Album art in MSC mode can be achieved at least 2 different ways (that I've found). First, you can drop a 300x300 jpg version of the album art named 'folder.jpg' into the folder containing the songs for that album (ie: /media/Sansa View/MUSIC/some_artist/some_album/folder.jpg). Secondly, you can embed the 300x300 jpg file into the id3v2 tag. If you have setup easy tag as discussed in the previous section, this will work.
As far as I can tell, the Sansa View does not support playlists in MSC mode! Correct me if I'm wrong. This was a deal breaker for me which is why I've been working in MTP mode.
MTP (Microsoft Transfer Protocol) Mode
If you're not familiar with MTP, it's a protocol used by many new portable media devices which "synch" up with Windows Media Player (WMP). It's not a file system in the traditional sense that MSC mode is, and thus it doesn't exactly "mount" in Linux (though you can using mtpfs).
It's important to understand that MTP mode is a different animal and the normal rules regarding playlists, album art, and ID3 tags do not apply.
The Sansa View's default mode is MTP, so that's why you aren't seeing an icon popup on your Ubuntu desktop as soon as you plug it in. To use it in MTP mode, you should install libmtp, the library for accessing MTP devices. It's also handy to install mtp-tools and mtpfs which I'll discuss later. You can install all 3 packages using:
sudo aptitude install libmtp mtp-tools mtpfs
Open Rythmbox. Select 'Edit' > 'Plugins' and enable 'MTP Portable Devices' plugin. You can now drop your music onto your device in Rhythmbox, however, playlist support isn't quite working and album art is not supported (as of time of writing). I wasn't successful getting playlists and album art working in Amorok or Banshee either, however, since I use Rhythmbox, I didn't try very hard.
These utilities are some example programs from the libmtp source. Granted you can do just about anything you need to with these tools (create/delete tracks, folders, albums, album art, files, etc.), they are command line tools and doing so can be a bit tedious because of the nature of MTP. But it's a good way to experiment and ensure your MTP device is detected by libmtp. You could also use these tools with your own script if you needs are minimal. Start by typing 'mtp-detect' to find your device. Then type 'man mtp-connect' to see all the commands at your disposal.
In MTP mode, the device isn't using the ID3 tags, but instead is given this information when added to the device (typically the program feeding the information *does* pull this from the ID3 tags). So when using the mtp-tools, you'll have to pass the meta data for tracks or albums along with the file.
This was a bit buggy for me, but you can try. Using mtpfs (uses FUSE) you can mount your device in MTP mode and browse like any other file system
Mount:
sudo mtpfs -o allow_other /media/SansaView
Unmount:
sudo fusermount -u /media/SansaView
Although Amarok, Banshee, and Rhythmbox all supported the Sansa View in MTP mode, Amarok was the only one I could get to manage a playlist properly. Since I prefer Rhythmbox and am not going to switch just for playlist support, I haven't tested it any further, however, Amarok seems to provide the best support for the Sansa View in Ubuntu. Install it using:
sudo aptitude install amarok
It would be pretty easy to write a script to convert your .m3u or .pla playlists using mtp-tools (mtp-playlists mtp-newplaylist and mtp-delfile). I started writing my own application for MTP devices--specifically my Sansa View. Read below...
I'm working on a GUI media organizer as a front end to libmtp... which you can see below:

This project was only started a few days ago at the time of writing, and so it is still in very early development. However, I expect to have some files posted on sourceforge within a couple weeks. Email me if you would like to be emailed when some beta source is available and you can help me test it.
If you want to keep up, the project page is here: MOrganize
Categories
Popular Posts
RSS Feeds
Archives
May 22nd, 2008 at 7:04 pm
I was thinking of getting that player myself. I'll rethink my choice now :/
May 26th, 2008 at 6:31 pm
The best app I've found for managing MTP devices in linux is Gnomad2, which written by one of the libmtp developers. http://gnomad2.sf.net
June 8th, 2008 at 12:48 pm
I've also just bought this mp3 as it was the best mp3 player that met our requirements, i only use linux so this has been very helpful indeed!
Thanks.
June 14th, 2008 at 5:37 am
Thank you for all the supplied information - this page was a real help to get me up and running with my new Sansa View.
One thing you might want to add: (When in MSC-mode) *ALWAYS* "umount -l" && "eject" the sansa before disconnecting. I used to be very careful and click on 'unmount filesystem' in pcmanfm, but apparantly this wasn't enough: my database refresh rarely succeeded and I thought my player was broken. Now it seems that I'm able to rebuild my database like it should.
July 2nd, 2008 at 8:49 pm
[...] solution didn’t actually turn out to be that bad. As I found out on this blog, the solution wasn’t that bad at all under ubuntu. All it really took was… well [...]
July 5th, 2008 at 6:52 pm
Thank you very much for your excellent to-the-point information!
Did you look at the video options as well?
July 13th, 2008 at 12:54 pm
When is MOrganize being published?
August 5th, 2008 at 5:32 am
Nicely done. I don't have a View, but I do have an e200 series player. Most, if not all, of what you have here will relate to the e200 series, too. One comment I would make is the use of ID3v2.3 ISO-8859-1 ID3 tags is preferable to ID3v2.3 UTF-16 tags with the e200 series. This is because the ISO tags do a better job when it comes to playing tracks in proper sequence, as in audio books. The same might or might not apply to the View.
September 2nd, 2008 at 2:28 pm
isnt MTP = Media Transfer Protocol ?
September 5th, 2008 at 8:28 am
Yes, MTP is Media Transfer Protocol. See http://en.wikipedia.org/wiki/Media_Transfer_Protocol
September 11th, 2008 at 10:30 pm
Hi Micah,
Just wanted to say thanks on the great how to, saved me lots of time and effort.
I'd love to get my claws on MOrganize and volunteer to help out with testing. I'm a newbie to Ubuntu but have many years of sw development experience and want to start learning how things are done in gnome/linux.
Thanks,
Dan
September 17th, 2008 at 7:03 am
Dan,
I was just looking at MOrganize today wishing I had time to finish it. I'm really striving to get that done (as I need it badly too!)
If you can send me an email, I'll get you involved in testing when I'm ready to start posting code. Alternatively, you can track the progress at morganize.sourceforge.net
October 9th, 2008 at 5:08 am
Thanks for this how-to Micah. Do you know how to make the Sansa View 32GB work on Ubuntu? I tried some of what you said (beginning part) but to no avail.
November 5th, 2008 at 5:19 pm
Thanks Vincent for your comment. I also tought that my files or player was broken until I realised that the library doesn't refresh properly. Actually you can't see if your library has updated succesfully or not. When you remove your sansa, if the player update for a second or two and then suddenly shutdow, you will know that the update is bad. If it stays open, the update is good. But I didn't figure out how to do both umount -l and eject. For exemple, my player is mounted in "/media/Sansa\ view" If I do umount -l "/media/Sansa\ view", I cannot do eject "/media/Sansa\ view" after that. Anyways, umount -l alone seems to do the trick.
Another thing, is there somebody who know how to get special character display properly, like "é" or "è". Actually, they display as squares. I think that using easytag to change the tags encoding or id3 version may do the job but i'm not sure on how to do it?
November 11th, 2008 at 1:27 pm
I also have a SanDisk Sansa MP3 player and the lack of IDv2 2.3 tags in Gstreamer was annoying me. So I wrote a GStreamer plugin that provides IDv2 2.3. If you want you can compile it and install it. You can find the source code of the plugin in here:
http://bugzilla.gnome.org/show_bug.cgi?id=459226
The advantage of this plugin is that we can use the built-in MP3 encoder (sound-juicer) and encode the MP3s directly without having to retag them.
Feel free to contact me by email for instructions on how to build and use the plugin. If you like the plugin please add a comment to the bugzilla, this way the plugin could end up in the next Ubuntu. It's truly a pity that IDv2 2.3 is not supported in Gstreamer.
November 16th, 2008 at 6:24 pm
Help...My Sansa View 32GB Does not recognize playlists. I have 2 other ones - 8GB that recognize them fine but the Sansa View 32GB mangles playlists, puts the wrong songs in them, and even erases them for no apparent reason.
It is a total disaster as an MP3 player and I strongly urge everyone not to buy one ever - under any circumstances.
December 20th, 2008 at 4:15 am
Thank you, this was most useful! :-)
January 13th, 2009 at 7:43 am
Thanks for this info. I have a sansa e280. I was not able to get it to mount. How on earth did you figure out it was necessary to first put the device into HOLD and to push the left button for a while in order to get it to mount? Perhaps a more pertinent question is WHY on earth did Sandisk make such a round-about procedure necessary in the first place? Strange.
Anyway... very happy to have my device connected to Ubuntu 8.10
Cheers,
Jonathan
January 18th, 2009 at 11:21 am
Hi, I hope you are very well. Thanks for your post. I followed your steps and all they work.
However, you have already in repositories Gnomad2, this tools allow you to connect to your Sansa View without having to press hold when u turn player on.
It works automatically, and I also got it working automatically in Amarok, I just added sansa as MTP device.
So having MTP installed is the only requirement, the other ones are tricks, and kind of dangerous since if you delete system files in sansa view, i guess it will make device not operating.
Cheers,
Abelardo
January 19th, 2009 at 6:54 pm
Thanks for the article!
There is actually a way to use MSC mode and get playlists:
http://www.mazleg.com/sansa/
Haven't tried it yet but it looks promising. Hope this helps someone!
April 27th, 2009 at 6:31 pm
I've got a sansa view 8Gb and i could not recommend it. The problems i have with it are many. It's just usable, but my level of frustration with it is high.
April 28th, 2009 at 6:28 pm
Do you have any comments on loading audiobooks onto a 16g view? I can load them but they end up in the music file, and yes I'm using Ubuntu
May 14th, 2009 at 7:12 am
Thank you!
Been butting on my head on this for awhile now.
September 22nd, 2009 at 6:00 am
Hi,
I followed the steps to make the player work as MSC mode. It did OK at the first time.
But after that, It won't mount anymore.
I would appreciate some help!