PDA

View Full Version : How to host your OWN OTA


Shellbell67
12-20-2008, 03:29 PM
A few people occasionally ask how to host or post files in order to download OTA (over-the-air) from their own server. I thought I would post the below information to help everyone better understand what is needed.

If you have your own web server or a web site this will guide you to hosting files that you can download over-the-air direct to your phone.

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

The mime type returned when you follow the link to the jad files is currently "application/octet-stream". For desktop browsers, this normally means the content should be downloaded since it is some type of binary data. The BlackBerry Browser does not support the download of arbitrary binary data, so it tells you that it can't accept content of this type. I believe this is the problem. The good news is that it should be easy to fix and you only have to do it once.

The instructions that follow are for the Apache web server v.2.0. I don't know which web server you are using, but if it is not Apache, there should be something similar in the documentation on how to configure the mime types. If the website is hosted by a third party you may need to ask them to configure the server to allow these mime types.

1. In the "conf" sub-directory of the directory where you installed Apache, open the mime.types file. (ie. C:\Program Files\Apache Group\Apache2\conf\mime.types)
.
2. At the bottom of the file add the following 2 lines:

text/vnd.sun.j2me.app-descriptor jad
application/vnd.rim.cod cod

3. Save the file.

4. Restart the Apache Server (Start Menu, Programs, Apache HTTP Server, Control Apache Server, Restart).

What this has done is tell Apache that whenever a .jad file is requested, the mime type that should be returned is "text/vnd.sun.j2me.app-descriptor". Similarly for .cod files. The BlackBerry browser will recognize the above mime-type for the .jad file and offer you the option to download







The .jad file is the starting point that you post as the link for people to point to with the BB browser. You'll also need to place all the .cod files onto the server. The .jad file is a package listing of all the files the OTA action will need to download-- so after you make .jad file set, do not change any filenames because they are all encoded in the .jad file. The number of .cod files depends on how many graphic elements your particular theme has. Some of mine had 4 and some had 10 .cod files.

Question? Is the theme.jad file the only file that is needed when installing OTA. or do i need all those files on the site but only letting the theme.jad be an active link.

Answer. You need them all. They are a set of files, with sequential numbers, that are broken up for downloading and reconstructed during OTA. They all need to be in the same folder on the server.

Question? Does the server need certain abilities in addition to what most hosting companies supply?

Answer. Yes- the server needs to have some things enabled. I know that Apache servers are the preferred ones. You also need a file to tell the server how to handle requests. This is a .htaccess file. Note there is nothing preceeding the initial "dot" in the filename. The file needs to have this contents (build with a text-only editor like Notepad):

AddType text/vnd.sun.j2me.app-descriptor jad
AddType application/vnd.rim.cod cod
AddType application/java-archive jar
AddType audio/adpcm adp

This file needs to be in every folder you create on the server with .jad and .cod files. Again, the file name is everything inside the quotes ".htaccess".

Only registered members can read replies