Creation date: April 20th 2008, last modification: April 20th 2008

What is "BTM" ?

BTM allows to upload photos from your mobile phone camera to an Intenet server, that only authorized recipient can view. Photos upload is done at no additional cost, for those having unlimited data subscription with their mobile operators (e.g. in France "SFR Illimythics", "SFR pass Surf 2.0", unlimited data option with Bouygues, Orange Ten offer,...)

The server can be hosted at your ISP, if it provides php/MySQL capabilities (e.g. in France: Free).

Furthermore, BTM provides a confidentiality service. Knowing the URL is not enough. Only those knowing the password that you have selected can view phtotos on the server. Even your ISP or your mobile operator has no means to view the photos.

BTM is free and will soon be available as open souce under GPL license.

BTM with a drawing

btm_principe (36K)

Requisites

Mobile phone or phone-PDA
  • Data connectivity (http).
  • Camera.
  • J2me.
  • JSR 75.
Internet Service Provider Web page hosting, including php+MySQL
Web clients Internet brower (java enabled)

Midlet installation on the phone

Download midlet jar file => BTM.jar

If needed, here is the jad file => BTM.jad

Server installation

Ceate a directory that will contain the following files. Name it "btm" or anything else. It will be reffered as the "btm" directery here below.

Download this file; config.php and edit this file to accomodate your configuration.

Rename the file by removing the final ".src", then upload this file in the "btm" directory.

Open the URL pointing to inittables.php with a web browser, it will create a pair of tables which is needed for BTM to work.

The URL form should have the following form:

http://monfai.com/monchemin/inittables.php?passmodif=checkmodif

The value after "passmodif=" should be consistent with the one mentioned in "config.php". This password provides protection against table modification by non authorized users. The returned page should confirm table creation as in the example below: where tables names should be replaced with the ones that you have provided in "config.php".

Drop table BTMX_img: ok. Create table BTMX_img: ok. Drop table BTMX_tmp: ok. Create table BTMX_tmp: ok.

Warning: once "inittables.php" is called, it clear any existing tables that were used by BTM. If it is called after BTM used, datas will be lost.

For the java applet installation, the following files must be uploaded in the "btm" directory:

Then the applet can be accessed at the following addess:

http://monfai.com/monchemin/applet.html

Using the midlet for uploading photos

BTM.jar install a midlet suite which is made of a single midlet. It is not signed. Therefore confirmations will be required whenver the local file system is accessed, or whenever internet connections are made.

When the applet is started, the image directory is consulted, and the list of images is presented as in the screen capture on the left. It it is not the case, then the config must be checked or modified (see below)

Select "config" in order to reach the screen displayed at the left. Config modification are permanent thanks to the "RMS" mechanism.

"Base URL" set the URL base for the server. Don't forget the final "/".

"Base fichiers" (translation = base for files" set where the ilage files are located on the local file system. On Windows Mobile, the default value after installation should be OK.

"Mot de passe" (translation = password" is the password for image encryption. The password should be much longer than the one proposed as default value.

"Compte" (translation = account) should fit with the "passmodif" which has been set in the "config.php" file in the above section.

This allows the server to check whether the client is authorized to modify tables in the server.

Once a line has been validated from the frst screen (by hitting the OK button, we reach the screen that is shown on the left. It allows to check that file upload is progressing well.

The file is split in chunks, each of them counting around one kilo bytes. (See http://discussion.forum.nokia.com/forum/showthread.php?t=66098 for a clue about why. The 1 kilobyte size is due to file encoding which double the size of files.

The name of the file which is being sent is recalled first.

Then, "Index" shows the current index of the chunk being sent. The index starts from zero.

Then, "N pieces" gives the number of chunks for the file.

"Résultat" (translation = result) is updated when a chunk has succesfully been uploaded. When the last chunk has been uploaded, "image uploadée" (translation = image uploaded) means that the complete upload is succesfull..

Using the java applet to see photos

Once the user has accessed the applet URL, he sees the lists of images that are uploaded on the server

Clicking on one element in the list should download and display the image

If the passwrod is not correctly set, it is not possible to view the image, and a message suggests to set it.

Two buttons are present:

"Liste" (for list) allows to refresh the image list from the server.".

"Mot de passe" (for password) allows to set the password.

The windows that allows to set the password proposes to save it in a cookie.

If this option is chosen, it is not needed to set the password at each visit.

However, it is also possible to disable the cookie saving.

Note: for a good protection, the password should be longer...