[ Project page ] [ Download ]

Using the Medion MD9781 MP3-Player with Linux

2003-06-11: MD6242
A new version of the mp3-player (called MD6242) is available. It seems to use the same protocol as the MD9781. Since it uses an other USB vendor- and product-id a small patch to the program was necassary.

2003-06-10: New version 0.3.1 -



2003-03-24: New version 0.3 -



2003-02-08: New version 0.2.2 - fix some bugs that caused SEGFAULTS, you can now upload and delete multiple files with one command

2003-01-14: New version 0.2 - support for long filenames

In December 2002 a large German trade chain sold this portable MP3-player for a very good price. Since I use Linux I looked for a driver to upload and download files to the player. But the device uses a vendor specific protocol so none of the existing drivers worked. So I decided to write my own...

Medion sells the player with 64MB internal memory by the name "MD-9781 Tragbarer MP3-Player-/Recorder". PoGo Products sells the device by the name "RipFlash PLUS" http://www.pogoproducts.com/ripflash_plus.htmlTheir player has more memory (128MB) but the Medion player costs only half. :-)

The USB vendor ID of the device is 0x4e8 that means the chip is from Samsung. The product ID is 0x1003.

I have analysed the protocol used for communication with the player and wrote my own program "md9781-manager" that implements the most important parts of the protocol:



Download

The MD9781-manager can be downloaded here: http://sourceforge.net/project/showfiles.php?group_id=91624

Installation

===========================================================================

    USE THIS SOFTWARE AT YOUR OWN RISK.  I TAKE NO RESPONSIBILITY
    FOR ANY DAMAGE THAT MAY RESULT FROM USING THIS SOFTWARE.

============================================================================

To use the md9781-manager you need a kernel with USB support configured. A simple check (with the device plugged in):

grep Vendor /proc/bus/usb/devices

You should see a line that begins with "Vendor=04e8." (or 0xaa9 if you own the MD6242)

You also need the libusb shared library. Most distributions already include it. If you do not have it it can be found at http://libusb.sourceforge.net/download.html

If everything works installing the program should be as easy as:

tar xvfz md9781manager_0.3.1-3.tar.gz
cd md9781manager-0.3.1/
./configure
make
make install   # (optional - this copies the md9781-manager binary \
to /usr/local/bin/ - you can specify an other location with ./configure --prefix=... )

The access rights for the usb device file (/prc/bus/usb/001/xxx) are a little bit tricky. Usually only root is allowed to write to the file. There are several ways to solve this problem:



#!/bin/sh
# 
# /etc/hotplug/usb/md9781
#
chgrp users $DEVICE
chmod g+w $DEVICE

You will have to add the line (important: this is one line, no breaks)

md9781 0x0003 0x04e8 0x1003 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
to /etc/hotplub/usb.usermap to tell the hotplug daemon to call the skript (don't forget to make it executeable).

Usage

Now give it a shot: md9781-manager -lYou should see a list of all files in the players internal memory.

Some examples how to use md9781-manager:

The "-e" option tells the program to use the external smartmedia card of the player. List of all files on the card: md9781-manager -e -d

To delete the second file from the player: md9781-manager -d 2

Delete the third track from the smartmedia card: md9781-manager -e -d 3

Put a song to the player: md9781-manager -p my_song.mp3. The player uses a FAT file system so the filename will be truncated after the first 8 characters. If you want the file on the player of have a different name (i.e. to avoid ambiguous names) use md9781-manager -p my_song.mp3 other.

To get the first file from the player: md9781-manager -g 1. This will save the file in the current directory. It will be called like it was on the player.

Dietrich Rothe (dietrich@d-rothe.de) send me a patch that make the usage of the program easier:

  1. with "-p" you can upload multiple files
  2. "-d" and "-g" accept a range-list with multiple numbers:
    for example -d -3,4,20-40,49-deletes files 1,2,3, file #4, 20 to 40, and all files having a number greater than (including) 49

HAVE FUN --- Jesper

This project is hosted on SourceForge Logo -- visit the project page