I don’t have an XA2 device, and cannot comment much on the issue for this specific device. But I didn’t see any comment in this thread (I may have missed it though) explaining how to debug the hybris geocode provider.
As far as I understand, the location is provided to Qt by Geocode. This daemon is responsible to broadcast over DBus the location and related data. It is using two sources on device to get the location : Mozilla location service based on tower ids in the surrounding, and an hybris layer that can talk to the on-board GPS via Android interface.
This hybris layer is open source, see https://github.com/mer-hybris/geoclue-providers-hybris repo. In particular https://github.com/mer-hybris/geoclue-providers-hybris/blob/master/binder/binderlocationbackend.cpp
You can then run the layer from command line and see what the on-board GPS is actually sending back to the user land. This may help to understand if it’s hardware related or software related :
- don’t run any application requesting location,
- from command line run
QT_LOGGING_RULES="*.debug=true" /usr/libexec/geoclue-hybris
- start any application requesting location.
The layer is initializing and outputting something like :
[D] unknown:0 - QConnmanEngine: ofono dbus service registered: "org.ofono"
[D] unknown:0 - QConnmanEngine: connman dbus service registered: "net.connman"
[D] unknown:0 - QConnmanEngine: setup connman configurations
[D] unknown:0 - QConnmanEngine: initialize
[D] unknown:0 - QConnmanEngine: setup connman configurations
[D] unknown:0 - Cellular technology not available
[D] unknown:0 - Default data modem changed to ""
[W] unknown:0 - Initialising GNSS interface
[D] unknown:0 - capabilities 0x363
[D] unknown:0 - GNSS set system info
[W] unknown:0 - Initialising AGNSS RIL interface
[W] unknown:0 - Initialising GNSS Debug interface
[W] unknown:0 - Setting SUPL server to supl.sonyericsson.com (7275) failed
[D] unknown:0 - true true true true QFlags<LocationSettings::DataSources>(GpsData)
[D] unknown:0 - Default data modem changed to "/ril_0"
[D] unknown:0 - Cellular technology available and not connected
[D] unknown:0 - true true true true QFlags<LocationSettings::DataSources>(GpsData)
[D] unknown:0 - Cellular connected false
[D] unknown:0 - Connection manager valid changed
And then GPS data from Android starts to flow in like :
[D] unknown:0 - new watched service, stopping idle timer.
[D] unknown:0 - Starting positioning
[D] unknown:0 - Engine on
[D] unknown:0 - Injecting position 3 1654677624 45.2005 5.62935 nan 9000 nan
[D] unknown:0 - Injecting position 3 1654677624 45.2005 5.62935 nan 9000 nan
[D] unknown:0 - 1654677626286 "$GPGSV,3,1,12,02,02,036,,04,06,314,,05,15,074,,11,00,000,,1*66"
[D] unknown:0 - 1654677626286 "$GPGSV,3,2,12,16,16,296,,18,52,161,,20,11,043,,22,01,227,,1*60"
[D] unknown:0 - 1654677626286 "$GPGSV,3,3,12,25,35,112,,26,45,300,,29,61,047,,31,55,234,,1*6A"
[D] unknown:0 - 1654677626286 "$GLGSV,3,1,10,74,59,140,,66,00,000,,86,06,216,,73,11,140,,1*7D"
[D] unknown:0 - 1654677626286 "$GLGSV,3,2,10,76,04,320,,75,59,322,,84,59,033,,83,00,000,,1*7A"
[D] unknown:0 - 1654677626286 "$GLGSV,3,3,10,85,52,219,,67,04,002,,1*7E"
[D] unknown:0 - 1654677626286 "$GAGSV,2,1,08,01,42,118,,03,00,000,,09,00,000,,10,00,000,,7*7C"
[D] unknown:0 - 1654677626286 "$GAGSV,2,2,08,12,23,198,,24,27,303,,31,78,317,,33,67,149,,7*7F"
[D] unknown:0 - 1654677626299 "$GPGSA,A,1,,,,,,,,,,,,,,,,*32"
[D] unknown:0 - 1654677626299 "$GPVTG,,T,,M,,N,,K,N*2C"
[D] unknown:0 - 1654677626299 "$GPDTM,,,,,,,,*4A"
[D] unknown:0 - 1654677626299 "$GPRMC,,V,,,,,,,,,,N,V*29"
[D] unknown:0 - 1654677626299 "$GPGNS,,,,,,N,,,,,,,V*79"
[D] unknown:0 - 1654677626299 "$GPGGA,,,,,,0,,,,,,,,*66"
[...]
The actual output corresponds to a timestamp and the content of the Nmea string. If you read the above source, you’ll see that this string is actually not directly used to get the location, but it may give information of what the on-board GPS is receiving and if it is properly functioning. Compiling the above source in SDK is very easy if one what to add more debug statements and investigate deeper.
Good luck ; )