The OpenDMTP Project
Home | Project | Downloads | Contact

April 7, 2006

GPS Tracking For Your Palm Treo 650 Phone

After a vacation or even a short trip, it's gratifying to be able to look back on a map and follow where you've been and the places you've visited. It would be even better if your travels could be tracked automatically, and even let your family and friends see where you are as you travel from place to place. Now there is an open source solution that can turn your Palm Treo 650 Smartphone into a GPS tracking device and have the data sent back to your computer over the phone's wireless data service. Add a mapping program or service (such as using Tiger data, Google Maps, Google Earth, MS-MapPoints, or others), and you'll be able to see your data on an interactive map!

OpenDMTP is a commercial quality Open Source protocol and framework designed for the transmission of location based information over high-latency/low-bandwidth networks. Using the OpenDMTP J2ME reference implementation, we'll describe how to set up a GPS tracking system on your Palm Treo 650, and explore the various options that are possible once you have the system up and running.

Gathering the Basic Components:

J2ME Capable Mobile Phone
Most phones now have embedded Bluetooth capability, and many phones also are able to run Java applications using a J2ME (Java Platform, Micro Edition) environment. The Palm Treo 650 Smartphone is one such phone we will be using in this article for our J2ME client GPS tracking system. (The OpenDMTP J2ME client has been tested successfully on both Cingular and Verizon network Palm Treo 650 phones with appropriate data plans)

Bluetooth GPS Receiver
Since the Palm Treo 650 does not have an embedded GPS receiver, we will have to use a separate GPS receiver with built-in Bluetooth to communication with the Treo 650. There are several brands of Bluetooth capable GPS receivers that emit the standard NMEA-0183 GPS records. For this article we will be using the Pharos iGPS-BT GPS receiver, but the TomTom Navigator 5 Bluetooth has also been successfully tested. If you have another Bluetooth capable GPS receiver that emits standard NMEA-0183 records, that should work fine.

GPS Tracking Software
The GPS tracking software needs to be able to collect data from the Bluetooth GPS receiver and perform various forms of analysis on the data to generate appropriate events (to determine motion start, stop, in-motion, etc). The software then needs to be able to transmit these events to a backend server for storage and later retrieval. For this purpose we will be using the J2ME client reference implementation of OpenDMTP. This provides everything we need to collect data from a Bluetooth GPS receiver, perform the needed analysis, and transmit events back to our server over the wireless data plan provided by the phone.

Backend Server
The server needs to accept incoming connections from our client (Palm Treo 650) and store received GPS events for later viewing. This stored data can then be presented in a web interface, along with a map, to a user wishing to view the data in a browser. For our GPS tracking system, the backend server can be either a Linux machine, or Windows-XP, running over a broad-band Internet service. The OpenDMTP Java-server project provides a full featured socket server which we will configure to listen for client connections over Internet. And with the availability of Google Maps, we can also view this data on a map using client-side browser JavaScript.

Putting It All Together:

Configure the server:
We will need to download the latest version of the OpenDMTP Java server zip file to the machine which we will be using as our backend server. The OpenDMTP Java server will need to be compiled using either Sun's Java 1.4.2, or Java 5 compiler. Next we configure our webserver (Apache is a good choice). We will use Google Maps for this example, so no special configuration is necessary for the webserver. The webserver just needs to be able to serve our static page, "track.html" (derived from examples provided by Google Maps and included in the OpenDMTP J2ME-client project). We'll also need to apply for a "Google Maps API Key" which is placed in the "track.html" webpage. (Note: When using Google Maps, make sure you fully comply with their Terms of Use After checking to see that our firewalls are routing the necessary ports, we're now ready to start the server to listen for our client connections.

Configure the client:
The Palm Treo 650 is not shipped with Java installed. You must first download and install the J2ME "WebSphere Everyplace Micro Environment" from IBM (free for Palm Treo 650 users). Once that has been done, we will need to download the latest version of the OpenDMTP J2ME client zip file to a Windows-XP machine (for 'HostSync'ing to our Treo). We can build the 'OpenDMTP.prc' file from source code ourselves, or we can use the pre-compiled 'PRC' (Palm Resource Code) file already provided in the project ready for transferring to the Treo. Once we have the 'OpenDMTP.prc' file ready, we use our Palm 'HotSync' utility for uploading it to our Treo 650. After we start up the OpenDMTP application on the Treo, configure the Bluetooth connection to the GPS receiver, and configure the name of our server to which GPS events will be sent, we're ready to start tracking. Map Image (C)Google

We can then monitor the client connections to the server to make sure everything is working as expected. The client generates events and sends them to the server. The server collects the data and stores it for the webserver. The webserver presents the data and a map to the user's client web browser. We're up and running! Place the Bluetooth GPS receiver in your pocket and go for a walk, or placee it on the dash of your car and go for a drive. Either way, your be able to track your travels.

Here is an example short trip that was tracked in Northern California using the Palm Treo 650.

Other Options:

From here, the options are nearly endless for where changes and improvements can be made to our simple Treo GPS tracking system.

The OpenDMTP J2ME Client:
The J2ME client has a full-featured reference implementation of the protocol and currently supports motion based events (ie. start motion, in-motion, and stop motion event, as well as 'dormant' events that can be generated if the phone has not been moving for a pre-determined amount of time). Other GPS event modules are also possible, such as Odometer events, or arrival/departure events. It has currently only been tested with the Palm Treo 650 Smartphone, but should work with other J2ME/Bluetooth capable devices.

The OpenDMTP Java Server:
The Java server we've used currently provides only a simple file store for our generated events, but can easily be extended to provide scalability to 1000's of devices by implementing a backend database storage system. Also, the web interface can be improved to provide user login/logout, and various report views on the collected data.

This is just the beginning of the possibilities available with OpenDMTP. Try out the OpenDMTP J2ME client project yourself. You'll find the protocol documentation and reference implementation downloads at "".

For questions or comments, please feel free to contact us at

Copyright (C) 2006 Martin D. Flynn, All rights reserved.