Linux Tools

First mount the drive in Linux. Use a new kernel (>= 2.4.13). You need CONFIG_USB_STORAGE and CONFIG_USB_STORAGE_ISD200 compiled in or as modules (Note: if you have a red PhatBox, you probably have a ScanLogic cradle that requires a driver patch, email me). I mount the two partitions in /mnt/phatsys and /mnt/phatdata. The following programs use those as defaults. My /etc/fstab has:

  /dev/sda1 /mnt/phatsys  vfat noauto,owner,user 0 0
  /dev/sda5 /mnt/phatdata vfat noauto,owner,user 0 0
  
After that's working you can use the following scripts to administer the playlists:

pls2phat -f (pls or m3u file) -n (playlist name) -p (playlist number)
This will turn your pls or m3u file into a PhatBox playlist. The playlist number should be 1 less than you'd expected to be on the head unit. Disc 1 is playlist 0. Use -o to overwrite a list, -a to append to a list.

impdir (directory)
For each file in (directory) it will prompt which playlist to append to, then MOVE it to the cartridge.

vrfydisk
No arguments - will check for duplicate or missing files in playlists. Will execute any pX.sh file to create a dynamic playlist. Will update num_tracks in each .pbx file (if this isn't updated, new tracks won't show up!). This also updates num_discs in Profiles.ini, and writes out the num_tracks.db files. I run this right before ejecting the cartridge, just before plsign. It calls fixdiscs.pl and write_num_tracks (C source), which I couldn't write in bash.

setmodification
No arguments - will update the modification= flag in /mnt/phatsys/phatbox.ini. This is called by some of the other scripts.

plsign
No arguments. You need to get the signing utility (seems to be down) from PhatNoise, rename it to plsign, and put it in your path. Run this before ejecting and it will update the playlist signatures.

builddb
No arguments. This will build the tracks.db, artist.db, and genre.db files needed for an SSA head unit (BMW,Audi,etc...). This uses id3tool and mp3header which can be found on freshmeat. To get the track numbers from id3tool, I applied this diff.

mktts
No arguments. This needs AT&T Natural Voices, or text2wave from the Festival/mbrola program if AT&T is not found. This generates the voice prompt files used by an SSA head unit. The AT&T voice sounds very good, better than the default voices the PhatNoise Windows program uses (which also uses AT&T if found - retail versions now ship with AT&T), but costs money. text2wave is free.

build_idx.c
Optional arguments: the basepath of your PHTDTA partition, and the profile to use. This will create the "index" files for the various browsing modes, greatly increasing performance in the car. Read through the file for information about the program and the specification of the index files. It should then compile on any ANSI-C system with 32-bit ints. If you don't use this, you should delete tracks.idx from the PHTDTA root directory.

Be sure to unmount the cartridge before pulling it out! Also, go ahead and look through the programs before you run them. Send me bugs, bug fixes, and questions.

id3tool-1.1f.tar.gz
mp3header-1.0.tar.gz