GPS iPhone – POC
by Jaku on Dec.31, 2007, under Haxs
I was bored last night and started working on some code that would update my location on the site again just like it used to. The only difference is before it would get updated by a GPS phone that had internet using the Mologogo software. So the way that this is different is that it will currently use the IP of the location that is in a list of known IPs and GPS coordinates. This works on a non-jailbroken iPhone as well, since it is only a lookup by IP and not a MAC address or anything like that.
The first version was written in shell code and would have to be ran from the iPhone, and everyone that wanted to use it would have to install it to the phone. It didn’t take me too long to get it working and tested. It was ugly, it needed a jailbroken iPhone, but it worked. I then decided that it wasn’t practical to have the iPhone store the code, when all it would have to do is connect to a server with the code and update from there. So I set off to make a PHP version of the code and host it on my server.
I got the code on the server, and decided that, the best way to make it iPhone friendly was to use the iPhone web app template at located here. I still have a few things to add to the template and a few other feature I need to add to the code. But this is app will work on a non-jailbroken iPhone as all it needs is an active wifi connection. It needs wifi because the IP from the Edge network wouldn’t work for the type of lookup we are doing.
I don’t want to do an IP lookup and match it to known GPS coordinates, but currently that is the only way I know of to do it on a non-jailbroken iPhone. So now, I am working on a native iPhone app, that will do the GPS lookup by IP, MAC address of the router, and hopefully cell tower triangulation. The 3rd part I am not really sure how I will pull that off, but I know it is possible because of the other apps out there. The two big differences between my program and the other one, is that mine will be free, and will let you update your location on your own website like what I do here. The nice thing about the native app, is that you won’t need a wifi connection as long as you have Edge service. Also I know that the new iPhone firmware 1.1.3, is suppose to have the triangulation built into google maps. But I doubt it will let you use that information to update your site location on a blog or such. Also I know many people won’t be updating to that version as they like to use native apps and updating to 1.1.3 will break all apps again.
The main goal after I get the native app in a semi-beta build. Is to allow users of the native app to go out and find access points and IPs, and update the database so that users of the web based version, will get better and more results. This will be nice for users that don’t want to jailbreak their phones for whatever reason, but still get to use an awesome app such as this.
Depending on how far I get with the coding in the next few days will decide if I present my application at the Chicago 2600 meeting or not. I am fairly confident that I will at least get enough done to show off the complete web app. The native app will be a bit tougher but if I run into any problems I’m sure someone there would have an idea on what I could do. It would also be great to get suggestions and comments from others on what they would like to see. I should also note, that since the web app, is a web based app, it can be used with any device capable of connecting to the net. So this won’t just help iPhone users, but anyone with a wifi card can get GPS coordinates from their web browser.
Here are some pictures of the work in progress on the web app.
