Gemalto is now part of the Thales Group, find out more.

You are here

EHS8 GPS with Java API | Thales IoT Developer Community

March 22, 2017 - 4:37pm, 5386 views


i'm trying to get GPS coordinates via the JAVA API. The code is the following:

LocationProvider locProvider = null;

Criteria crit = new Criteria();    




 crit.setHorizontalAccuracy(1); // accuracy in meters


locProvider = LocationProvider.getInstance(crit); 

Location loc = locProvider.getLocation(60);

 _longval = loc.getQualifiedCoordinates().getLongitude();

 _latval = loc.getQualifiedCoordinates().getLatitude();


When i try to run this i get the following exception:

location could not be retrieved or timeout expired

Is there any configuration which should be done before using the EHS8-GPS?

I found the ^SCFG: "Gpio/****/GPSANT","std" are there more such settings to adjust to get it work?