Share via


My GPS Sensor is not working with Windows Store apps!

I wanted to try using the GPS sensor I had with my Windows Store app and discovered I only could get my position from WiFi data.  Here are the troubleshooting steps I took and how I resolved this issue.  Hopefully this will help you too!

Sample Code

I used our sample (scenario 2) to see if I could get my Sensor to report my position: https://code.msdn.microsoft.com/windowsapps/Geolocation-2483de66/ .  Scenario 2 displays the Coordinate.PositionSource of the Geoposition object which will tell me how I got my position.

GPS Device used

The actual device I was using was from my Microsoft Streets and Trips software I got a couple of years ago.  It is a simple USB dongle from u-blox.  I did verify it was recognized as a device in Device Manager and there were no problems and you can see it shows up as a COM3 port:

image

Testing, problem and further troubleshooting

I fired up the sample app and chose Scenario 2 but always got back that I was receiving my position from WiFi.  I figured if I had WiFi disabled it may force the GPS to get my data.  This didn’t resolve the issue however.

I found that I could test the sensor functionality with the Sensor Diagnostic Tool and tried that, but it did not recognize the sensor: https://msdn.microsoft.com/en-US/library/windows/hardware/hh780319(v=vs.85).aspx

I remembered reading that the APIs could read from GNSS Sensors (not COM Ports) so that must be the problem.  Sure enough I found a driver for this particular device (as shown above) and installed it:

image

and NOW it appears as a Sensor in device manager:

image

Running the Sensor Diagnostic tool it transitioned from Initializing to Ready and I knew I could use it now!

image

Or not…. The app STILL reports back the source as WiFi.  Finally I know that WiFi is limited in accuracy so just maybe the system is picking WiFi because it is accurate enough.  Success!  I set the desired accuracy to 99 (default 100) and the app successfully communicates with the device and the source is the GPS dongle.

Summary

If you are having trouble with your device working with your Windows Store app, you need to verify the following.

  1. Ensure Device Manager shows your GNSS device under ‘Sensors’ and there are no warnings.  If it does not appear, go to the manufacturer to see if they supply a Windows 8.1 GNSS driver for the device (if they don’t you cannot use this device).
  2. Ensure you give time for the sensor to acquire the satellite data (sometimes this takes time) and test it with the Sensor Diagnostic tool.
  3. Pick High accuracy or set the DesiredAccuracyInMeters to less than 100 meters to ensure you use the GNSS sensor

I hope this clears some things up for you all and you can successfully connect to your GNSS sensor.  Be sure to bug your sensor manufacturer if they have not yet supplied a Windows 8.1 GNSS Sensor driver for your device!

Please drop me a note if you found this useful.

Don’t forget to follow the Windows Store Developer Solutions team on Twitter @wsdevsol. Comments are welcome, both below and on twitter.

- Jeff Sanders(Microsoft) @jpsanders

Comments

  • Anonymous
    May 08, 2014
    Hello, nice article, Do you know if this kind of manipulation is also possible on Windows RT (say a MS Surface with a Bluetooth dongle) ? Because many users reports that their GPS is not working and not recognized by my Store App. Do I need to read the Bluetooth data directly using the new Windows 8.1 APIs (msdn.microsoft.com/.../bg182882.aspx) ? Thanks, Fabien

  • Anonymous
    June 18, 2014
    We had this issue and our hardware manufacturer was able to provide an updated sensor driver. However, the WinRT API still will opt to use WiFi as a source even when the .DesiredAccuracyInMeters is set to a low integer. It seems that there isn't a way to force it to use (or wait for) the GPS sensor.

  • Anonymous
    November 07, 2014
    GPS sensor initializing take time on Dell venue 8 pro 3G version. By running this tool initializing was fast. Any solution to initialize this fast ?