EHS8 GPS with Java API | Telit Cinterion IoT Developer Community
March 22, 2017 - 4:37pm, 7202 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/mode/GPSANT","std" are there more such settings to adjust to get it work?
BR
Andy
thank you very much Bartlomiej.
Lenin