GPS android 2.3

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GPS android 2.3

4,446 Views
Kirill
Contributor I

Hello!

I am trying to get android gps system working. I have a gps module
which output NMEA format data. It is connected to my devboard through
USB and I use standard ftdi driver. It creates /dev/ttyUSB0 interface.
Output speed of gps data is 4800, I change to it with busybox stty -F /
dev/ttyUSB0 4800 from 115200. I downloaded freerunner nmea gps parser
that implements gps.h. Then i put the source file (fr_gps.c) of parser
to

$android/src/hardware/mx5x/libgps/

directory with Android.mk file

LOCAL_PATH := $(call my-dir)
ifneq ($(TARGET_PRODUCT),sim)
# HAL module implemenation, not prelinked and stored in
# hw/<GPS_HARDWARE_MODULE_ID>.<ro.hardware>.so
        include $(CLEAR_VARS)
        LOCAL_PRELINK_MODULE := false
        LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
        LOCAL_SHARED_LIBRARIES := liblog libcutils libhardware
        LOCAL_SRC_FILES := gps_freerunner.c
        #LOCAL_SRC_FILES += gps.c
        LOCAL_MODULE := gps.default
        LOCAL_MODULE_TAGS := eng
        include $(BUILD_SHARED_LIBRARY)
   # endif
endif

after compilation i put gps.default.so to

/system/lib/hw

directory and reboot my android. But any map application shows "GPS
disabled couldnt get location".
I didnt set BOARD_GPS_LIBRARIES in BoardConfig.mk. greping all files
in source tree I didnt find any file that using it. In source file of
parser I see LOGD messages but logcat didnt show anything. Could
anybody put me on right way, give some advices? googling through web
gives me fractional information about this.

Thanks!

Tags (1)
0 Kudos
14 Replies

1,745 Views
doronsandroy
Contributor I

Hi Kirill

i have the same problem.

Mi board is Mx6 android

and i do not now how to connct the gps so lib to the java.

I need sam help.

Thnkes doron

doronsa@gmail.com

0 Kudos

1,745 Views
ToxicAvenger
Contributor III

Hi,

I have similar problem. My GPS device is on /dev/ttyUSB3, i see output with "cat /dev/ttyUSB3"

I added freerunner driver, and changed BoardConfig adding:

BOARD_GPS_LIBRARIES := libgps

Also i added entry in init.rc:

setprop ro.kernel.android.gps ttyUSB3

But GPS is not working in Android.


Can you help me?


Best regards,

Toxic

0 Kudos

1,745 Views
ToxicAvenger
Contributor III

Hello,

I have changed LOCAL_MODULE := gps.default to LOCAL_MODULE := gps.<platform> and GPS almost works.

Only problem i have at the moment is incorrect number of sattelites.

I suppose that fix is here: NelsonChung's blog: Android GPS porting HAL code - Fix GPSStatus and GPSSvStatus issue.

Could someone translate (explain) it for me? I don't know Chineese language.

Best regards,

Toxic

0 Kudos

1,745 Views
ToxicAvenger
Contributor III

Hello,

I still have this problem. Any help will be appreciated.

Regards,

Toxic

0 Kudos

1,745 Views
munna
Contributor I

Hi kirill, can u send me how u got it working even im facing the same problem, i got data in the terminal when doing cat /dev/ttyUSB0, i did the same thing like you with freerunner implementation.

Can u help me please.

Kirill Danilenko said:

Thanks for reply, I already get it working.

0 Kudos

1,745 Views
munna
Contributor I

I have the same problem when integrating telit gps to imx53 qsb board can anybody help me!

0 Kudos

1,745 Views
nit123
Contributor I

Just check your deamon is running or not?

0 Kudos

1,745 Views
Kirill
Contributor I

http://groups.google.com/group/android-ndk/browse_thread/thread/dd04fa705e33960e/c2f242f934c43995

maybe it will help, compile you library only with a help of android's toolchain

0 Kudos

1,745 Views
SimonasL_
Contributor II

Hello Kiril,

I am at exactly the same point as you have described.

Apparently, my gps.imx5x.so file does not contain symbol "HMI" , the error spat on logcat:

E/HAL ( 2223): load: couldn't find symbol HMI

The Android.mk file looks 95% identical to yours, the only difference is that I am building the .so under hardware/mygpssupport instead of hardware/mx5/mygps....

How could I make HMI appear in the file, so code execution could proceed in hardware/libhardware/hardware.c:163:

    hmi = (struct hw_module_t *)dlsym(handle, sym);

Many thanks,

Simonas

0 Kudos

1,745 Views
Kirill
Contributor I

i send you private message

0 Kudos

1,745 Views
StephenZhang
Contributor I

Hi,Kirill

I am new to Android and Android GPS.

I want to make UART GPS working on our platform.

Would you pls give me some advices on how to make it work.

thanks & Best regards,

Stephen zhang

0 Kudos

1,745 Views
Kirill
Contributor I

Thanks for reply, I already get it working.

0 Kudos

1,745 Views
carlsalah
Contributor I

Hi Kirill,

   I am using customized board based on am335xevm , and i have ported linux and android

I am new to android , but  have managed to read the gps data on linux (by opening and read the uart port data)

I need to add android gps driver (in order to make the gps chip  communicate with GL engine and Android Location Services)

Kindly ,would you give me some advices and guidelines to make do that.

thanks

Carl

0 Kudos

1,745 Views
charleschang
Contributor III

here are some notes from the one makes gps working on imx51_bbg:

 

http://nelsonchunglife.blogspot.com/2010/12/android-gps-porting-hal-code-fix.html

0 Kudos