preloadingpreloadingpreloadingpreloading
Startseite > Software > MD9781 MP3-Player

MD9781 MP3-Player

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 another USB vendor- and product-id a small patch to the program wasnecassary.

2003-06-10: New version 0.3.1 -

  • I have finally added all patches from Dietrich Rothe.
  • When you use the Debian package the hotplug-script will be installed automaticly

2003-03-24: New version 0.3 -

  • applied several patches (most of them from Dietrich Rothe),
  • error correction after communication failure,
  • fixed problem when deleting large files,
  • added format function,
  • 3 percent of uploads used to fail - fixed,
  • Debian package available,
  • I have splitted the program into the md9781library and the md9781-managerfrontend

2003-02-08: New version 0.2.2 - fix some bugs that causedSEGFAULTS, you can now upload and delete multiple files with onecommand

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

In December 2002 a large German trade chain sold this portableMP3-player for a very good price. Since I use Linux I looked for adriver to upload and download files to the player. But the deviceuses a vendor specific protocol so none of the existing driversworked. 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 thedevice by the name "RipFlash PLUS". Their player hasmore memory (128MB) but the Medion player costs only half. :-)

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

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

  • list the files on the player
  • delete a file from the player
  • upload a file to the player
  • download a file from the player - btw: the manual says that's impossible... ;-)
  • format player's internal and external memory

Download

The MD9781-manager can be downloaded here: http://www.zedlitz.de/md9781/

Installation

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:

  • run md9781-manager as root - bad
  • have the line usbdevfs /proc/bus/usb usbdevfs devmode=0666 0 0 in /etc/fstab - also bad (now every user on the system can write to any file in the proc usb tree
  • try this little skript (create it as root in the directory "/etc/hotplug/usb") and let the hotplug daemon do the work

#!/bin/sh# # /etc/hotplug/usb/md9781#chgrp users $DEVICEchmod 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 -l

You should see a list of all files in theplayers internal memory.

Some examples how to use md9781-manager:

The "-e" option tells the program to use the external smartmediacard 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 filesystem so the filename will be truncated after the first 8characters. If you want the file on the player of have a differentname (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 thecurrent directory. It will be called like it was on the player.

Dietrich Rothe (dietrich@d-rothe.de) send me a patch that makethe 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