Rockbox, the Sansa e260, Mac OS X, and me

 e200, e240, e260, e280, fat-16, fat-32, mac, microsd, microsdhc, os x, rockbox, sansa  Comments Off on Rockbox, the Sansa e260, Mac OS X, and me
Jun 252008

Apple iPod Nano 2G Woe. My iPod Nano 1 GB is full. It is full of songs, and can’t hold one more. I’ve done everything I can to alleviate the situation, deleted random songs, albums, and podcasts, but to no avail. Clearly, the only proper solution is to get an iPhone. Because, you know, the iPhone has more storage space on it. That’s why I need one. But the iJuju will have to wait for my checkbook to reach Apple-compatible levels, no matter how many rationalizations I come up with for buying one.

Sansa e260 So, as a sort of nicotine patch for my iHabit, I recently bought a “throwaway” MP3 player, a refurbished Sansa e260 MP3 player ($45 including shipping from The e260 is a 4 GB iClone, with a shape, size, color, and button layout that are remarkably similar to my Nano, with the following exceptions–the e260:

  • Is about twice as thick as the Nano.
  • Is much heavier; 2.7 ounces versus the Nano’s featherlight 1.4.
  • Has a slightly larger screen, at 1.8″ diagonal 176 x 220 pixels, as compared to the Nano’s 1.5″ diagonal 176 x 132 screen. That’s enough to make Solitaire much easier to see on the e260.
  • Has the Play / Pause and Menu buttons reversed.
  • Has a light-up scroll wheel that actually turns.
  • Has an FM tuner.
  • Has a replaceable batter.
  • Has a slot for a microSD card, so that additional songs and videos can be stored there. Scroll down to read more about this.

It is otherwise a very faithful (if less elegant) replication of the second-generation Nano.

Overall, I am surprised and delighted to say that the e260, particularly when combined with the remarkable Rockbox F/OSS upgrade, is a great little player. With Rockbox installed, it can do everything the Nano can do, plus a lot more. My favorite things to do are to listen to a random selection of jazz while playing “Xobox” (a Qix clone), “Jewels” (a Bejeweled clone), or good old Solitaire. I can even play Doom, though the screen is a bit small to see exactly what’s going on.

There are, however, some major caveats.

Caveat #1: Officially, the e260 isn’t Mac-compatible. Sansa makes it extremely clear that the e200 series (which includes the e250, e260, e270, and e280, but no actual e200) are in no way compatible with Macintoshes, and that even contemplating putting both in the same room will lead to mass panic, fire in the skies, cats and dogs living together, and a world-ending event that would put the Large Hadron Collider to shame. Which is, of course, an open invitation to us Mac people to find out for ourselves. Clearly, the e260 appears to be a USB drive to Windows, so it probably will do the same for Macs, yes? Well, yes. Sort of. More about that under Caveat #3. (Note that there is a similar yet different e200R series, of which I know little except that they need additional tweaking to support Rockbox. And that they’re not Mac-compatible either.)

Caveat #2: You’re on your own. Which is to say, all the handy and useful Sansa utilties are Windows-only. For us iHeads, that’s business as usual, and no reason to get excited. Some sort of Windows capability (dual-boot via Boot Camp, virtualized Windows via Parallels or VMWare Fusion, etc.) is needed to run the Sansa utilities, mostly just to upgrade the e260’s firmware to the latest version. For Mac users who are comfortable with the UNIX command line, everything else can be done via the Mac. So, if you don’t care that your Sansa has old firmware, you can get by without needing Windows at all.

Caveat #3: The e260 does indeed show up as a removable USB drive on the Mac (on the Desktop as “Sansa e260” and on the command line as /Volumes/Sansa e260), but it takes a little futzing. If you go into the Settings menu on the e260, there is a “USB Mode” setting, which by default is set to the Windows-friendly but Mac-hostile “MTP” mode. To work with a Mac, it needs to be set to “MSC” mode. In fact, my experience has been that both modes need to be used to get a reliable connection between my Mac and the Sansa. Here’s the dance that always works for me:

  1. Before connecting the USB cable between the Mac and Sansa, power up the Sansa. (If you’ve installed Rockbox, be sure to press and hold the “<<" button while pressing the Power button. Don't let the Sansa automatically turn itself on when you connect the USB cable. This is a complex tango and the Sansa will refuse to cooperate if you don't follow each step precisely and in order.)
  2. On the Sansa, go to “Settings”, then “USB Mode”, and select “MTP” (yes, the one that doesn’t work). Press the “Menu” button to leave “Settings”.
  3. Connect the Mac and Sansa with the USB cable.
  4. Wait a few seconds for nothing to happen. The Sansa will show “Connected”, but it won’t show up on the Mac.
  5. Unplug the USB cable.
  6. On the Sansa, go to “Settings”, then “USB Mode”, and select “MSC”. Press the “Menu” button to leave “Settings”.
  7. Connect the Mac and Sansa with the USB cable.
  8. Wait a few seconds. The Sansa should show “Connected”, then “Writing”. It’ll show “Writing” for the rest of the time it is connected. The “Sansa e260” removable drive should show up on the Mac’s Desktop. If this doesn’t happen, start over from step 1. Don’t skip any steps.
  9. Drag files from the Mac to the Sansa drive, music into the “MUSIC” folder, photos into the “PHOTO” folder, videos into the “VIDEO” folder.
  10. When done, use the “Eject” icon next to the “Sansa e260” icon in the Finder on the Mac to close down the connection.
  11. Disconnect the USB cable.
  12. The Sansa will probably restart and then do its “Refresh Database” navel-gazing.

Caveat #4: The Sansa really likes to do a “Refresh Database” operation every single time you add or delete any files from it. Every single time. The e260 will start up, show the “Refresh Database” window with a progress bar below it, and slowly do the update. Once you’ve got a few gigs of stuff on it, this will take over a minute. And will quickly transform from cute quirk into an annoying time-waster.

Caveat #5: Music from the iTunes store? Officially, no. You can transfer songs from the iTunes Store to your iPod, but not to the Sansa, because they’re in a M4P or M4A format that the Sansa can’t handle, and because they’re encrypted to protect them from Music Pirates, yarrr. However, the Sansa can handle standard MP3 files, and there are ways to convert the iTunes songs into generic MP3s. (Hint: iTunes can be set to burn playlists of songs onto a standard audio CD. This can be a good way to safeguard your iTunes investment by making a safety backup of your purchases. iTunes can also be set to import standard audio CDs into generic MP3 files. And those generic MP3 files can be copied from iTunes to other places on the Mac, like, say, removeable USB drives.)

Rockbox So, with the Sansa caveats out of the way, it’s time to look at Rockbox. Rockbox is, like many F/OSS efforts, both amazing and frustrating. It works very well, has a ton of features, and has a user interface that takes a bit of getting used to. Here are a few important things to know about the combination of the Sansa e200 series, Rockbox, and the Mac:

  • It’s easiest to use the Rockbox installer / utility and do a complete installation of Rockbox rather than to download the latest build of Rockbox itself and install it by hand. The installer will download and correctly install all of the zillion and one bits that make up the Rockbox universe, including all the themes (skins), fonts, games, everything. You can do this by hand on the Mac, but you’ll be downloading, unzipping, and copying a lot of files. The Windows version of the utility seems to work a little better than the Mac version, but they both get the job done.
  • Once you’ve installed Rockbox, the original Sansa firmware will still be on the e260. Rockbox doesn’t overwrite it, but does a sort of Boot Camp type of dual-boot. To cause the Sansa to bypass Rockbox and run normally do this:
    • Press the Power button to turn the Sansa off.
    • Press and hold the “<<" (Previous or Left) button.
    • While continuing to hold the “<<" button, press the Power button. The Sansa's screen will show the SanDisk logo, then turn white, then show a bunch of techie-looking text starting with "Rockbox boot loader", then will start up normally.
    • Release both the “<<" and Power buttons.

  • Rockbox is playlist oriented. Every time you select a song, Rockbox creates a playlist on the fly made up of the album that the song is part of. You can add songs to playlists and save the playlists right on the Sansa, but it’s kind of a pain to do. However, it is possible to create playlists using the Mac.
  • Rockbox uses the very simple text-based M3U format for playlists. Essentially, the M3U playlist file is just a list of filenames, one filename per line. You can edit an M3U playlist in TextEdit. The contents will look something like this:
    ./MUSIC/Eagles/Their Greatest Hits/Eagles—Tequila-Sunrise.mp3
    ./MUSIC/OMC/How Bizzare/02 How Bizarre (Mix).mp3
    ./MUSIC/Denis Leary/No Cure for Cancer/03 A_____e.mp3
    ./MUSIC/Elvis Costello/My Aim Is True/Elvis-Costello—-The-Angels-Wanna-Wear-My
  • To create a “master” playlist which contains every song on your Sansa, you can do this:
    • Start the Terminal app.
    • Type the following into Terminal, substituting “e240” or “e280” for “e260” if you have a different model, and be careful to include the quotes and to make sure that the slashes all tilt the right way:
    • cd “/Volumes/Sansa e260”
      find . -name “*.mp3” > all.m3u
      find . -name “*.MP3” >> all.m3u

  • Now you can use the Finder to make copies of “all.m3u” (make sure to create the copies in the same folder on the Sansa as the “all.m3u” file, and not on the Mac), and edit the copies with TextEdit. For example, you can make a copy and call it “jazz.m3u”, then edit the “jazz.m3u” copy in TextEdit and delete all the songs from it that are not jazz. You can make similar copies for different musical genres, country, world music, whatever. Just be sure to edit the copies and to not edit the original “all.m3u”.
  • To edit the M3U files in TextEdit, DO NOT double-click on them. This will open them in iTunes, which will take forever and will cause iTunes to attempt to import all the songs. Instead, right-click or cntl-click on the M3U file to bring up the pop-up menu, then select “Open With”. Select “Other…”, and choose TextEdit. You’ll need to do this with every file, since the Mac is convinced that M3U files should be opened with iTunes, even if you click on the “Always Open With” box.
  • Note that you’ll need to recreate the “all.m3u” file each time you add new music to your Sansa. And you’ll need to copy and paste the new songs from the “all.m3u” files to the appropriate playlists.
  • You might think, “Wait a second. iTunes can export playlists, even as text files. Why can’t I just use my iTunes playlists instead of going through all this hassle?” Well, the problem is that iTunes can’t export an M3U format playlist. And the other problem is even if you use one of the iTunes-M3U translation apps out there, you’ll still need to hand-edit the resulting M3U files to fix the pathnames of the files, since they’ll have the Mac pathnames instead of the Sansa pathnames. And the other other problem is that if you use the workaround hinted at in Caveat #5, the track numbers embedded in the filenames won’t match up between the Mac and the Sansa, so you’ll have to hand-edit those as well. By the time you do all that editing, you might as well do it this way. Once you’ve done it a couple of times, it is easy, if a little tedious.
  • To play your newly created playlists in Rockbox, you need to do something a little odd. Don’t select “Playlists” from the main menu, as you might expect to do. Rather, select “Files”. Scroll down to the M3U playlist file that you want to listen to, and click the Select button. Rockbox will immediately start playing the first song in the playlist. You can press the Menu button and turn Shuffle and Repeat modes on if you want.
  • You can also go to the “Plugins” menu, then “Games”, and then play a game like Solitaire or Jewels while your music continues to play. (Hint: In Solitaire, to get the next card from the deck, press the “Record” button on the side of the Sansa. Everything else is done with the front buttons and scrollwheel.)
  • Rockbox is highly configurable. You can change the theme (or skin), fonts, and just about everything else. But be prepared to edit some configuration files to really tweak your Rockbox settings. The most important one is in /Volumes/Sansa e260/.rockbox and is called “config.cfg”. If you want to change the background image under Rockbox (to, say, a picture of your dogs or kids), you’ll need to edit this file, and you’ll need to use Terminal to get to it, since the “.rockbox” folder won’t show up in the Finder. You’ll also need to resize or crop the picture to exactly 176 x 220 (176 pixels wide by 220 tall) and save it as a BMP file on the Sansa. You can do this in Preview or another photo editing app. Then add or change this line in “config.cfg” to reflect the name and location of your picture:
    backdrop: /cutepups.bmp

Kingston 2 GB microSD card and USB AdapterThe Sansa e200 series comes with a microSD card slot. I purchased a Kingston 2 GB microSD card (which came with a USB adapter for the card), plus a SanDisk 4 GB microSDHC card to see how the Sansa handles them.

You can put additional music or videos on a microSD or microSDHC card and play them in the Sansa player. This capacity of the cards supported by this slot appears to be a source of great confusion. I’ve read that some versions of the e200 series can only support microSD cards that are 2 GB in capacity or smaller, while newer versions can support the larger microSDHC cards. I’ve also read that using Rockbox gives all of the e200 versions the ability to handle the microSDHC cards. Here’s my experience so far:

Card Capacity 2 GB 2 GB 4 GB
Card Format FAT-16 FAT-32 FAT-32
Card Type microSD microSD microSDHC
Mac Can Read/Write Card via Kingston microSD USB Adapter? Yes Yes Yes
Sansa Can See Card? Yes Yes NO
Sansa Can Play Music From Card? Yes Yes NO
Mac Can Read/Write It via Sansa USB Cable ? Yes Yes (If card is inserted after Mac “sees” Sansa) NO
Rockbox Can See Card? Yes Yes Yes
Rockbox Can Read Card? Yes Yes Yes
Rockbox Can Write Files To Card? Yes Yes Yes

I have a “version 1” e260 (as opposed to the newer e200R and “version 2” series). When i put a 2 GB microSD card into the e260 and connect it to my Mac via USB, I see two disks show up: “Sansa e260” (the e260’s built-in flash drive) and “NO NAME” (the microSD card). The disks appear to be similar except that “Sansa e260” is 4 GB in size and “NO NAME” is 2 GB.

Here’s the important difference: When I click on “Get Info” for “Sansa e260”, it is reported as FAT-32 format. This is the Microsoft format that was used in Windows 95 and newer versions of Windows. FAT-32 formatted disks can be up to 2 terabytes in size. However, “NO NAME” is reported as FAT-16 format, and FAT-16 disks can only be 2 GB in size or less.

So, does the Sansa only support FAT-16 formatted microSD cards? Yes and no.

As an experiment, I connected “NO NAME” directly to my computer via the Kingston microSD USB adapter, and reformatted it as FAT-32. Then I copied some music onto it, disconnected it from the computer, and plugged it back into the e260. The e260 was still able to read FAT-32-formatted “NO NAME” and could play the songs on it. However, when I connected the e260 to my computer via its USB adapter, it would lock up and wouldn’t show up on my computer. But when I inserted “NO NAME” into the e260 after the e260 was already connected to the computer and “Sansa e260” was showing up on the computer’s desktop, then “NO NAME” showed up, and I could copy files to it just fine.

So, in other words, if a 2 GB microSD card is FAT-16 formatted, the e260 handles it just fine. If the 2 GB microSD card is FAT-32 formatted, the e260 almost handles it just fine, except during the initial handhaking when connecting to a computer via the Sansa USB cable.

This leads me to believe that the (“version 1”, at least) Sansa e200 series can’t support the larger microSDHC cards, not because they’re larger, but because they aren’t FAT-16 formatted (nor can the cards be, since they’re too big for FAT-16). Rather, my guess is that it almost supports them, because it mostly (but not quite totally) supports FAT-32. It possibly can read them and play music and videos on them. It possibly can show them on a connected computer’s desktop if they’re inserted into the e200 after it is connected to the computer.

Now, when I put a true microSDHC 4 GB card (which is of course formatted FAT-32 because it is too big for FAT-16) into the Sansa, the Sansa doesn’t see the 4 GB card at all. It acts as if the card simply isn’t there.

As for Rockbox and the 2 GB microSD card, everything works fine. I can create M3U playlist files at the top of the “NO NAME” disk exactly like I can for “Sansa e260” and Rockbox sees them and plays them:

cd “/Volumes/NO NAME”
find . -name “*.mp3” > noname.m3u
find . -name “*.MP3” >> noname.m3u

The only oddity is that Rockbox’s “Files” app ignores the volume name “NO NAME” and instead displays the disk as “<microsd1>”.

The same is true for Rockbox and the 4 GB microSDHC card. Rockbox sees the card, can play music from the card, and can even write files to the card. (Note: since the Sansa can’t use Rockbox during USB transfers to and from the Mac, the Sansa can’t be used to copy music or video files to the microSDHC card–the microSD USB Adapter must be used for that.)

Overall, the 2 GB microSD card is quite useful, since I can connect it directly to my computer and quickly copy files to it without involving the Sansa (or the Sansa’s need to do the full “Refresh Database” process every time I copy over a single file). The 4 GB microSDHC card is almost as useful, but is slightly limited since the Sansa in native (non-Rockbox) mode can’t use it. However, I rarely use the Sansa in native mode, since Rockbox makes the Sansa so much more versatile–and Rockbox accesses the microSDHC card just fine.

And that’s it. There’s some hassle involved, but in the end the Sansa e260 and Rockbox can be used with the Mac, and will have all the capabilities of the iPod Nano plus a lot more, for a fraction of the price.

 Posted by at 5:54 AM