· How do I send and receive files from the player?
(Entry last updated on February 18th, 2014)
If you want to make modifications to the files stored on the player, you'll need to know how to get them from the player and send them back again. For instance, some third-party programs need to be uploaded to the player in order to be run. Or perhaps you have a tool for editing some of the images used in the player's visuals, and you need to save the modified versions to the player's hard disk.
The easiest way is to install Mark Lord's Hijack kernel, which includes FTP services. FTP (File Transfer Protocol) allows you to send and receive files via ethernet. Fire up your favorite FTP software, set the player to read-write using the SITE RW command, transfer the files, set the file permissions (important!), then set the player back to read-only with SITE RO. Don't forget to set the player back to read-only, or bad things can happen.
NOTE: By default, the Hijack FTP and HTTP servers only run when the player is in AC/HOME mode. If you are having trouble accessing these features, check to make sure the player isn't in DC/CAR mode.
I can't stress this enough: If you can use a piece of graphical FTP client software, it is the easiest way to send and receive files from the player. Please click here to learn how to use FTP with the Hijack kernel.
If you don't know how to use FTP, if you don't have ethernet, or if you're having trouble getting it working, then you can use the serial cable with the shell prompt instead, as follows.
Connecting to the shell prompt:
Now you are at the shell prompt, and you can send or receive files.
- Make sure you have the developer version of the player software installed. Instructions here.
- Fire up Hyperterminal with the special settings for the car player. Instructions here.
- Press Q (enter) to get to the shell prompt.
Grabbing a file from the player:
To retrieve a file, you just use the Send Zmodem (sz) command. Let's say, for instance, that you want to alter the contents of the FlanceDoor visual on the player, and you want to grab one of the existing files to make modifications to it.
No, I will not give a complete listing here of what every single file on the system does and where it is located. This is just a set of quick instructions on how to send and receive files. If you don't know where the file is, or you just want to change files to see what they do, then you have no business messing around at the shell prompt. In these instructions, I will assume you know which file you're after because you've been told which one to get, and that you'll behave yourself and leave all the other files alone. Capice? OK, good.
- Change to the directory where the file resides:
Get a listing of the directory:
Decide which file you want to grab, then grab it with the Send Zmodem command:
(Note: Those are lower-case letter L's.)
Some strange characters will appear on the screen for a moment, and the file will be sent to your PC.
You might not know where the file has been saved on your PC's hard disk. Go to Hyperterminal's main menu and select Transfer/Receive File and you will see the name of the folder to which the file was saved.
Use the Windows Explorer to go to this folder and look at the received file. There is a chance that its filename may have been changed from all-lower-case to all-upper-case by the Hyperterminal program. For example, on my system, the file is now saved as "STONKDANCE.RAW" instead of "stonkdance.raw". I hate that. Rename the file to all-lower-case. This is important, because the file names in Linux are case-sensitive and they must match exactly.
Important: Let me repeat this again. The Linux file system is case-sensitive and the file names absolutely must be the correct case. If you do not name them in all lower-case on the player, the software will crash and restart in an infinite loop because it cannot find the files.
The file now exists on your PC's hard disk. You may now examine and modify the file in Windows. For example, if you are editing the file, you would need the appropriate editor program. Note that the files on the car player use proprietary file formats, and they cannot be edited by regular Windows utilities. For instance, you can't edit visuals in Microsoft Paint or Photoshop. Check the Downloads Section of this site or the Unofficial Empeg BBS to locate programs for editing the files on the car player.
By the way, if you intend to edit ASCII text files from the player, such as config.ini, make sure to read the note here about linefeeds in Windows text editors before doing anything.
When you are done editing the file, you probably want to put it back onto the player, right? Okay...
Putting a file onto the player:
Set the player's hard disk partitions to read-write:
- If you're not already there, change to the directory where the file resides:
If, at this time, an error message about "e2fsck" appears, please see this FAQ entry for details on how to fix it.
rwm (rwm may take a couple minutes to respond)
(You don't technically have to do both commands, because each one mounts different partitions. I just never can remember which one does which partitions, so I just issue both commands to set everything RW.)
Assuming the mount went OK, get a listing of the directory:
Now, look for the name of the file you're going to replace. In this example, we're going to replace "stonkdance.raw". Look closely at the text to the left of the file name. The text to the left of "stonkdance.raw" might say:
(Note: Those are lower-case letter L's.)
These are the property and permission flags of the file.
A complete discussion of Unix file permssions is too much to go into right now (click here to learn more), but you need to know enough to be able to set the permissions of the file. So here's the Reader's Digest version.
Ignore the first character for now. It indicates whether it's a directory or a file. Now you're only looking at the last nine characters of the group:
Now, mentally split that up into three groups of three:
Each of those three groups will be represented by a single digit. This entire line is going to get represented by a three-digit number. The value of each digit depends on whether there's a letter or a hyphen in each spot. The letters are R for read, W for write, and X for execute. So, for each spot, the values are:
So, in the case of rw- r-- r--, the values would be:
So, rw- r-- r-- translates to 644.
Other common combinations you will see are:
rwx r-x r-x = 755
For instance, executable programs on the player's hard disk need permissions of 755 or they will refuse to run.
rwx rwx rwx = 777
Okay, so now you've got the number noted? Good, you'll need it later.
Delete the file you're going to replace, using the RM (remove) command:
Tell the player to Receive Zmodem:
Some strange characters will appear on the screen. Go to Hyperterminal's main menu and select Transfer/Send File. Browse to your modified file (in this example, your local PC's copy of stonkdance.raw), and then click on the Send button.
Remember that number? The one representing the file's properties just before you deleted it? Use it now, to set the properties of the file you just sent to the player:
If you are sending new files to the player from scratch, you will need to figure out what the correct file permissions should be. For example, executable programs most likely need to be set to 755 (although make sure to read this important note about running executable programs).
Important: Set the player's hard disk partitions back to read-only:
Exit the shell prompt, back to the player software:
Now you know how to send and receive files from the Linux shell prompt. Feel like a Linux geek yet? Watch out, it's a slippery slope. Next thing you know, you'll be troubleshooting your company's Apache server...