[software] [catdoc] [tcl] [geography] [old things]

Tools to work with mobile phones

Some theory on using OBEX protocol

Bluetooth phones typically have several distinct channels on which OBEX protocol can be used.

You can use sdptool browse command to find out which ones are supported on your phone. Or you can use sdptool search addr service to request information on particular service.

In the later case service can be specified as some predefined string, known to sdptool, or by hexadecimal constant. You can look this constant up in sdptool browse output or in the Bluez include file sdp.h.

Both obexftp and t68tool require channel to be specified explicitely.

So far I've discovered meaning of following channels:

Ir2MESync (0x1104)
Used to synchronize address book and calendar database with phone. t68tool utility uses this channel. Phones typically do not support directory listing on this channel. But there is telecom directory which standard files such as pb.vcf, cal.vcs etc.
This service is used to push objects into phone. Then phone would decide (probably, by asking you) what to do with object - save it in appropriate place or discard it. This service is used to upload files, J2ME applications, exchange phonebook entries etc.

When you pick up "Send/Via bluetooth" entry somewhere in your phone menu, this service is used

There is no way to GET something (even file with known name) via this service. There is no way to avoid annoying popup windows "What to do with the recieved file?"

This channel is also used for acepting files from mobile by obexserver program.

This is file transfer protocol which is primarily used by obexftp. It supports directory listings, and doesn't require confirmation of get/put actions. But it doesn't allow access to all information on the phone. On Ericsson T610 only Pictures, Sounds and Themes are available. No phonebook/calendar, no J2ME applications can be get or put this way.
Basic imaging profile. My phone doesn't support it, so I cant't describe it in details. From opd code it looks much like OPUSH
There is a lot of other Bluetooth channels, which might or might not use obex protocol. Some, for instance, use PPP or other network protocols.

Tools to work with mobile phones on Linux

Bluetooth address resolution project

I've been quite surprised that most Linux bluetooth applications require user to specify numerical bluetooth addresses in the command line or configuration file. So, I invented my own bluetooth address database and use it in my scripts.



T68tool is small command-line application which can backup/restore phonebook and calendar from mobile phone and get/send arbitrary files via openobex.

It uses Ir2MeSync obex service.

It was originally developed by Garthy, and I've only managed unofficial Debian packages, but long ago downloadable files are disappeared from Garthy's site.

Tested on Ericsson T68 (by Garthy), R320, R520, T610 (by me) and Nokia 6310 (by me).

Future development would probably include ${HOME}/.btdev support on C code level and configurable timeouts, because I encounter problems with uploading my phonebook on phone due to large number of photos.


Tcl wrapper around t68tool which converts all phonebook records into uniform (utf-8) encoding and stores it in the ${HOME}/.phonebook.vcf.

It uses (if bluetooth transport is used) local database of bluetooth addresses in ${HOME}/.btdev.

phonebook grepper

A companion script to getpb - search .phonebook.vcf for contacts. It also able to add contacts into phonebook using -a option.

Bluetooth send script

Simple wrapper around t68tool which allows to avoid specifying bluetooth addresses and channels in the command line. It uses ${HOME}/.btdev database to convert descriptive names of devices into addresses.

Book generator

It is possible to read books on Java-enabled mobile phone. There is excellent java bookreader on tequilacat.narod.ru.

Unfortunately, Java on mobile phones is intended primarily for games, so each book should be packed into jar archive as separate Java application. Tequilacat provides windows application to do so, but there is nothing quite difficult in packing few text files into existing zip archive (and Jars are zip archives) so I decide to write my own portable shell.

I've written commandline script to convert FictionBook2 files into tequilacat applets.

AMR to WAV converter

My ericsson T610 records sound in the AMR (Adaptive Multi-Rate) format. No existing Linux sound tools (like sox) I'm aware of are able to convert this format into something useful. But there is sample code on the 3gpp.org which compiles under Linux and converts AMR files into raw 16-bit 8KHz audio files. (look to 26.073 spec. Code has to be compiled with MMS_IO define to be able to deal with real amr format).

There is also amr2wav converter for Win32 which happily runs under wine, but I think somebody (may be I) have to write useful frontend to 3gpp codec library.

Other tools

Links to other useful tools ircp very useful thing to exchange files via infrared. Of course bluetooth counterpart would be better, but I haven't found simple app to receive files from phone via bluetooth.

To send files to phone one can use t68tool or obexftp

Favorite J2ME apps

Below there are links for Java apps for mobile phone I've found interseting or useful


  • fremtris. Always needed tetris on my mobile phone since I've tried it on R320. But phone vendors put other, less entertaining games.
  • Dungeon Dweller - Always wanted something Rogue-like on the phone. And now I can have it.


  • Cash2ME personal financial management on the phone. Looks quite promising, but I couldn't get it working on T610.
  • SSH and Telnet Do not work on my phone too
  • MicroCalc - a spreadsheet on mobile phone. Unfortunately, it can exchange data only via WAP. I'd rather send data to computer and back via IR or Bluetooth.
  • FnattLabME MatLab -like calculator. Don't know why one need to do complex math on one's mobile, but looks cool.