4. Original Architecture
• GPS Shim Layer
– WM: GPSID
– Android: LocationProvider
• PD API is the interface for APP Processor and Modem
Processor.
5. Current Architecture
●
Legal Concerns
– Licensee does not get source code of libgps.so
– PD API cannot be open source
– Location API is created to enable licensee to have full
visibility of Android GPS software implementation
10. JNI - Java Native Interface
●
The Java Native Interface (JNI) is a programming
framework that allows Java code running in a Java Virtual
Machine (JVM) to call and to be called by native
applications (programs specific to a hardware and
operating system platform) and libraries written in other
languages, such as C, C++ and assembly.
●
Android is based on a JVM called Dalvik.
Framework
Tobe
Called
Call
12. GpsInterface Structure
●
typedef struct {
int (*init)( GpsCallbacks* callbacks );
int (*start)( void );
int (*stop)( void );
void (*set_fix_frequency)( int frequency );
void (*cleanup)( void );
int (*inject_time)(GpsUtcTime time, int64_t timeReference, int
uncertainty);
void (*delete_aiding_data)(GpsAidingData flags);
int (*set_position_mode)(GpsPositionMode mode, int
fix_frequency)
const void* (*get_extension)(const char* name);
} GpsInterface;
●
Each GPS hardware vendor who wants Android to support its GPS
solution must provide a GPS library that conforms to the interface.
13. int (*init)(GpsCallbacks* callbacks)
●
This function sets up the communication channel between the
upper Android GPS software module and libloc_api.so
●
typedef struct {
gps_location_callback location_cb;
gps_status_callback status_cb;
gps_sv_status_callback sv_status_cb;
} GpsCallbacks;
●
gps_status_callback is used to inform the Android upper layer of
the GPS engine status change (On or Off). The practical usage
of this callback is the Android UI GPS status icon. When the
engine is on, the icon should appear. When engine is off, the
icon should disappear.
14. const* void (*get_extension)(const char* name)
●
This function is used to get extended GPS functionalities
support.
●
In QC gpsOne gen7 Solution, we have two extended GPS
functionalities.
– gpsOneXTRA
●
sGpsInterface-
>get_extension(GPS_XTRA_INTERFACE)
●
struct GpsXtraInterface
– SUPL AGPS
●
sGpsInterface-
>get_extension(GPS_SUPL_INTERFACE)
●
struct GpsSuplInterface
15. LOC API
●
Interface between Modem Processor And Application Processor
●
Design philosophy of location API
– Simplicity
– Extendibility
– Full gpsOne support
●
Five APIs are created to achieve design goal
– loc_open
– loc_close
– loc_start_fix
– loc_stop_fix
– loc_ioctl
18. loc_ioctl
●
This API is used to perform the following functionality:
– Gets API version
– Sets/gets fix criteria
– NI user notification/verification
– XTRA data/time injection
– Assistance data (time/position) injection
– Post server connection opening/closing request result
– Sets/gets LOC engine configuration (NV item)
– Assistance data deletion to force cold start of the
location engine
20. Network-Initiated Notification And Verification
●
The SET (SUPL Enabled Terminal) has to show the NI fix
request to the user, and sends the verification from the user
back to SUPL server.
●
This feature has not been implemented yet although this is
a necessary feature for any AGPS system.
●
In order to meet the requirements of customer and pass
IOT verification, we have to implement this feature by
ourselves.
21. SSL Certification for FET SUPL Server
●
FET Requirements
●
We have to use URL (agps.fetnet.net) for SSL certification,
but GpsLocationProvider.java translates it to IP string first
●
We have to provide an UI for user to decide whether SSL
certification is activated or not.
23. Summary
●
For open source, location API is created to enable licensee
to have full visibility of Android GPS software
implementation and a new library libloc_api.so is adopted.
●
GPS Software Interface:
– JNI: Between Java And C++
– HAL: Between Android Framework And LOC Engine
– LOC API: Between Modem Processor And Application
Processor