How can you get GPS data off of an MC55, MC75 and VC6096 Device?

// Expert user has replied.
D David Singer 3 years 7 months ago
2 9 0

My group is looking to create a demo using GPS data from Motorola products, but we need to figure out how to get the GPS data off of the MC55, MC75 and VC6096.

Please Register or Login to post a reply

9 Replies

R Richard Linsley-Hood

You can, of course, write code to open a COM port, validate and parse the incomming stream, and then create an function that will be called back (with valid values) every second as the stream changes if you like in either C or C#. For those writing a managed application that Microsoft code example I posted ealier (which comes from the WM 6.0 SDK) manages to do all that in just a few lines of code (as the hard work of the above has already been done). As to the 'Virtual GPS COM Port', yes it does do what it advertises, but it may not be populated on the terminal in all cases. It is an optional setup step. It also requires a few lines of code (tens-hundreds at least) to get it to where the Microsoft example is already. It is also documented as a 'legacy' item. New application developers are encouraged to use the Microsoft APIs where they can. Richard LH

A Arsen Bandurian

OK, thanks for spending time and effort on these detailed explanations

R Richard Linsley-Hood

Reading from  the COM port should really be considered a legacy operation (unless you are just trying to save the raw GPS data). Microsoft provide a set of wrappers that parse the COM port data and provide event driven delivery of the result to applications as well as allowing more than one application access to the GPS at the same time). This then comes down to deciding what you are trying to do. To save the raw data, open a COm port and write it to a file (as VisualGPS does). To use the GPS data in an application, use the Microsoft APIs. Richard LH

A Arsen Bandurian

Every time I hear "Microsoft has created a set of wrappers" it appears to me as "And this is the place where it starts to become laggy and flaky" No intent for holy war, I understand why they are there. BTW, wasn't this "Virtual GPS COM Port", that you set up in Control Panel -> GPS Settings, created especially to resolve the problem with COM Port exclusiveness? I thought It could be opened by multiple apps at the same time...

R Richard Linsley-Hood

Also, for a managed code example, see http://www.codeproject.com/KB/mobile/FindMe.aspx "Obtaining the Current Location
The Intermediate GPS Driver handles the details of interfacing to the GPS hardware for us. I'm using a wrapper included in the Windows Mobile 6 SDK that simplifies the use of the driver. The code works well, and is easy to use, so I would encourage you to consider using it instead of creating your own GPS reading code. Initializing the GPS object can be done in a few lines of code:

gps = new Gps(); gps.LocationChanged += new LocationChangedEventHandler(gps_LocationChanged);gps.Open();
The EventArgs received from the LocationChanged event contains more details than you'll probably ever need from the GPS receiver. I simply save the Position member from the EventArgs and update the _currentLocation object.

void gps_LocationChanged(object sender, LocationChangedEventArgs args){ if (args.Position.LatitudeValid && args.Position.LongitudeValid) { currentPosition = args.Position; UpdatePosition(); }}
When the program no longer needs to use the GPS Receiver, a call to Gps.Close() is made to end the object's worker thread. Not doing this could cause the program to never terminate."Richard LH

A Arsen Bandurian

Isn't the easiest way just to open the GSM virtual COM port and read NMEA data as is? As far as I understood this is exactly what VisualGPSce does. Am I right or wrong?

E Efkan YILMAZ

Yes, that is what VisualGPSCE does.  It also has a logging mode that will allow you to capture the NMEA data directly to a file.  But any software that will capture serial data and log to a file will work. Also think the 6096 has a an option to log GPS directly to a file via the GPS setup icon.

E Efkan YILMAZ

What I normally do is log NMEA data to a log file - VisualGPSCe will do this (free download).  I also have written my own utilities to do this as well. Then to replay the data, I have written a serial driver that replays GPS NMEA data from a file - the GPS software opens this port rather than the hardware or Microsoft Intermediate GPS port  Also think that ECSG might have a similar tool (contact Gene Niles).

R Richard Linsley-Hood

If you are creating a managed application (C#) then a good starting point is the Microsoft Demo code for GPS on Windows Mobile at http://msdn.microsoft.com/en-us/library/bb158699.aspx. "This code sample is named GPS. It demonstrates how to use managed code to write a C# Windows Mobile Global Positioning System (GPS) application. This code sample demonstrates how to wrap the native GPS APIs in a C# class. It demonstrates how to use "Platform Invoking" ( PInvoke) to make calls to unmanaged APIs (in this case, CreateProcess)."Richard H

CONTACT
Can’t find what you’re looking for?