GPS

K750i/W800i filesystem access

Posted in GPS on December 16th, 2006 by gavin – 6 Comments

This was my pet peeve with my mobile phone and java software. Everytime a java application attempted to access the filesystem on the phone, a permission request dialog pops up. For a mapping application that uses tiles of around 256×256 pixels, it needs to access the filesystem with great regularity and thus great annoyance ensues.

The correct way to solve this problem is for the application writer to sign the java application with a certificate, obtained from the likes of Thawte or Verisign. The problem with this is:

  • It costs money to get a certificate
  • It appears that only a commerical entity can purchase a cert. for signing j2me applications.

There are alternatives to this that I spent most of the day investigating. The best way seemed to be to creates ones own private key and certificate. Upload the certificate to the root store on the mobile phone and sign the application with the private key. Tedious perhaps, especially seeing as I’d have to sign every application and every new version of the application I’d put on the phone, but I was happy enough to do that.

However. There is no support for adding ones own certificates to the K750i/W800i. No official support that is. After much googling and trawling through the forums at http://www.esato.com I found software to do this. An application called FAR Manager in conjunction with plugin called SEFP. The FAR Manager application is a generic file system manager, but it supports plugins for accessing various filesystem types other than a standard hard drive. Network filesystems, FTP, etc.

The SEFP, Sony Ericsson Flash Plugin, is able to connect to a K750i/W800i phone over the stock DCU-60 cable and offer access to the filesystem on the onboard flash memory.

There is a brief guide available showing the basics of using FAR Manager in conjunction with the SEFP.

Once this is up and running on the mobile phone (You’ll need to install the Sony Ericsson Update Manager first if you haven’t already. This contains the USB flash drivers the plugin uses to access the phone), it’s possible to copy files to/from the mobile phone flash memory. It’s then a simple matter of uploading a .cer file to the correct directory on the phone, modifying a customize.xml file on the phone to list the certificate, and reseting the phone using a master reset.

Supposedly. This doesn’t actually work. The certificate does not get added to the root repository as some import function needs to be run. I couldn’t figure out how to do this, it appears that the phones firmware needs to be completely flashed and the certificate copied over before the phone is started. This way, when it’s started for the first time with the new firmware, it initializes the certificate database.

So I returned to the forums and kept trawling. I found an easier method, but this is a real hack. The flash plugin has some extra features that allow one to edit the raw flash memory directly, at a bit level. (Extremely useful for obtaining a good forensic image of a Sony Ericsson mobile phone I’d imagine). The plugin also has support for small .vkp scripts that when run, will patch a location in the flash with certain values, so simple automation of memory editing. A number of these scripts have been created that perform a number of actions. And one of those actions is.. you’ve guessed it, to disable requests for file system access.

I downloaded the script from this forum article and installed it using the FAR Manager with plugin. (In the application, press enter on the flash link, press tab to select the other pane, browse to and select the .vkp file. Press F5 to copy and when prompted select the run .vkp file option.)

Success ! No more filesystem prompts. Now I just need to figure out where j2memap looks for map files on the memory card and I’m away in a hack.

GPS Graphing

Posted in Cycling, GPS on November 7th, 2006 by gavin – 1 Comment

I used TrekBuddy to record my cycle home this evening, spewing out NMEA data every second. GPSBabel can then convert this NMEA data into the slightly more common GPX XML format. I had planned on taking the data from the GPX file, using a shell script, then drawing graphs from it in Matlab. Being lazy though, I googled first for alternative solutions and came across the excellent uTrack website. This site allows you to upload a GPX file, and then creates graphs and statistics about your route. It also plots your route on a Google Map.

There are one or two drawbacks with it though. It’s not very easy to then display this data on ones website. There is an export to PDF option, but the graph quality is not as good as the original output and it also does not include the Google Map route tracking. The second problem seems to be with the script itself. It introduces spikes in the speed graph for some reason. Apparently I was cycling at 227km/h at one point. While this is certainly achievable for me on a flat stretch of road with my complete spandex outfit, and aerodynamic helmet, not to mention motorcycle, it’s not too feasible going through Dublin with its abundant traffic lights.

As a temporary solution, I have copied some of the graphs, and also have the original PDf available. Hopefully the author of the script will make it public or configure a nice way of including the HTML output on an external website.
Distance v TimeElevation v DistanceElevation v TimeSpeed v DistanceSpeed v Time

Route PDF File

Preloading j2memap with google maps

Posted in GPS on November 7th, 2006 by gavin – Be the first to comment

I looked at a way of preloading the j2memap application with maps from Google Maps. Great! I can put the maps on the phone, no permission errors, no messing. Or so I thought, unfortunately it’s actually quite crap.

I found an application that given a particular URI will download maps from that source for a given set of coordinates, longitude and latitude. You also choose the zoom level.

Now, I wanted a map of Dublin on my phone. For it to be of any use, it needs to have a reasonable level of zoom, which when downloaded with the above application spews out around 30 or so mb of map data. Grand job, no hassle, I’ve a 1GB memory card in the phone. Of course I was being somewhat stupid about it.

By preloading a jar file, as described here, you take the maps, convert them to a certain filename and stored them in the cache directory in the jar. A Java jar file being in fact a zip file, so this is quite easy. The problem occurs when you want to load this jar onto the phone. My phone, a SE K750i, copies the jar file to the phone memory before it runs… So I am going to be always limited to the phone memory size, not the size of the memory card. *NNNNnnnnnngggghhhh*

I am just going to have to wait for a signed midlet that loads the data from the memory card filesystem. I did also look at writing a small httpserver, which would have encountered the same problems as above, but in fact the phone can only run one java application at a time anyway !

Mobile phone GPS software

Posted in GPS on November 5th, 2006 by gavin – 5 Comments

There are a good few java applications out there for mobile phones that offer some sort of GPS support. I’ve played with a few, and even payed for one.(I am a schmuck) I’ll quickly mention the ones I’ve used and describe what they can do. What I was really interested in was the ability to download large maps and save them onto my phone’s memory card. The alternative is to download the maps via GPRS as you go, and given Irish mobile phone service providers GPRS costs, this isn’t feasible.

There are some issues though with using downloaded maps, or saving cached maps to the filesystem. The first is Google themselves, (if using Google Maps) the offline caching of maps is, I think, against their terms and conditions, as demonstrated by them requesting this chap to take his application offline.

The second issue is with the phones themselves. My phone at least requires explicit permission from a user when an application wants to access the filesystem. This is fine, great security you say, except that it wants permission every, single, time. So if you download some maps that are split into tiles, ala Google Maps, it needs to issues at least 4 or 5 requests per display ! Painful. The only way to get around this is to get the jar signed, or to load data into the jar file itself. Getting the jar signed costs money, circa $500 it seems, and loading up the jar files is awkward, with no automated tools for doing it. So anyway, the following are the application I’ve looked at.

Mobile GMaps.

http://www.mgmaps.com

Mobile GMaps Mobile GMaps was initially written to display Google Maps but has extended to include support for a number of other online map sources and GPS devices. It is a Java application, so will run on any reasonably modern java enabled phone.

The MGMaps interface is very good, nice and tidy, with plenty of support for various settings. Always on backlight (which doesn’t work on my SE K750i phone), full screen, bookmarks, a proxy script.

What it doesn’t do is provide support for route tracking, satellite information display, extended information such as Height etc. It also does not support the loading of map data from the local memory storage.

MGMAps is excellent for viewing googlemap data, and searching for locations, however as a general purpose GPS client/tool, the lack of route recording tools makes it useless.

TrekBuddy

When I wanted to record my routes on the bicycle, my brother pointed me at an application called TrekBuddy. From the website http://www.linuxtechs.net/kruch/tb/forum/index.php the details are

  • Bluetooth GPS, internal (JSR-179), simulator location provider
  • offline maps
  • smart GPX / raw NMEA logs
  • location sharing
  • waypoints

The NMEA output is good, the smart GPX can be a bit dodgy. I tried it on the LUAS and appeared to travel through a number of houses, which was a bit odd. The offline map support is there, but getting a map and calibrating it is awkward. What I really want is just a tool that will allow me to download Google Maps and stick them on my phone, no messing about ! TrekBuddy should be able to display these maps alright, it’s just a matter of formating them correctly.

Nav4All

http://www.nav4all.com

Nav4all is slightly different from the above in that it is a more professional offering. Rather than a map displaying application, Nav4all is more like a complete GPS solution, focusing on providing directions to locations. The map coverage is extensive, using their own database, with a comprehensive POI database too.

The interface isn’t fantastic, however it does offer audio prompts for when driving. The application is very good, as a GPS alternative to the likes of TomTom, but as yet doesn’t spport tracking and tracing, so no NMEA or GPX output. There is also no support for using downloaded maps, however given that it is not downloading raster maps, but rather vector maps of locations, the amount of data downloaded over GPRS isn’t too bad. Also, the application is currently completely free !

As a map viewer, it’s ok, as a complete GPS package, for free, it’s very good.

J2meMap

http://j2memap.landspurg.net/

Another application along the lines of MGMaps and TrekBuddy. This has support for route saving/loading, but I couldn’t get it working. There are some other interesting features such as taking photos and being able to GPS tag them for uploading to Flickr. This sounds good, but unfortunately it couldn’t seem to take advantage of the 750i’s complete camera features, restricting the image size, focus etc. There is talk on the forums about loading up the cache directory with predownloaded maps, but again, it appears to be an awkward process. The interface isn’t the greatest and the application can’t handle the permission related problems very well, with constant requests entering into a loop it’s impossible to get out of without forcing an application exit.

It’s a decent map viewier, but with the filesystems permission problem, it can be very painful.

GPSWatch

http://www.i10n.com/

I was getting a bit tired at this stage of all the various applications, none of which did exactly what I wanted. A simple app that can display offline maps, display the recorded route as an overlay and export this data in a NMEA or GPX format. And also to have no messing about with filesystem permissions. I didn’t even mind paying a bit of cash for an application that did all this. Amazing I know, a pauper student willing to fork out cash for a program. One of the forums had a post mentioning GPSWatch and that it supported downloading of Google Maps and loading with permission questions. Great !

I went to the website, they listed all the various features, everything I wanted. The demo was ok, seemed to do the job, so payed for the application. 25 Euro. First thing I noticed after I payed was that I didn’t have the application, no automated download, nothing. It seems I had to wait for the company to email me asking what phone I had, then they would send it out. That’s bollix I thought. I went to the website forums and saw people complaining that they had payed for the app and taken ages to recieve it. More bollix I thought.

Eventually, after several unanswered emails, I got the application. Apparently the company had been off at a wedding. I guess these things happen (?!?!). At this stage, I was a bit suspicious about what exactly I had bought and I wasn’t too surprised to get something that was fairly crap. The interface is poor, a number of the features are ridiculous including an acceleration measurer to test how fast your car can get to 100 miles an hour. The application doesn’t do full screen, doesn’t display route taken over the map and of course still has the file permission request problem. No signed jar here. The offline downloader is a java command line app which runs with the arguments:

Usage: getmaps ’start latitude’ ’start longitude’ ‘end latitude’ ‘end longitude’ ‘map type’ ’start zoomlevel’ ‘end zoomlevel’ ‘destination folder’

Not quite the simple GUI tool I was hoping for.
In short, it was somewhat disappointing. Avoid until they have developed into something more substantial, if ever. At least I get free updates, (what joy), so if they ever make something decent of it, I’ll be able to use it.

In general MGMaps is the tool with the best interface and TrekBuddy the tool with most useful offline map ability. Nav4All is great as a general pupose GPS solution, at least while free. I’m just going to have to wait a while for a mobile phone tool that does exactly what I want, or write something myself to create the maps I want.

One possible solution is to write a simple webserver for the k750i that is able to load google maps from the memory card and make them available to the MGMaps tool via its proxy setting. The security problem could be overcome by storing the files in the httpserver jar.. Still have to download the right Google Maps though..

RSS Feeds from the above mentioned applications :


FireStats iconPowered by FireStats