Status GPS on Android-x86

4,042 views
Skip to first unread message

BenjaminWebb

unread,
Oct 6, 2010, 8:22:41 PM10/6/10
to Android-x86
I was wondering what the status is of running a gps on android x86. i
have a surfstar II usb one currently supported under Ubuntu but I have
yet to find gps software with descent routing and traffic etc. I see
android as the perfect operating system for a car tablet or computer.
Just waiting for the support to get there.

kwok

unread,
Oct 7, 2010, 5:58:48 AM10/7/10
to Android-x86
I believe you have to implement your own LocationProvider to process
the NMEA your GPS device and add this LocationProvider to the Android-
x86,
see http://developer.android.com/reference/android/location/LocationProvider.html

Then, you can use any GPS app from the Android market ..

Obviously, the hard part is to implement and add such LocationProvider
service to the Android-x86.

BenjaminWebb

unread,
Oct 7, 2010, 6:54:53 PM10/7/10
to Android-x86
No that service looks easy to program I just need the drivers and gpsd
to load so I can convert from gpsd to the location provider unless you
guys are looking to reinvent the wheel.

On Oct 7, 5:58 am, kwok <kwok.w...@live.nl> wrote:
> I believe you have to implement your own  LocationProvider to process
> the NMEA your GPS device and add this LocationProvider to the Android-
> x86,
> seehttp://developer.android.com/reference/android/location/LocationProvi...

Bamm-Bamm

unread,
Oct 27, 2010, 10:27:14 PM10/27/10
to Android-x86
If you get that working, I'd be willing to purchase the software from
you.

jch.shin

unread,
Nov 2, 2010, 2:15:27 AM11/2/10
to Android-x86
Let me explain way that I run GPS on android-x86.

1. First of all, you have to search and download, 'gps_freerunner.c'

2. Move 'gps_freerunner.c' to 'hardware/libhardware_legacy/gps/'
folder.

3. Modify 'hardware/libhardware_legacy/gps/Android.mk' like below
-------------------------------------------------------
# Use hardware GPS implementation if available.
#
LOCAL_CFLAGS += -DHAVE_GPS_HARDWARE
# LOCAL_SHARED_LIBRARIES += $(BOARD_GPS_LIBRARIES)
LOCAL_SRC_FILES += gps/gps_freerunner.c
-------------------------------------------------------

4. Modify 'hardware/libhardware_legacy/gps/gps_freerunner.c'like below
-------------------------------------------------------
@@ -14,7 +14,7 @@
#include <cutils/log.h>
#include <cutils/sockets.h>
#include <cutils/properties.h>
-#include <hardware/gps.h>
+#include <hardware_legacy/gps.h>

#define GPS_DEBUG 0

@@ -1098,10 +1098,11 @@
return;
}

- if ( snprintf(device, sizeof(device), "/dev/%s", prop) >=
(int)sizeof(device) ) {
- LOGE("gps serial device name too long: '%s'", prop);
- return;
- }
+ //if ( snprintf(device, sizeof(device), "/dev/%s", prop) >=
(int)sizeof(device) ) {
+ // LOGE("gps serial device name too long: '%s'", prop);
+ // return;
+ //}
+ snprintf(device, sizeof(device), "/dev/%s",prop);

do {
state->fd = open( device, O_RDWR );
@@ -1296,7 +1297,7 @@
int fd;
char cmd = '0';
int ret;
-
+#if 0 // disble
if (property_get("gps.power_on",prop,GPS_POWER_IF) == 0) {
LOGE("no gps power interface name");
return;
@@ -1324,7 +1325,7 @@
close(fd);

DFR("gps power state = %c", cmd);
-
+#endif
return;

}
-------------------------------------------------------

5. For your USB or Serial GPS Device, your kernel must recognize !!!
For me, I use USB-GPS(PL2303), and kernel recognize by pl2303.ko
kernel module(CONFIG_USB_SERIAL_PL2303).
You simply check your device driver in ubuntu. However, default
android-x86 kernel does not include
pl2303 module, and there is not much driver for usb-to-serial module.
So, you have to customize kernel config and build your kernel.
After recognizing GPS device, you can check your device in '/dev/',
like '/dev/ttyUSBx' for USB2Serial.

You must add property for GPS device like below.(for example, assume
ttyUSB0)
> setprop ro.kernel.android.gps ttyUSB0

If you want to view demo, you can see GPS usage demo in
'www.androbox.co.kr > screenshot'.

Regards


On 10월28일, 오전11시27분, Bamm-Bamm <neocs...@gmail.com> wrote:
> If you get that working, I'd be willing to purchase the software from
> you.
>
> On Oct 7, 6:54 pm, BenjaminWebb <benjaminrw...@gmail.com> wrote:
>
>
>
>
>
>
>
> > No that service looks easy to program I just need the drivers and gpsd
> > to load so I can convert from gpsd to the location provider unless you
> > guys are looking to reinvent the wheel.
>
> > On Oct 7, 5:58 am, kwok <kwok.w...@live.nl> wrote:
>
> > > I believe you have to implement your own  LocationProvider to process
> > > the NMEA yourGPSdevice and add this LocationProvider to the Android-
> > > x86,
> > > seehttp://developer.android.com/reference/android/location/LocationProvi...
>
> > > Then, you can use anyGPSapp from the Android market ..
>
> > > Obviously, the hard part is to implement and add such LocationProvider
> > > service  to the Android-x86.
>
> > > On Oct 7, 2:22 am, BenjaminWebb <benjaminrw...@gmail.com> wrote:
>
> > > > I was wondering what the status is of running agpson android x86.  i
> > > > have a surfstar II usb one currently supported under Ubuntu but I have
> > > > yet to findgpssoftware with descent routing and traffic etc.  I see

richi

unread,
Nov 3, 2010, 9:06:12 AM11/3/10
to Android-x86
Hi,
How about the GPS mouse through Bluetooth?

kwok

unread,
Nov 4, 2010, 5:15:10 AM11/4/10
to Android-x86
Hi jch.shin,

I made a new froyo build using the information from your post (instead
I changed the codes to use /dev/rfcomm0 to input the GPS data).

I'm using the internal bluetooth chip of my eeepc to connect to a
Bluetooth GPS device.
I manually created /dev/rfcomm0 and have checked that I could received
the NMEA sentences from the remote BT GPS (using cat /dev/rfcomm0).

However, the Andoid system could still not find a gps provider.

Do you have more suggestions how to get this working?
Further, I enabled the debug logging of gps_freerunner.c, but I did
NOT see any debug message on the console.

Hope you can help.

Regards,
Kwok

kwok

unread,
Nov 4, 2010, 5:56:19 AM11/4/10
to Android-x86
I found out that I might need to remove the following line in .../gps/
gps.cpp as well:
#ifdef HAVE_GPS_HARDWARE

because I never set this.

Doing another build ...

^_^

unread,
Nov 6, 2010, 12:39:52 PM11/6/10
to Android-x86
Checkout http://sourceforge.net/p/bluegps4droid/home/
It's an app that creates a mock provider from bluetooth gps devices.
Only for android 2.X
Greetings.

richi

unread,
Nov 7, 2010, 1:48:05 AM11/7/10
to Android-x86
Great! It run well with google map, I will put them in apps.

On 11月7日, 上午12時39分, "^_^" <soytuputo...@gmail.com> wrote:
> Checkouthttp://sourceforge.net/p/bluegps4droid/home/

kwok

unread,
Nov 7, 2010, 6:11:58 AM11/7/10
to Android-x86
Finally get it working :)
I need to remove the mode check in function
freerunner_gps_set_position_mode(...) :
/*
if (mode != GPS_POSITION_MODE_STANDALONE)
DFR("%s: called with bad GpsPositionMode !!", __FUNCTION__);
return -1;
*/
as mentioned in http://d.hatena.ne.jp/yamanetoshi/20100722/1279774279

ady2k10

unread,
Nov 7, 2010, 6:57:33 PM11/7/10
to Android-x86
bluegps4droid apk is working on Froyo-eeepc. I have tested it.
It can detect bluetooth on mobile phone.


On Nov 7, 6:11 pm, kwok <kwok.w...@live.nl> wrote:
> Finally get it working :)
> I need to remove the mode check in function
> freerunner_gps_set_position_mode(...) :
> /*
>     if (mode != GPS_POSITION_MODE_STANDALONE)
>         DFR("%s: called with bad GpsPositionMode !!", __FUNCTION__);
>         return -1;
> */
> as mentioned inhttp://d.hatena.ne.jp/yamanetoshi/20100722/1279774279

richi

unread,
Nov 7, 2010, 9:28:20 PM11/7/10
to Android-x86
have fun with Google maps 4.6.0 http://www.coolapk.com/apk-1273-com.google.android.apps.maps/
> > > > > > > > > Just waiting for the support to get there.- 隱藏被引用文字 -
>
> - 顯示被引用文字 -

Bamm-Bamm

unread,
Nov 30, 2010, 11:35:44 PM11/30/10
to Android-x86
I'm tracking right up to step 5 in which you lose me.

kwok

unread,
Dec 1, 2010, 5:23:23 AM12/1/10
to Android-x86
What went wrong??
What GPS device (usb or bluetooth) your're using?

You need to figure out:
1. if the kernel 'recognizes' your device
2. if yes, check what device the kernel has created (/dev/usb-xyz-)
3. if no, you have to customize the kernel to load missing module

CrazyFrog

unread,
Dec 26, 2010, 9:18:40 AM12/26/10
to Android-x86
Hi,

Currently I'm working on a GPS project. I need to write a GPS HAL. My
board is BeagleBoard and I'm working with a BU-353 GPS.

I have followed the steps in http://d.hatena.ne.jp/yamanetoshi/20100722/1279774279,
but I just cannt receive the correct NEMA message. Can you help me and
tell me how to debug it? I have suffered it for a long time.

Yours
> > > > > > > Just waiting for the support to get there.- 隐藏被引用文字 -
>
> - 显示引用的文字 -

Emeka

unread,
May 27, 2012, 3:56:17 PM5/27/12
to andro...@googlegroups.com
Crazy Frog or anybody,

Did you ever get this figured out using your BU-353? I'm looking to get the same thing working on my Pandaboard.

Thanks!
Reply all
Reply to author
Forward
0 new messages