About GPS XTRA Interface Support

1,715 views
Skip to first unread message

Mayank Rana

unread,
Dec 19, 2008, 3:23:05 PM12/19/08
to android-...@googlegroups.com
Hi All,
 
 
I am implementing GPS Interfaces provided in gps.h file.
I am not able to understand the purpose of GPS XTRA Interface i.e.
Extended Interface  for XTRA Support

/** The download request callback routine. */
typedef void (* gps_xtra_download_request)();

/** The download request callback structure. */
typedef struct {
        gps_xtra_download_request download_request_cb;
} GpsXtraCallbacks;

/** Extended interface for XTRA support. */
typedef struct {
    int  (*init)( GpsXtraCallbacks* callbacks );
    int  (*inject_xtra_data)( char* data, int length );
} GpsXtraInterface;

Can anyone give me usecase when these interfaces/callbacks will be called from any Location based application in Android ? Or What is the purpose of these interfaces/callbacks ?

Thanks in Advance.
 
Regards,
_-_Mayank Rana_-_

Mike Lockwood

unread,
Dec 19, 2008, 3:45:25 PM12/19/08
to android-...@googlegroups.com
The XTRA interface is to support a Qualcomm specific feature for the
GPS implementation on the G1. It is used for downloading long term
orbit predictions from a Qualcomm server. For other GPS
implementations, this interface is unused.

Mike

--
Mike Lockwood
Google android team

mak

unread,
Dec 19, 2008, 4:17:06 PM12/19/08
to android-platform
Mike,

Thanks for above information.
How about interface const void* (*get_extension)(const char* name) in
GpsInterface ?
Why someone will implement this interface for GPS Application? Is this
related to XTRA Interface ?
To me it looks that it is related to XTRA interface.



Regards,
_-_Mayank Rana_-_
> Google android team- Hide quoted text -
>
> - Show quoted text -

Mike Lockwood

unread,
Dec 19, 2008, 4:40:43 PM12/19/08
to android-...@googlegroups.com
The get_extension() API is used to get the XTRA interface, but could
be used for other extensions in the future as well (for example, it
might be used for SUPL support).

But this API is not intended to be used for applications.
Applications should use the Location Manager instead.

Mike

mak

unread,
Dec 23, 2008, 12:51:48 PM12/23/08
to android-platform
About Compiling libgps.so.

Should gps.cpp be part of libgps.so ? OR libgps.so can be any GPS
Chip related code only.
If yes, then to access function/header files form GPS Chip related
code, what should be included in Android.mk file for gps.cpp ?



Regards,
_-_Mayank Rana_-_

Mike Lockwood

unread,
Dec 23, 2008, 12:59:44 PM12/23/08
to android-...@googlegroups.com
Hi Mayank,

There is a gps.cpp at hardware/libhardware/gps/gps.cpp. This file is
included in libhardware.so. It is used to communicate with the
hardware specific code in libgps.so.

It turns out that there is also a gps.cpp that is used to build
libgps.so. But this code contains Qualcomm proprietary information
and is not included in the open source release. But if you are
implementing your own GPS, you will have your own implementation of
libgps.so, and it is up to you whether your implementation includes a
file called gps.cpp or not. But anyway, the gps.cpp you see in the
sources is for libhardware, not libgps.

I hope this helps,
Mike

mak

unread,
Dec 23, 2008, 2:40:45 PM12/23/08
to android-platform
Hi Mike,

I am also having libgps.so which is some proprietary information about
GPS hardware.
In gps.cpp which is part of libhardware.so, How can I use libgps.so
references i.e. APIs/Definitions in gps.cpp?
Is libhardware.so part of libgps.so OR both are independent entities ?


Regards,
_-_Mayank Rana_-_

pavan savoy

unread,
Dec 23, 2008, 3:04:15 PM12/23/08
to android-...@googlegroups.com
It depends on where the source of gps library which creates the libgps.so is placed.
based on that I suppose you can edit the Android.mk file to have a definition like
LOCAL_C_INCLUDES += hardware/libhardware/my_own_gps_lib_dir/include/
 
regards,
Pavan

Mike Lockwood

unread,
Dec 27, 2008, 1:10:51 AM12/27/08
to android-...@googlegroups.com
Hi Mayank,

I am responding back on android-platform so other people working on
similar things can benefit from the discussion.

The makefile hardware/libhardware/gps/Android.mk needs to have
BOARD_GPS_LIBRARIES defined. So try adding:

BOARD_GPS_LIBRARIES := libgps

to whatever BoardConfig.mk file you are using. If you do not have
your own BoardConfig.mk file, you should probably set up a
subdirectory of the vendor directory for your hardware. See:

http://android.git.kernel.org/?p=platform/vendor/asus/eee_701.git;a=tree;h=refs/heads/master;hb=master

or:

http://android.git.kernel.org/?p=platform/vendor/htc/dream.git;a=tree

for an example of how to do that.

Mike


On Fri, Dec 26, 2008 at 3:25 PM, mak <mayank....@gmail.com> wrote:
> Hi Mike,
>
> I sincerely need your help on this. Please reply with your
> suggestions.
> Let me tell you my scenario.
>
> 1. libgps.so is created as you have mentioned that in your case it is
> Qualcomm proprietary code. In my case, it is my proprietary code.
> Can you tell me How can I link libgps.so to libhardware.so?
> As I am getting error while libhardware.so try to use gps.o which is
> refering libgps.so ( I make sure that libgps.so has all symbols ).
>
> Waiting for your reply.
>
> Thanks.
>
> Regards,
> _-_Mayank Rana_-_
>


> On Dec 23, 11:59 am, "Mike Lockwood" <lockw...@android.com> wrote:

mak

unread,
Dec 28, 2008, 10:47:42 AM12/28/08
to android-platform
Mike,

I have already tried with this changes. But I am still gettting same
error.
It looks to me that I am missing any flags/rules in Makefile to link
between two .so file.
As it is getting compile but while try to create libhardware.so using
gps.o , it is not getting symbols from libgps.so but I am able to see
that those symbols are there in libgps.so.

Please suggest to solve this problem.

Regards,
_-_Mayank Rana_-_

On Dec 27, 12:10 am, "Mike Lockwood" <lockw...@android.com> wrote:
> Hi Mayank,
>
> I am responding back on android-platform so other people working on
> similar things can benefit from the discussion.
>
> The makefile hardware/libhardware/gps/Android.mk needs to have
> BOARD_GPS_LIBRARIES defined.  So try adding:
>
> BOARD_GPS_LIBRARIES := libgps
>
> to whatever BoardConfig.mk file you are using.  If you do not have
> your own BoardConfig.mk file, you should probably set up a
> subdirectory of the vendor directory for your hardware.  See:
>
> http://android.git.kernel.org/?p=platform/vendor/asus/eee_701.git;a=t...

Thomas Younsi

unread,
Apr 22, 2014, 2:34:48 PM4/22/14
to android-...@googlegroups.com
This is not true this interface is used to download ANY long term orbit predictions. Broadcom also support this interface
on all Android platform.
Reply all
Reply to author
Forward
0 new messages