Jan 18 2009

Skyhook Wireless 3.0 SDK and Managed Code

As promised I uploaded the wrapper for the Skyhook Wireless SDK for Windows Mobile to the Skyhook Wireless discussion group.   I tried the wrapper out with the 3.0 SDK and it works fine.  It exposes all the SDK functionality with the exception of the WPS_tune_location function (I have no idea what that function does).  So I am done with my interaction with the Skyhook Wireless SDK for now.

If you program in C# or VB.Net and want to use the SDK then you can get the code from the files area of the Skyhook Wireless discussion group.

Tags:

Jan 2 2009

HttpGet and Web Services

Category: Location ServicesJoel Ivory Johnson @ 09:08

I was creatting a proxy to make use of the OpenCellID web services.  There is no WSDL available for the service so I decided to create a web services solution that had the same interface as the OpenCellID proxy and then use the WSDL that it generated as a starting point for a proper WSDL file (which for me was much less effort then creating the WSDL from nothing).  After creating the initial WSDL I tried to use the WSDL command line tool to create the proxy.  I specified HttpGet protocol and to my surprise I received an empty class file.  I tried again specifying SOAP as the protocol and it worked!  Why the difference in behaviour?  After attempting to solve this for a while without success I decided to post a question on the MSDN forums and quickly received an answer.

As it turns out by default HttpGet (and HttpPost) protocol are disabled for web .Net web services. To enable them you must add them as approved protocols in the web.config file.  After adding the appropriate section things worked like a charm.

        <protocols> 
            <add name="HttpGet"/> 
            <add name="HttpPost"/> 
        </protocols> 

Tags:

Dec 23 2008

Google's Cell Tower Location Service Disected

The user Acoustic at CodeProject.com has done a nice write up of a disection of the protocol that Google Maps uses on a cellphone to request location data based on cell tower ID.  He also made available code that can be used in your own project to make use of the service.

 

Tags:

Nov 25 2008

Windows Mobile Interoperability

I develop dektop applications, web applications, and mobile applications.  But many times a solution doesn't fit completly within the boundries of those three types of applications.  There are solutions in which a desktop front-end interacts with a web back-end, or a mobile device communicates with a desktop, or in which all three work together for a common purpose (an excellent example of such a solution is Exchange, Outlook, and Pocket Outlook).  Microsoft already provides solutions for making applications that interact with each other across process boundries, machine boundries, and even across different operating systems.

I've written a few articles on CodeProject.com that for the most part are isolated from other systems.  The projects and the example code are about Windows Mobile and run on Windows Mobile devices.  I am about to expand the types of solutions about which I write to solutions that cooperate with other devices (the other devices being servers, desktops, and potentially other Windows Mobile devices).  The articles aren't targetting webservices, WCF, or interprocess communication per se though those technologies may be used within the solutions.  Microsoft has alread done an excellent job of laying the ground work for Interoperability and thedeveloper only needs to use it.   These areticles are targetted at tacking the technologies that we already know to exists and demonstrating new ways of using them.

I know that doesn't give a clear idea of what these new articles will cover, but you won't need to wait long to find out.  I've already got the code for my next article written.  With a 4 day weekend quickly approaching I plan to use one of those days to complete the article for the code.  It will be for an application to make desktops and windows mobile devices cooperate in a new way.

Tags:

Nov 12 2008

OpenCellID - open source cellular antenna based location

By now many are either familiar with Skyhook Wureless or have seen a demonstration of the service they offer. They provide cell tower and network based location information for mobile phones and portable computers (the iPhone uses Skyhook for its data provider). I came across an alternative to Skyhook Wireless that is open source named OpenCellID (http://OpenCellID.org).  The concept is fairly simple, run the client on your phone and as you move from tower to tower your phone contributes to the database.  If you write an application that makes use of location services you can make use of OpenCellID to get location data if a GPS signal is not available.

Unfortunatly the client for updating the database is JavaBased, so as much as I would like to I won't be running it.  But the service itself is web based so any application can make use of the data.

Update [12/26/2008] - Update, looks that I will be using it.  Though it is not a proper service proxy I've managed to create something that allows me to interact with the service from within a .Net application.

Tags:

Aug 9 2008

Geotagging Photographs

Category: GPS | Location ServicesJoel Ivory Johnson @ 21:26
 Roi y Zysman made an entry on his blog about geotagging jpgs images with a few lines of code in C#.   Very useful.  Takn directly from his site:
 
 
 appears that it is very simple to read and write these GPS settings from within the JPEG image using .Net's System.Drawing.Image class.
The data stored in JPEG images complies with the EXIF data format. We can use the Image class to read and write data from and to the JPEG image.
here is an example:
Image Pic = Image.FromFile(Filename); 
PropertyItems = Pic.PropertyItems; 
PropertyItems[0].Id = 0x0002; //index of the EXIF TAG 
PropertyItems[0].Type = 5;// 
PropertyItems[0].Len = length; 
PropertyItems[0].Value =new byte[length]; 
Pic.SetPropertyItem(PropertyItems[0]);

And that's pretty much it, there are a few more tweaks to save the image.
I'm publishing here a small C# file with a static function to perform a simple action to embed GPS latitude, longitude (Which can be taken from the gps log according to time that the picture was taken).
It is pretty much straight forward.
It can be used like so

WriteLongLat("c:/temp/house_gps.jpg", 33, 0, 48.46, 35, 5, 38.12);

where the first parameter represents the file name to be embedded and the other parameters represent the lon and lat degrees, minutes, and seconds..
Feel free to use this as will (LGPL) license

Tags: