Thales' cellular IoT products business is now part of Telit Cinterion, find out more.

You are here

EHS8 GPS with Java API | Telit Cinterion IoT Developer Community

March 22, 2017 - 4:37pm, 7536 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/mode/GPSANT","std" are there more such settings to adjust to get it work?