This is ylink, a yampp-link tool for Linux.

To build on Linux:

  ./mk

For help output:

  ylink      (or ./ylink if '.' isn't in your PATH)

Some example commands:

  ylink ping
  ylink dir
  ylink put out.mp3 : dir
  ylink del 0 : put new.mp3

And for editing playlists:

  ylink plget
  emacs playlist.txt
  ylink plput

And so on.  

The documentation below is pulled from the 'ylink' command help
output, and the top of the ylink.c source file.  Major limitations of
this version of ylink are listed near the bottom.

Jim

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

ylink: Yampp MP3 player link tool, version 0.9.0

Copyright (c) 2003 Jim Peters <http://uazu.net/>, all rights reserved.  
Released under the GNU GPL version 2; see file COPYING for details.
See http://uazu.net/yampp/ for latest ylink version, and http://yampp.com/
for details of Yampp hardware, firmware and other Yampp-related software.

Usage: ylink [options] <command> <args> [ : <command> ... ]

Options:
  -d <name>             Use device <name> instead of /dev/ttyUSB0
  -v                    Verbose

Simple commands:
  :                     Command separator, to execute several commands in one go
  ping                  Check that the yampp is on and working; also useful to
                          return it to normal operation after a command failure
  dir                   List all the songs on the yampp
  put <file> ....       Write one or more MP3 files onto the player
  get <num> ...         Read one or more songs from the player into the current
                          directory by their song numbers
  del <num>             Delete one or more songs from the player by song number
  plget                 Read the playlists into 'playlist.txt' for editing
  plput                 Write the data from 'playlist.txt' back to the player
  format <name>         Format the player disk in YADL format with the given
                          name; requires that the firmware has already filled
                          in the root sector.
Advanced commands:
  info                  Dump out the player's root sector information
  dump                  Dump out the root sector, songbase, FAT and playlist
                          information in full, for debugging
  zeroroot              Zeros the disk root sector.  This forces the yampp
                          firmware to reinitialise the root sector.  This can
                          be used before a 'format' to completely reinitialise
                          the disk from scratch.
  upload-fw <bin-file>  Upload firmware first time, using yboot boot-loader
                          (boot yampp with buttons 3+4 held down)
  reload-fw <bin-file>  Upload new firmware assuming yampp firmware is already
                          installed and running
  yboot-ping            Ping used when in yboot mode
  yboot-esc             Exit from yboot mode, i.e. boot firmware

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

//
//	Yampp player link tool
//
//        Copyright (c) 2003 Jim Peters <http://uazu.net/>.  Released
//        under the GNU GPL version 2 as published by the Free
//        Software Foundation.  See the file COPYING for details, or
//        visit <http://www.gnu.org/copyleft/gpl.html>.
//
//	For more details on the Yampp MP3 players, see:
//
//	  http://yampp.com/
//
//	On Linux, you need to get the correct FTDI USB drivers for
//	your Linux kernel enabled and compiled in if they aren't
//	already.  These come with modern kernel sources (later 2.4.*),
//	so it is just a configuration option change: enable
//	Experimental Features (under "Code maturity level options"),
//	go to USB, enable USB Serial Convertor Support, enable FTDI,
//	and rebuild, install, reboot.  You might also need to run
//	"/dev/MAKEDEV usb" to create the correct /dev/ttyUSB* device
//	files.  After all this is done, plugging in the yampp USB
//	connection should result in a message appearing in the syslog,
//	something like "FTDI 8U232AM converter now attached to
//	ttyUSB0".  If this quick-howto of mine hasn't helped, you'll
//	need to consult all the relevant Linux HOWTOs for each stage
//	to figure out what you need to do.
//

#define VERSION "0.9.0"

//
//	Editing playlists
//	-----------------
//
//	By default all newly 'put' MP3s are added to playlist 0.  If
//	you want to adjust this, do a 'plget', and edit the resulting
//	playlist.txt file.  You can create new playlists by adding
//	another @name line and cutting/copying/pasting some songs
//	below it.  The song names are for your information only --
//	actually it is only the song numbers that are taken account
//	of.  If there are songs on the yampp that aren't in the
//	playlist, you can add them just by using the song number on a
//	line by itself.  Once you have the playlists as you want them,
//	use 'plput' to load your new playlists into the yampp.
//

//
//	Filenames
//	---------
//
//	When looking for artist and title in a filename, first ylink
//	looks for '--' or '__' or ' ' as a separator.  Otherwise it
//	looks for '-' or '_' or ' ', and takes the remainder to be the
//	title.  When loading an MP3 back off the player, it uses '--'
//	as the separator.
//
	
//
//	Possible improvments
//	--------------------
//
//	- No attempt is made currently to extract information from the
//	MP3 file.  The song-length is set to 5 minutes, and the
//	bit-rate to 120kbps.  This doesn't matter unless you have an
//	LCD on your player.  This info could all be picked up when
//	copying the MP3 data across.
//
//	- At the moment the yampp link is brought up and down each
//	time the 'ylink' command is issued.  It could be left up
//	(i.e. without giving a USB_EXIT_LINK command) between
//	invocations of ylink, with a special 'ylink exit' command to
//	return the yampp to normal operation.
//
//	- 'ylink' loads up the songbase, FAT and playlists every time
//	it runs.  This could be very slow on hard drive yampps.  This
//	information could be cached and stored locally in a temporary
//	file between invocations of 'ylink', reloading only if the
//	yampp has a different root sector to what is expected.
//
//	- It might be useful to do retries if a yampp command fails.
//	However, I've never had this problem, even with 55MB MP3
//	downloads to the player.  Once it is on and listening okay,
//	everything seems to go fine (i.e. sometimes it takes a couple
//	of pings before the yampp is in the right mode and ready, but
//	after that, no problem).
//
//	- It would be good to not rewrite the playlist/etc so many
//	times when putting a list of MP3s onto the device.  But this
//	was judged to be better than losing the lot if there was a
//	communication failure.
//
//	- Maybe add commands to support scripting better, or sort the
//	songbase (or listing) into artist/title order.
//

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
