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, 5933 views

Hi,

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

LocationProvider locProvider = null;

Criteria crit = new Criteria();    

 crit.setSpeedAndCourseRequired(false);

 crit.setAltitudeRequired(false);

 crit.setCostAllowed(false);  

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

 crit.setVerticalAccuracy(1);

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?

BR

Andy