SlideShare a Scribd company logo
1 of 26
Download to read offline
The GPS Architecture
on Android 1.5
Agenda
●
Background
●
Software Architecture on Application Processor
●
GPS Software Interface on Android
●
Code Examples
●
QC GPS Test Tool Demo
●
Summary
●
Q&A
Background
Original Architecture
• GPS Shim Layer
– WM: GPSID
– Android: LocationProvider
• PD API is the interface for APP Processor and Modem
Processor.
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
Software Architecture on
Application Processor
Overview
●
GPS Application
– Google maps
●
Location Manager
– Shim layer which provides
location-related services
●
GPS HAL
– Enables Android GPS to
run on various GPS HW
●
QC GPS library
– Implementation for QC
gpsOne features
– Initial: libgps.so
– Current: libloc_api.so
Host BSP is in charge of following blocks
Framework
HA
L
LOC Engine
GPS Software Interface on Android
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
GPS HAL
Hardware-
Independent
Hardware-Dependent
●
Interface between Framework And LOC Engine
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.
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.
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
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
loc_open
●
Register LOC_EVENT types we need and a callback
function for LOC_EVENT reporting.
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
Code Example
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.
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.
QC GPS Test Tool Demo
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
Q&A
GPS Software Arch.
Framework
HA
L
LOC Engine
GPS Software Arch.
Framework
HA
L
LOC Engine

More Related Content

What's hot

Android OTA updates
Android OTA updatesAndroid OTA updates
Android OTA updatesGary Bisson
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debuggingUtkarsh Mankad
 
ABS 2012 - Android Device Porting Walkthrough
ABS 2012 - Android Device Porting WalkthroughABS 2012 - Android Device Porting Walkthrough
ABS 2012 - Android Device Porting WalkthroughBenjamin Zores
 
Basic Android Animation
Basic Android Animation Basic Android Animation
Basic Android Animation Shilu Shrestha
 
3D SLAM introcution& current status
3D SLAM introcution& current status3D SLAM introcution& current status
3D SLAM introcution& current statuse8xu
 
Android Radio Layer Interface
Android Radio Layer InterfaceAndroid Radio Layer Interface
Android Radio Layer InterfaceChun-Yu Wang
 
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)Nanik Tolaram
 
RIL and Android Telephony
RIL and Android TelephonyRIL and Android Telephony
RIL and Android TelephonyLeaf Johnson
 
Android OS Porting: Introduction
Android OS Porting: IntroductionAndroid OS Porting: Introduction
Android OS Porting: IntroductionJollen Chen
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessNanik Tolaram
 
Camera 2.0 in Android 4.2
Camera 2.0 in Android 4.2 Camera 2.0 in Android 4.2
Camera 2.0 in Android 4.2 Balwinder Kaur
 
Gps presentation
Gps presentationGps presentation
Gps presentationpavimalpani
 
Global Positioning System
Global Positioning SystemGlobal Positioning System
Global Positioning SystemRishi Shukla
 
"Fundamentals of Monocular SLAM," a Presentation from Cadence
"Fundamentals of Monocular SLAM," a Presentation from Cadence"Fundamentals of Monocular SLAM," a Presentation from Cadence
"Fundamentals of Monocular SLAM," a Presentation from CadenceEdge AI and Vision Alliance
 
웹 접근성 평가도구 OpenWAX 뜯어보기
웹 접근성 평가도구 OpenWAX 뜯어보기웹 접근성 평가도구 OpenWAX 뜯어보기
웹 접근성 평가도구 OpenWAX 뜯어보기Goonoo Kim
 
Accessing Hardware on Android
Accessing Hardware on AndroidAccessing Hardware on Android
Accessing Hardware on AndroidGary Bisson
 
Global position system
Global position systemGlobal position system
Global position systemIqbal Khan
 

What's hot (20)

Android OTA updates
Android OTA updatesAndroid OTA updates
Android OTA updates
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debugging
 
ABS 2012 - Android Device Porting Walkthrough
ABS 2012 - Android Device Porting WalkthroughABS 2012 - Android Device Porting Walkthrough
ABS 2012 - Android Device Porting Walkthrough
 
Basic Android Animation
Basic Android Animation Basic Android Animation
Basic Android Animation
 
3D SLAM introcution& current status
3D SLAM introcution& current status3D SLAM introcution& current status
3D SLAM introcution& current status
 
Android Radio Layer Interface
Android Radio Layer InterfaceAndroid Radio Layer Interface
Android Radio Layer Interface
 
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
 
Introduction to shaders
Introduction to shadersIntroduction to shaders
Introduction to shaders
 
RIL and Android Telephony
RIL and Android TelephonyRIL and Android Telephony
RIL and Android Telephony
 
Android OS Porting: Introduction
Android OS Porting: IntroductionAndroid OS Porting: Introduction
Android OS Porting: Introduction
 
Android Things : Building Embedded Devices
Android Things : Building Embedded DevicesAndroid Things : Building Embedded Devices
Android Things : Building Embedded Devices
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting Process
 
Camera 2.0 in Android 4.2
Camera 2.0 in Android 4.2 Camera 2.0 in Android 4.2
Camera 2.0 in Android 4.2
 
Gps presentation
Gps presentationGps presentation
Gps presentation
 
Global Positioning System
Global Positioning SystemGlobal Positioning System
Global Positioning System
 
"Fundamentals of Monocular SLAM," a Presentation from Cadence
"Fundamentals of Monocular SLAM," a Presentation from Cadence"Fundamentals of Monocular SLAM," a Presentation from Cadence
"Fundamentals of Monocular SLAM," a Presentation from Cadence
 
웹 접근성 평가도구 OpenWAX 뜯어보기
웹 접근성 평가도구 OpenWAX 뜯어보기웹 접근성 평가도구 OpenWAX 뜯어보기
웹 접근성 평가도구 OpenWAX 뜯어보기
 
Accessing Hardware on Android
Accessing Hardware on AndroidAccessing Hardware on Android
Accessing Hardware on Android
 
Global position system
Global position systemGlobal position system
Global position system
 
Automotive android
Automotive androidAutomotive android
Automotive android
 

Similar to The GPS Architecture on Android

LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2Linaro
 
HKG15-110: ODP Project Update
HKG15-110: ODP Project UpdateHKG15-110: ODP Project Update
HKG15-110: ODP Project UpdateLinaro
 
SFO15-102:ODP Project Update
SFO15-102:ODP Project UpdateSFO15-102:ODP Project Update
SFO15-102:ODP Project UpdateLinaro
 
Final Design Report_REVFINAL
Final Design Report_REVFINALFinal Design Report_REVFINAL
Final Design Report_REVFINALJacob Ramey
 
Using a Field Programmable Gate Array to Accelerate Application Performance
Using a Field Programmable Gate Array to Accelerate Application PerformanceUsing a Field Programmable Gate Array to Accelerate Application Performance
Using a Field Programmable Gate Array to Accelerate Application PerformanceOdinot Stanislas
 
Python Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkPython Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkAljoscha Krettek
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopLinaro
 
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...Flink Forward
 
Sdk For Firmware Development
Sdk For Firmware DevelopmentSdk For Firmware Development
Sdk For Firmware DevelopmentRamesh Prasad
 
Extended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesExtended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesPhil Estes
 
Proceso de certificación de gráficos
Proceso de certificación de gráficosProceso de certificación de gráficos
Proceso de certificación de gráficosMarketing Donalba
 
한컴MDS_Virtual Target Debugging with TRACE32
한컴MDS_Virtual Target Debugging with TRACE32한컴MDS_Virtual Target Debugging with TRACE32
한컴MDS_Virtual Target Debugging with TRACE32HANCOM MDS
 
Ros자작로봇황성관21
Ros자작로봇황성관21Ros자작로봇황성관21
Ros자작로봇황성관21성관 황
 
Internet of Things: Vehicular Tracking System
Internet of Things: Vehicular Tracking SystemInternet of Things: Vehicular Tracking System
Internet of Things: Vehicular Tracking SystemPrasannPatel4
 
Rhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesRhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesKonstantin Rybas
 
Vehicle Tracking System for School Bus by Arduino
Vehicle Tracking System for School Bus by ArduinoVehicle Tracking System for School Bus by Arduino
Vehicle Tracking System for School Bus by ArduinoIRJET Journal
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011pundiramit
 
Raising ux bar with offline first design
Raising ux bar with offline first designRaising ux bar with offline first design
Raising ux bar with offline first designKyrylo Reznykov
 

Similar to The GPS Architecture on Android (20)

LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2
 
HKG15-110: ODP Project Update
HKG15-110: ODP Project UpdateHKG15-110: ODP Project Update
HKG15-110: ODP Project Update
 
pin-Presentation
pin-Presentationpin-Presentation
pin-Presentation
 
SFO15-102:ODP Project Update
SFO15-102:ODP Project UpdateSFO15-102:ODP Project Update
SFO15-102:ODP Project Update
 
Final Design Report_REVFINAL
Final Design Report_REVFINALFinal Design Report_REVFINAL
Final Design Report_REVFINAL
 
Using a Field Programmable Gate Array to Accelerate Application Performance
Using a Field Programmable Gate Array to Accelerate Application PerformanceUsing a Field Programmable Gate Array to Accelerate Application Performance
Using a Field Programmable Gate Array to Accelerate Application Performance
 
Python Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkPython Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on Flink
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...
 
Sdk For Firmware Development
Sdk For Firmware DevelopmentSdk For Firmware Development
Sdk For Firmware Development
 
Extended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesExtended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use cases
 
Proceso de certificación de gráficos
Proceso de certificación de gráficosProceso de certificación de gráficos
Proceso de certificación de gráficos
 
한컴MDS_Virtual Target Debugging with TRACE32
한컴MDS_Virtual Target Debugging with TRACE32한컴MDS_Virtual Target Debugging with TRACE32
한컴MDS_Virtual Target Debugging with TRACE32
 
Ros자작로봇황성관21
Ros자작로봇황성관21Ros자작로봇황성관21
Ros자작로봇황성관21
 
Internet of Things: Vehicular Tracking System
Internet of Things: Vehicular Tracking SystemInternet of Things: Vehicular Tracking System
Internet of Things: Vehicular Tracking System
 
Rhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesRhomobile 5.5 Release Notes
Rhomobile 5.5 Release Notes
 
Pcp
PcpPcp
Pcp
 
Vehicle Tracking System for School Bus by Arduino
Vehicle Tracking System for School Bus by ArduinoVehicle Tracking System for School Bus by Arduino
Vehicle Tracking System for School Bus by Arduino
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011
 
Raising ux bar with offline first design
Raising ux bar with offline first designRaising ux bar with offline first design
Raising ux bar with offline first design
 

The GPS Architecture on Android

  • 2. Agenda ● Background ● Software Architecture on Application Processor ● GPS Software Interface on Android ● Code Examples ● QC GPS Test Tool Demo ● Summary ● Q&A
  • 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
  • 7. Overview ● GPS Application – Google maps ● Location Manager – Shim layer which provides location-related services ● GPS HAL – Enables Android GPS to run on various GPS HW ● QC GPS library – Implementation for QC gpsOne features – Initial: libgps.so – Current: libloc_api.so
  • 8. Host BSP is in charge of following blocks Framework HA L LOC Engine
  • 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
  • 16.
  • 17. loc_open ● Register LOC_EVENT types we need and a callback function for LOC_EVENT reporting.
  • 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.
  • 22. QC GPS Test Tool Demo
  • 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
  • 24. Q&A