Step 1. Introducing WML files
The first thing to note is that the Nokia 3510 doesn't seem to be able to directly open a MIDI (.mid) file from within the WAP browser. I could be mistaken here, but I tried repeatedly to get this to work and it failed every time.
What is needed instead is to open a .wml (Wireless Markup Language) file. A .wml file is similar to an .html file used by a web browser, but it is designed to be used by portable devices such as mobile phones and PDAs.
I'm not going to give a tutorial of .wml files here, but I will give you a basic .wml file that can be used to open a MIDI file, and some pointers to other sites that will provide more detailed information on the subject.
Creating the .wml file
Before we get too carried away with MIDI, though, let's take a simple .wml file and make sure we can deliver it to the mobile phone. The .wml file we will use is as follows:
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card title="Ringtone"> <p>Well done, it worked!</p> </card> </wml>
As you can see, this is fairly similar in many ways to HTML.
The first two lines are extremely important; if these are not present, the WAP browser will just display "File format unknown" and disconnect.
The remaining lines define a 'card' (similar to a single page of HTML), start a new paragraph, and display some text. WML is much more strict than HTML, and has requirements such as all text being inside a paragraph tag, and all tags being closed. Where you may get away with more relaxed HTML content, the WAP browser will refuse to display the page if things aren't just perfect.
Link: There are a many WML tutorials available on the internet. One of the best I've found so far is available from WAPDrive |
You can create your .wml file in any text editor (such as Notepad). Just copy and paste the above text into the file, making sure there aren't any blanks lines at the start of the file, nor any spaces or other characters before the first two lines of text. Once you have done this, save it somewhere on your harddrive with the filename 'test.wml' (without the quotation marks).
< Back to the contents | | | On to the next part > |
This article is copyright © Adam Dawes, 2002.
It may not be copied or redistributed without my express written permission.