**Under Construction!!
**new: (7/9/4) Added directions for setting up a personal WML homepage for your cell phone.

Setting up a website for uploading content to your PCS vision phone

These directions are:
First of all, make sure the webserver is set up properly. The Apache website has all the details you need to do so.
Next make a sub-directory under your main website directory, and change to it. The purpose of this step is to separate the content upload settings from your regular website as a precaution. You may skip this.

mkdir mobile
cd mobile

1. Configuring .htaccess file

The next step is to add the MIME type for content description file (usually referred to as gcd file as it has a .gcd extension) to your .htaccess file under mobile. Add the following line to .htaccess:

AddType text/x-pcs-gcd gcd

or simply use:

echo "AddType text/x-pcs-gcd gcd" >>.htaccess

If the file does not exist, you can create it. Make sure it is world readable:

chmod ugo+r .htaccess

Note that the file may need an extra empty line in the end. It works for me either ways, so I tend to ignore the extra line.

Now your server is ready for serving the content. It is also possible to add the MIME type for gcd to the main Apache configuration as described in Apache documentation, but .htaccess allows for changing local settings. Plus, it works even if you do not have the privileges to modify the Apache configuration.

2. Setting up the gcd file

The phone browser cannot directly download content, and therefore you cannot simply point your browser to a media file and hope it will work. Instead you have to write a gcd file, that describes the nature, URL etc., of the media file you want to download, and then point your phone browser to it. A typical gcd file looks like the following:

Content-Type: audio/midi
Content-Name: Loops
Content-Version: 1.0
Content-Vendor: ARB
Content-URL: http://yourWebSite/mobile/loops.mid
Content-Size: 50455

You can save this as music.gcd under the directory mobile.

The above example is for downloading a midi music file. However, this format is all you need to know to download any of the following files:

jpg, jpeg, png, wbmp, pmd, cmx, mid, midi, qcp, jar, jad

Some of these formats need to be converted before they can be uploaded. I will soon add details on conversion process.

The gcd file enteries are as follows:

Content-Type
This entry specifies the MIME type of the content to be uploaded. Simply change the line to the media type that you are trying to upload. The example is for a midi file. MIME types for some common media files are:
MID: audio/midi
JPG: image/jpeg
TXT: text/plain
QCP: audio/vnd.qcelp
JAD: text/vnd.sun.j2me.app-descriptor
JAR: application/java-archive
PNG: image/png
PMD: application/x-pmd
WBMP: image/vnd.wap.wbmp

Content-Name
This is the name that your media file will be given on the phone. Avoid special characters in the name. I usually stick with alphanumerics and space.

Content-Version
This is the version of your media file, basically to keep track of various versions of a file. I think I have always used 1.0.

Content-Vendor
The name of the owner or vendor of the media file. You can use your name here.

Content-URL
This should be the exact URL for the actual media file. http://yourWebSite/mobile/loops.mid in the example. I have observed that using underscores in media file name causes "Data Error 905/ Attribute Mismatch". Avoid that.

Content-Size
This should be the exact size of the media file in bytes (e.g., from ls -al loops.mid)

Notes

3. Off we go...

We are now ready to upload content to the phone. You can either send yourself a message with the URL of the gcd file, or open the URL in the browser. For our example, the URL is http://yourWebSite/mobile/music.gcd. In case you want to send yourself an email, you can also use the email address your_phone_number@messaging.sprintpcs.com.


Refer to the following link for more help. It also has an uploader utility, so you don't have to do any of the above :-)

4. Setting up a homepage for your cell phone

After testing the above method for uploading individual media contents, you can also setup a homepage for your cell phone. The following steps will help you setup a Homepage:

Hopefully, these instructions are useful to you. If you have a question, or noticed a mistake on this page that should be corrected, you can email me at alirazabutt at acm dot org