Re: Serial port GPS

3,092 views
Skip to first unread message

Chih-Wei Huang

unread,
May 5, 2013, 10:06:20 AM5/5/13
to Android-x86
4.0-RC2 supports serial port GPS.
You need to specify the port and baudrate in the properties, e.g.,

ro.kernel.android.gps=ttyUSB0
ro.kernel.android.gpsttybaud=115200


2013/5/3 Keen Lee <achi...@gmail.com>:
> Hi,
>
> A big fan of android x86 here. Managed to install my Atom N230 D945GCLF as
> my carpc was a breeze.
>
> The problem that I am facing right now is to detect my serial port GPS.
>
> Any pointers to make it work? The R323 GPS comes default with the car and it
> would be great if it would be able to work with the android x86 4.0RC2.
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Android-x86" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-x86...@googlegroups.com.
> To post to this group, send email to andro...@googlegroups.com.
> Visit this group at http://groups.google.com/group/android-x86?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Chih-Wei
Android-x86 project
http://www.android-x86.org

tue...@hotmail.com

unread,
Aug 5, 2013, 12:57:05 PM8/5/13
to andro...@googlegroups.com
I tried this with 4.3 and it doesn't work correctly. The baudrate is ignored (gps.c is hardcoded to use 115200), by manually changing it to 9600 I was able to at least get Android to see the NMEA messages from my GPS but LocationManagerService was constantly reporting "Dropping incomplete location: Location[gps -32.234567,123.123123 acc=??? et=+1m17s208ms alt=24.423 {Bundle[{satellites=1}]}]". It looks like the gps driver does not set the accuracy for the locations it returns (flag GPS_LOCATION_HAS_ACCURACY) which causes them to be ignored as per https://android.googlesource.com/platform/frameworks/base/+/2eeeec248a38ff33999c83f4b8d5bab7d50e79d2%5E!/

Chih-Wei Huang

unread,
Aug 5, 2013, 10:26:57 PM8/5/13
to Android-x86
2013/8/6 <tue...@hotmail.com>:
> I tried this with 4.3 and it doesn't work correctly. The baudrate is ignored
> (gps.c is hardcoded to use 115200), by manually changing it to 9600 I was

Hmm... yes. It's hardcoded.
Patches are welcome.

> able to at least get Android to see the NMEA messages from my GPS but
> LocationManagerService was constantly reporting "Dropping incomplete
> location: Location[gps -32.234567,123.123123 acc=??? et=+1m17s208ms
> alt=24.423 {Bundle[{satellites=1}]}]". It looks like the gps driver does not
> set the accuracy for the locations it returns (flag
> GPS_LOCATION_HAS_ACCURACY) which causes them to be ignored as per
> https://android.googlesource.com/platform/frameworks/base/+/2eeeec248a38ff33999c83f4b8d5bab7d50e79d2%5E!/

Not quite understand it.
So what has to be changed in hardware/gps?

tue...@hotmail.com

unread,
Aug 6, 2013, 1:48:46 AM8/6/13
to andro...@googlegroups.com
Unfortunately I can't set up a build environment at the moment, otherwise I would submit a patch.

The current code in gps.c never sets the accuracy before passing data to callbacks->location_cb(). "All Locations returned by a LocationProvider must include at the minimum a lat, long, timestamps, and accuracy." So even though the LocationManager service recognizes that the GPS has a valid fix (GPS notification icon is solid on, not flashing) the Location information is discarded without being forwarded to applications because there is no accuracy set.

Here's how I think it should be changed:
gps_huawei.c has a function called nmea_reader_update_accuracy() that can be copied to gps.c.
nmea_reader_update_accuracy() should be called for GGA and GSA NMEA strings, using the "Horizontal dilution of position" token as argument.
Instead of calling _gps_state->callbacks->location_cb() when (r->fix.flags!=0), only call it when
(r->fix.flags&(GPS_LOCATION_LAT_LONG|GPS_LOCATION_HAS_ACCURACY))==(GPS_LOCATION_LAT_LONG|GPS_LOCATION_HAS_ACCURACY)
r->fix.flags should be reset to 0 only after calling location_cb() as the current code does. This means some NMEA messages may cause older data to be overwritten but that shouldn't really matter.

or alternatively if GPS_LOCATION_HAS_ACCURACY is not set when calling location_cb(), just set it and assign a fake accuracy (the makeComplete method in the diff I linked to uses 100.0f). Maybe this should be configurable via a property as well (ro.kernel.android.gpsfakeaccuracy) ?

Ralf ranfyy

unread,
Aug 6, 2013, 3:36:36 AM8/6/13
to andro...@googlegroups.com
Am Dienstag, 6. August 2013 07:48:46 UTC+2 schrieb tue...@hotmail.com:
Unfortunately I can't set up a build environment at the moment, otherwise I would submit a patch.

The current code in gps.c never sets the accuracy before passing data to callbacks->location_cb(). "All Locations returned by a LocationProvider must include at the minimum a lat, long, timestamps, and accuracy." So even though the LocationManager service recognizes that the GPS has a valid fix (GPS notification icon is solid on, not flashing) the Location information is discarded without being forwarded to applications because there is no accuracy set.

Here's how I think it should be changed:
gps_huawei.c has a function called nmea_reader_update_accuracy() that can be copied to gps.c.
nmea_reader_update_accuracy() should be called for GGA and GSA NMEA strings, using the "Horizontal dilution of position" token as argument.
Instead of calling _gps_state->callbacks->location_cb() when (r->fix.flags!=0), only call it when
(r->fix.flags&(GPS_LOCATION_LAT_LONG|GPS_LOCATION_HAS_ACCURACY))==(GPS_LOCATION_LAT_LONG|GPS_LOCATION_HAS_ACCURACY)
r->fix.flags should be reset to 0 only after calling location_cb() as the current code does. This means some NMEA messages may cause older data to be overwritten but that shouldn't really matter.

or alternatively if GPS_LOCATION_HAS_ACCURACY is not set when calling location_cb(), just set it and assign a fake accuracy (the makeComplete method in the diff I linked to uses 100.0f). Maybe this should be configurable via a property as well (ro.kernel.android.gpsfakeaccuracy) ?


Isn't there a /system/etc/gps.conf in Android-x86 like on my phone? Then I'd put it there as well as the baudrate setting.

 

Chih-Wei Huang

unread,
Aug 7, 2013, 10:26:45 PM8/7/13
to Android-x86
Thank you for the details.
Would you please provide a patch for it?
I don't have the hardware to test or verify it.
Thanks a lot!

2013/8/6 <tue...@hotmail.com>:
> Unfortunately I can't set up a build environment at the moment, otherwise I
> would submit a patch.
>
> The current code in gps.c never sets the accuracy before passing data to
> callbacks->location_cb(). "All Locations returned by a LocationProvider must
> include at the minimum a lat, long, timestamps, and accuracy." So even
> though the LocationManager service recognizes that the GPS has a valid fix
> (GPS notification icon is solid on, not flashing) the Location information
> is discarded without being forwarded to applications because there is no
> accuracy set.
>
> Here's how I think it should be changed:
> gps_huawei.c has a function called nmea_reader_update_accuracy() that can be
> copied to gps.c.
> nmea_reader_update_accuracy() should be called for GGA and GSA NMEA strings,
> using the "Horizontal dilution of position" token as argument.
> Instead of calling _gps_state->callbacks->location_cb() when
> (r->fix.flags!=0), only call it when
> (r->fix.flags&(GPS_LOCATION_LAT_LONG|GPS_LOCATION_HAS_ACCURACY))==(GPS_LOCATION_LAT_LONG|GPS_LOCATION_HAS_ACCURACY)
> r->fix.flags should be reset to 0 only after calling location_cb() as the
> current code does. This means some NMEA messages may cause older data to be
> overwritten but that shouldn't really matter.
>
> or alternatively if GPS_LOCATION_HAS_ACCURACY is not set when calling
> location_cb(), just set it and assign a fake accuracy (the makeComplete
> method in the diff I linked to uses 100.0f). Maybe this should be
> configurable via a property as well (ro.kernel.android.gpsfakeaccuracy) ?

walter

unread,
May 22, 2014, 10:55:17 AM5/22/14
to andro...@googlegroups.com

I can see from debug that indeed the accuracy is not captured by LocationManagerService which is probably why it is dropping incomplete location...

has this been dealt with since this previous post? is there any patch/code available to fix gps in Android-x86 ?

Chih-Wei Huang

unread,
May 22, 2014, 10:53:54 PM5/22/14
to Android-x86
2014-05-22 22:55 GMT+08:00 walter <wald...@gmail.com>:
>
> I can see from debug that indeed the accuracy is not captured by LocationManagerService which is probably why it is dropping incomplete location...
>
> has this been dealt with since this previous post? is there any patch/code available to fix gps in Android-x86 ?

The gps hal module was contributed by some volunteer in the forum.
Personal I didn't test it since no such a device.

Feel free to fix it and drop me a patch, please.

walter

unread,
May 26, 2014, 8:55:06 AM5/26/14
to andro...@googlegroups.com
I've been trying to change the code in gps.c as suggested a few posts above, but it doesn't help. Anyway I attach the resulting gps.c, maybe someone can help with this? Btw, how do you read the debug info from this ?

Apart from fixing this GPS issue in the android-x86 code itself, can someone suggest an app that does solve the issue?
gps.c

Keith Conger

unread,
Mar 21, 2015, 8:03:11 PM3/21/15
to andro...@googlegroups.com
This is an old thread,  but I think I created a working version, at least its working for me.  Patch attached, would love any input.  My C is very rusty :)

Changes include:

Fixed accuracy
Added support for ro.kernel.android.gpsttybaud property, if not set defaults to 9600
Cleaned up some stuff 
0001-Fixed-accuracy.patch

hatharry

unread,
Mar 22, 2015, 1:20:54 AM3/22/15
to andro...@googlegroups.com
Hi,

does the patch support 4800 baud?

Chih-Wei Huang

unread,
Mar 23, 2015, 3:52:23 AM3/23/15
to Android-x86
2015-03-22 8:03 GMT+08:00 Keith Conger <keith....@gmail.com>:
> This is an old thread, but I think I created a working version, at least
> its working for me. Patch attached, would love any input. My C is very
> rusty :)
>
> Changes include:
>
> Fixed accuracy
> Added support for ro.kernel.android.gpsttybaud property, if not set defaults
> to 9600
> Cleaned up some stuff

Applied to kitkat-x86 and lollipop-x86.
(with minor cosmetic fixes)

Thank you for the contribution.

Keith Conger

unread,
Mar 23, 2015, 10:09:34 AM3/23/15
to andro...@googlegroups.com
It doesn't but I could add it real quick.

Keith

On Sat, Mar 21, 2015 at 11:20 PM, hatharry <hath...@gmail.com> wrote:
> Hi,
>
> does the patch support 4800 baud?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Android-x86" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-x86/J8_ddp31BLA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> android-x86...@googlegroups.com.
> To post to this group, send email to andro...@googlegroups.com.
> Visit this group at http://groups.google.com/group/android-x86.
> For more options, visit https://groups.google.com/d/optout.



--
Keith Conger
keith DOT conger AT gmail DOT com
http://thecongers.org

Keith Conger

unread,
Mar 23, 2015, 4:07:01 PM3/23/15
to andro...@googlegroups.com
Here is a patch to add support for 4800 baud rate.

Keith


On Monday, March 23, 2015 at 8:09:34 AM UTC-6, Keith Conger wrote:
It doesn't but I could add it real quick.

Keith

On Sat, Mar 21, 2015 at 11:20 PM, hatharry <hath...@gmail.com> wrote:
> Hi,
>
> does the patch support 4800 baud?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Android-x86" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-x86/J8_ddp31BLA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
0001-Added-4800-baud-support.patch

Chih-Wei Huang

unread,
Mar 23, 2015, 9:35:44 PM3/23/15
to Android-x86
2015-03-24 4:07 GMT+08:00 Keith Conger <keith....@gmail.com>:
> Here is a patch to add support for 4800 baud rate.

Applied. Thanks!

hatharry

unread,
Mar 24, 2015, 12:20:06 AM3/24/15
to andro...@googlegroups.com
am i correct in saying that all i need to do is change the build.prop. plug in my usb gps and google maps will start working?

Keith Conger

unread,
Mar 24, 2015, 10:06:36 AM3/24/15
to andro...@googlegroups.com
Yes, just set the two properties and reboot and it should work.

On Mon, Mar 23, 2015 at 10:20 PM, hatharry <hath...@gmail.com> wrote:
> am i correct in saying that all i need to do is change the build.prop. plug
> in my usb gps and google maps will start working?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Android-x86" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-x86/J8_ddp31BLA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> android-x86...@googlegroups.com.

Keith Conger

unread,
Mar 24, 2015, 10:26:46 AM3/24/15
to andro...@googlegroups.com
I should mention, I did not try hot plugging my GPS. I had it plugged
in at boot.

On Mon, Mar 23, 2015 at 10:20 PM, hatharry <hath...@gmail.com> wrote:
> am i correct in saying that all i need to do is change the build.prop. plug
> in my usb gps and google maps will start working?
>

hatharry

unread,
Mar 26, 2015, 4:50:35 AM3/26/15
to andro...@googlegroups.com
sorry to say but it is not working with my Globalsat BU-353S4. Ive download catlog but i can not find the gps_serial log. any advice?

Keith Conger

unread,
Mar 26, 2015, 7:42:25 AM3/26/15
to andro...@googlegroups.com
You should see some messages about it trying to open the device you
set and setting the baud rate. You could set GPS_DEBUG to 1 in the
source file and rebuild for more logging.

Do you have the right kernel modules for the USBSerial chipset loaded?
Do you see the device file? What happens when you cat the device file?


On Thu, Mar 26, 2015 at 2:50 AM, hatharry <hath...@gmail.com> wrote:
> sorry to say but it is not working with my Globalsat BU-353S4. Ive download
> catlog but i can not find the gps_serial log. any advice?
>>
>>

hatharry

unread,
Mar 26, 2015, 7:48:38 AM3/26/15
to andro...@googlegroups.com
i will try the debugging.
 i get no log at boot using cat /dev/ttyUSB0
but if i stty -F /dev/ttyUSB0 ispeed 4800
then cat /dev/ttyUSB0
the data displays fine but doesn’t get passed to maps

Mexus Official

unread,
Mar 26, 2015, 11:49:23 AM3/26/15
to andro...@googlegroups.com
Hi,

I have the same USB gps receiver like you and i tested it with GPS test app and so far it is working. 
I did nothing special just updated my repo, made new iso and edited the build.prop with those two lines.

you can try my iso from today but you need to add gapps by yourself. 


Just keep in mind i have modified the power button behavior (config_longPressOnPowerBehavior=3). 

Keith Conger

unread,
Mar 26, 2015, 11:52:14 AM3/26/15
to andro...@googlegroups.com
Glad to hear its working for someone else!

Keith

hatharry

unread,
Mar 26, 2015, 8:51:55 PM3/26/15
to andro...@googlegroups.com
i am using the x64 kernel. i will recompile with x86 and see if that fixes it.

hatharry

unread,
Mar 26, 2015, 10:32:41 PM3/26/15
to andro...@googlegroups.com
Tried with x86 kernel and Mexus Official's build with no success. :( 

hatharry

unread,
Mar 26, 2015, 10:55:44 PM3/26/15
to andro...@googlegroups.com

03-27 15:51:02.104 D/gps_serial(1880): set_position_mode: mode=0 recurrence=0 min_interval=1000 preferred_accuracy=0 preferred_time=0

03-27 15:51:02.104 D/gps_serial(1880): serial_gps_start: called

03-27 15:51:02.104 D/gps_serial(1880): gps_state_start: could not send CMD_START command: ret=-1: Bad file number

03-27 15:51:05.682 D/gps_serial(1880): serial_gps_stop: called

03-27 15:51:05.682 D/gps_serial(1880): serial_gps_stop: called

03-27 15:51:05.682 D/gps_serial(1880): gps_state_stop: could not send CMD_STOP command: ret=-1: Bad file number


this is from logcat


Keith Conger

unread,
Mar 27, 2015, 10:09:27 AM3/27/15
to andro...@googlegroups.com
You should have more entries before this about opening the device and
setting the baud.

BTW I'm actually using this on a Beaglebone Black(ARM) single board
computer, so I'm not using the full android-x86 stack.

hatharry

unread,
Mar 27, 2015, 10:11:51 AM3/27/15
to andro...@googlegroups.com
could you please try my build? everything should be setup. what hardware are you running mexus?

hatharry

unread,
Mar 27, 2015, 10:21:15 AM3/27/15
to andro...@googlegroups.com
im running a brix pro GB-BXi5-4570R

hatharry

unread,
Mar 27, 2015, 10:39:31 AM3/27/15
to andro...@googlegroups.com
are you able to cat /dev/ttyUSB0 straight after boot?

Chih-Wei Huang

unread,
Mar 27, 2015, 11:13:09 AM3/27/15
to Android-x86
2015-03-27 22:39 GMT+08:00 hatharry <hath...@gmail.com>:
> are you able to cat /dev/ttyUSB0 straight after boot?

You probably need to correct the permission
of /dev/ttyUSB0. Currently it's set to

/dev/ttyUSB* 0660 radio radio

Try to modify this line to

/dev/ttyUSB* 0660 system radio

(in device/generic/x86/ueventd.x86.rc)
That makes the gps hal module can read/write it.

Mexus Official

unread,
Mar 28, 2015, 1:28:03 AM3/28/15
to andro...@googlegroups.com
Funny,

GPS apps (Waze, Navimii) are showing double vehicle speed as normal. This is causing autozoom to zoom out like i was on highway everytime i reach over 40km/h.
Wonder why because the speed should be calculated by app itself, isnt that right?
BTW the accuracy is pretty nice. GPS test is showing 2-5 feets (1.5m) which is pretty accurate to me (even when it never gets to the "locked" status). Also this is the only app showing almost real speed but +10 km/h.

Keith Conger

unread,
Mar 28, 2015, 11:03:48 AM3/28/15
to andro...@googlegroups.com
I haven't had a chance to try navigation apps yet, just added Wifi to
my beaglebone this week. My testing was with the "GPS Test". There
is an issue with the driver reporting the number of satellites in use,
maybe thats why it doesn't show as "locked" even though it is. I plan
on looking into it. I'll try navigation when I can to see the results
I get.

hatharry

unread,
Mar 29, 2015, 11:16:11 PM3/29/15
to andro...@googlegroups.com
i still have the same error with the permissions set

hatharry

unread,
Mar 30, 2015, 12:43:30 AM3/30/15
to andro...@googlegroups.com
Found the problem. if install android to my ext3 partition gps does not work. if i run android live from usb, gps works fine. im glad ive got it working but now to find out why it does not work when android is installed.

Mexus Official

unread,
Mar 30, 2015, 6:02:03 AM3/30/15
to andro...@googlegroups.com
Hi Keith,

Thank you. if you need any testing let me know.  

Keith Conger

unread,
Mar 30, 2015, 10:04:33 AM3/30/15
to andro...@googlegroups.com
I took the GPS in the car this weekend and can confirm the speed looks
double for some reason. I'll see if I can get that fixed.

Keith

Keith Conger

unread,
Mar 30, 2015, 10:41:20 PM3/30/15
to andro...@googlegroups.com
I think I see the problem, the original code doesn't calculate knots to m/s.  The original freerunner code does.  I'll fix and post a patch.  Mexus are you seeing a satellite reporting issue?  Running GPS test It shows the signal of all satellites seen but most of the time only shows 1 in use, I've only caught it once reporting 2 in use.

Keith

Mexus

unread,
Mar 31, 2015, 8:49:07 AM3/31/15
to andro...@googlegroups.com
Hi,

yes i can confirm this. 1 sat in use most of the time. sometimes 2 but this is very rare. 

Keith Conger

unread,
Mar 31, 2015, 10:34:47 AM3/31/15
to andro...@googlegroups.com
Hi Mexus,

Here is a patch that hopefully fixes the speed being reported incorrectly.  Can you report back your findings?  I'm not sure when I'll have a chance to test myself.  I'm going to look into reported satellites issue.  That one doesn't look as simple :)

Thanks,
Keith
0001-Fix-reported-speed.patch

Jaime Serrano

unread,
Mar 31, 2015, 3:16:29 PM3/31/15
to andro...@googlegroups.com
Hi, could anyone please make an iso with all this changes applied? I would like to do it myself but like others I have no way to make git working and so, I can´t get the source tree. Patches can only applied over the source, right?

Thanks a lot!

Keith Conger

unread,
Mar 31, 2015, 9:48:17 PM3/31/15
to andro...@googlegroups.com
Hi,

I was able to test my patch and speed is now reported correctly. I'm
looking into fixing the satellites in use reporting problem.

Keith

Mexus

unread,
Apr 1, 2015, 12:12:40 AM4/1/15
to andro...@googlegroups.com
Hi Keith,

I can confirm this. Speed is accurate. Very well done. 

Keith Conger

unread,
Apr 1, 2015, 5:29:15 PM4/1/15
to andro...@googlegroups.com
Thanks for reporting back.

Keith

Chih-Wei Huang

unread,
Apr 2, 2015, 11:40:51 AM4/2/15
to Android-x86
2015-03-31 22:34 GMT+08:00 Keith Conger <keith....@gmail.com>:
> Hi Mexus,
>
> Here is a patch that hopefully fixes the speed being reported incorrectly.
> Can you report back your findings? I'm not sure when I'll have a chance to
> test myself. I'm going to look into reported satellites issue. That one
> doesn't look as simple :)

Great to see it works better.

Applied the patch locally.
Will publish it once the git server is back.

hatharry

unread,
Apr 2, 2015, 7:57:51 PM4/2/15
to andro...@googlegroups.com
still having a hard time getting gps to work when android is installed. I've tried ext3 and ext4 with no luck. It is so bizarre that it works live but not installed.

Keith Conger

unread,
Apr 2, 2015, 8:17:20 PM4/2/15
to andro...@googlegroups.com
And here is a patch that fixes satellite reporting and some cleanup.  I'm going to do a little more cleanup and a think I can call it done.

Keith
0001-Fix-satellite-reporting-and-some-cleanup.patch

Mexus

unread,
Apr 3, 2015, 12:41:02 AM4/3/15
to andro...@googlegroups.com
Keith,

you are really working fast my friend. :) Will test it this evening when i get home and let you know. Thank you

Marc

unread,
Apr 3, 2015, 3:39:05 AM4/3/15
to andro...@googlegroups.com
Github sounds excellent to me!



On Thursday, May 2, 2013 at 11:08:39 PM UTC-7, Keen Lee wrote:
> Hi,
>
> A big fan of android x86 here. Managed to install my Atom N230 D945GCLF as my carpc was a breeze.
>
> The problem that I am facing right now is to detect my serial port GPS.
>
> Any pointers to make it work? The R323 GPS comes default with the car and it would be great if it would be able to work with the android x86 4.0RC2.
>
> Thanks.

Mexus

unread,
Apr 3, 2015, 9:35:27 AM4/3/15
to andro...@googlegroups.com
Hi Keith,

looking good. Now i have even more satellites in view and most important i got 3D lock status and reported satellites in use. See attachment.
Keep in mind that i tested it from my window (4th floor in the 12 story building) so half of the sky was not visible. So it should be much more better when i will be outside. 

Nice job mate.  
Screenshot_2015-04-03-13-27-35.png

Keith Conger

unread,
Apr 3, 2015, 10:19:44 AM4/3/15
to andro...@googlegroups.com
Thanks for confirming my results.  I've been doing my testing on a Beaglebone Black(ARM) with an ADAFruit Ultimate GPS connected via UART, its good to know it functions on X86 also :)

I'm going to do some general cleanup of the source and that should be it.  I'll probably post to my github account also.

Keith

hatharry

unread,
Apr 4, 2015, 12:19:44 AM4/4/15
to andro...@googlegroups.com
Finally fixed the install issue. i formatted the partition to ext4 then copied android over. not the other way round like i did last time. works very well! i am really impressed with the lock time. good work Keith! you have made a lot of people happy.

Keith Conger

unread,
Apr 6, 2015, 10:38:53 AM4/6/15
to andro...@googlegroups.com
Glad to hear you finally sorted out your issue.  If anyone needs the code while Android-X86's git is down, I've put it up here: https://github.com/kconger/android-serial-gps-driver

Keith

Chih-Wei Huang

unread,
Apr 7, 2015, 4:24:54 AM4/7/15
to Android-x86
2015-04-03 8:17 GMT+08:00 Keith Conger <keith....@gmail.com>:
> And here is a patch that fixes satellite reporting and some cleanup. I'm
> going to do a little more cleanup and a think I can call it done.

Applied. Thanks!

Jaime Serrano

unread,
Apr 7, 2015, 10:45:34 AM4/7/15
to andro...@googlegroups.com
Hi, first of all, thanks a lot for your work. Can anybody tell how to apply the patch step by step. I´m completely newbie with this stuff. Do I need to recompile or is something I can apply to my installed Android? I use 4.4 R2 official release.

Thanks in advance.

Jaime.

Mexus

unread,
Apr 8, 2015, 5:56:11 AM4/8/15
to andro...@googlegroups.com
Hi,

I did it this way (maybe there is a better way)

you can apply the patch by cd into directory where the file what needs to be patched is placed. In this case the file is gps.c

Then run this command to apply the patch

git apply --ignore-whitespace <patchname>
if you get no output just new terminal line the patch applied successfully.

Then you need to recompile the gps module

cd into your root android directory (from where you are running "make" command) and type this

make -jX gps.default

you can use the -jX where X is the number of your cores the speed process up or you can leave this option completely. It won't take that long.  

This will create file gps.default.so (you will see the file location in the last lines of output)

Replace this file in your android directory. I think its /system/lib/hw/ (don't have access to android at this moment to check)

Cheers

Chih-Wei Huang

unread,
Apr 8, 2015, 6:31:32 AM4/8/15
to Android-x86
2015-04-08 17:56 GMT+08:00 Mexus <miko...@gmail.com>:
> Hi,
>
> I did it this way (maybe there is a better way)
>
> you can apply the patch by cd into directory where the file what needs to be
> patched is placed. In this case the file is gps.c
>
> Then run this command to apply the patch
>
> git apply --ignore-whitespace <patchname>

Use

git am --whitespace=fix <pathname>

As I've said, the patch has been applied to the repository.
So you should just do

repo sync hardware/gps

Then do the following steps.

Сергей Трофимов

unread,
Apr 11, 2015, 1:30:40 PM4/11/15
to andro...@googlegroups.com
Hello.
Your build is running on my Onda V975w.
Not enough wifi and accelerometer.
If you are not hard, then compile the drivers:
wifi - https://github.com/hadess/rtl8723bs
accelerometer - https://github.com/hadess/iio-sensor-proxy
Or at least put in a free access to the kernel source code.
Sources taken from here - https://wiki.gnome.org/BastienNocera/Ondav975w


пятница, 27 марта 2015 г., 17:11:51 UTC+3 пользователь hatharry написал:
could you please try my build? everything should be setup. what hardware are you running mexus?

hatharry

unread,
Apr 12, 2015, 3:34:13 AM4/12/15
to andro...@googlegroups.com
Hi

My build is not meant for tablets. Here's how to build your own http://www.android-x86.org/getsourcecode 

Сергей Трофимов

unread,
Apr 12, 2015, 2:27:09 PM4/12/15
to andro...@googlegroups.com
If you are not hard, then compile the driver and place here on the forum.
wifi - https://github.com/hadess/rtl8723bs
accelerometer - https://github.com/hadess/iio-sensor-proxy
I do not ask you to re-compile the image, need only these drivers with your kernel.


воскресенье, 12 апреля 2015 г., 10:34:13 UTC+3 пользователь hatharry написал:

Сергей Трофимов

unread,
Apr 13, 2015, 7:22:26 AM4/13/15
to andro...@googlegroups.com
Or at least give me the exact link where you took the kernel source code.


воскресенье, 12 апреля 2015 г., 21:27:09 UTC+3 пользователь Сергей Трофимов написал:

Mexus

unread,
Apr 14, 2015, 12:59:28 AM4/14/15
to andro...@googlegroups.com
The kernel is from android-x86 source code. You can find links at http://www.android-x86.org/getsourcecode

hatharry

unread,
Apr 24, 2015, 10:27:29 AM4/24/15
to andro...@googlegroups.com
Hi Chih-Wei

Are you able to add the remaining patchs?


0001-Cleanup.patch
0002-Added-a-README.patch
0003-Delete-other-driver.patch
0004-README-tweaks.patch
0005-Cleanup.patch

Chih-Wei Huang

unread,
Apr 24, 2015, 10:52:37 AM4/24/15
to Android-x86
2015-04-24 22:27 GMT+08:00 hatharry <hath...@gmail.com>:
> Hi Chih-Wei
>
> Are you able to add the remaining patchs?

OK.
I applied 0001, 0002, and 0004.
But I don't see the rationale for 0003 and 0005.
gps.huawei is another independent driver
used by some devices.
I don't know why it should be removed.

--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Keith Conger

unread,
Apr 24, 2015, 11:50:52 AM4/24/15
to andro...@googlegroups.com
I removed gps_huawei from my tree, I didn't send those patches because I assumed gps_huawei was still being used.  

--
You received this message because you are subscribed to a topic in the Google Groups "Android-x86" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-x86/J8_ddp31BLA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-x86...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.

hatharry

unread,
Apr 24, 2015, 11:56:48 AM4/24/15
to andro...@googlegroups.com
Thanks guys ;)

i should of looked at the patch's more clearly. I was focused on the latest gps.c

OmegaKZ793

unread,
Apr 26, 2015, 1:21:35 AM4/26/15
to andro...@googlegroups.com
HI ALL!

As I see it was a lot of work .

Please download the patched file gps.c.

Can`t apply patches as make their own changes to the file .

Omega

unread,
Apr 26, 2015, 2:42:45 AM4/26/15
to andro...@googlegroups.com
HI!

When I run
"repo sync hardware/gps"
repo downloads old (not patched) file "gps.c".

Did you apply the patch to distr?

I use "kiktat"

среда, 8 апреля 2015 г., 16:31:32 UTC+6 пользователь Chih-Wei Huang написал:

Jaime Serrano

unread,
Jun 18, 2015, 4:05:42 PM6/18/15
to andro...@googlegroups.com
Hi!

I´ve rebuilt latest git image with the gps support and I have to say that I´m absolutely wondered of how good it works (specially since I can forget annoying apps like mock location and so on). However I´m suffering strange behaviors and maybe you can help me. With gps navigation specially when I´m driving at slow speeds the refresh rate is very low. Somehow is related with the speed or at least with the distance between points. At 100 km/h gps software updates the position once per 1-2 seconds. At 40 km/h the rate goes down and it refreshs the position once per 15-30 seconds. The position is quite accurate, the nmea sentences seem to be continously if I cat the device and I´m not sure if the problem is due to the gps function, the gps software or the rendering layer. In this case I use Sygic Navigation (latest version). 

Additionally, if I try to use google maps, I get a forced closed app screen due to an error when it applies the zoom-in function. It seems to be quite ramdom but I always get the error from 5 to 20 seconds after opening the app. The openGL tests runs perfectly in antutu and in games like angry birds rio so I´m completely lost. 

Hope some of you can help. Thanks in advance.

Antony Stone

unread,
Jun 18, 2015, 4:28:38 PM6/18/15
to andro...@googlegroups.com
On Thursday 18 June 2015 at 22:05:42 (EU time), Jaime Serrano wrote:

> With GPS navigation specially when I'm driving at slow speeds the refresh
> rate is very low.

1. What are you using for a GPS receiver?

2. What app are you using to show the output (refresh rate)?

3. Is the app, or the receiver, set to show updates every X seconds, or every
X metres?

The latter might explain your reported behaviour - if the GPS receiver only
reports its position every X metres, then the update frequency will be lower
when you're moving slowly.


Hope that helps,


Antony.

--
#define SIX 1+5
#define NINE 8+1

int main() {
printf("%d\n", SIX * NINE);
}
- thanks to ECB for bringing this to my attention

Please reply to the list;
please *don't* CC me.

Jaime Serrano

unread,
Jun 24, 2015, 4:36:22 AM6/24/15
to andro...@googlegroups.com, antony...@android.open.source.it
Hi

1) I´m using GlobalSat BU-353-S4 as a gps device.

2) I should do a deeper investigation but right now I only have the feeling using Sygic. In fact I´m not sure if it´s a gps dongle related issue or a rendering problem... I´m going to try with another software to be sure.

3) I´ve never seen such parameter in GPS navigation, however, I don´t know if it exists in the GPS driver...

I know it is a very little info about the problem. I will add more details asap.

Thanks 


Matija Tudan

unread,
Nov 23, 2016, 2:28:22 AM11/23/16
to Android-x86
Hi guys,

I am trying to implement gps.c driver in my project: https://github.com/kconger/android-serial-gps-driver

Things I have done so far:
1) I have included serial converter driver in my kernel
2) I have set the permissions to: /dev/ttyUSB* 0666 gps gps
3) I have added the build properties: ro.kernel.android.gps=ttyUSB0 and ro.kernel.android.gpsttybaud=4800

Also, when I run "cat /dev/ttyUSB0" there are no NMEA messages. I have to run "stty -F /dev/ttyUSB0 4800" every time if I want to see NMEA messages.
Here is my logcat filtered with gps. As you can see there are no messages about opening the device and setting the baud rate:

root@android:/ # logcat | grep gps
logcat | grep gps
W/PackageManager( 2654): Package com.eclipsim.gpsstatus2 desires unavailable sha
red library com.sec.android.app.multiwindow; ignoring!
W/PackageManager( 2654): Unknown permission com.android.vending.BILLING in packa
ge com.eclipsim.gpsstatus2
W/PackageManager( 2654): Unknown permission com.google.android.c2dm.permission.R
ECEIVE in package com.eclipsim.gpsstatus2
W/PackageManager( 2654): Unknown permission com.android.vending.BILLING in packa
ge com.eclipsim.gpsstatus2
W/PackageManager( 2654): Unknown permission com.google.android.c2dm.permission.R
ECEIVE in package com.eclipsim.gpsstatus2
I/BackupManagerService( 2654): com.eclipsim.gpsstatus2
I/ActivityManager( 2654): Start proc com.eclipsim.gpsstatus2 for broadcast com.e
clipsim.gpsstatus2/com.eclipsim.gpstoolbox.monitor.GpsBroadcastReceiver: pid=293
6 uid=10039 gids={50039, 3003, 1028, 1023, 1015}
I/FA ( 2936): adb shell setprop firebase.analytics.debug-mode com.eclipsi
m.gpsstatus2
I/ActivityManager( 2654): START u0 {act=android.intent.action.MAIN cat=[android.
intent.category.LAUNCHER] flg=0x10200000 cmp=com.chartcross.gpstest/.GPSTest} fr
om pid 2850
I/ActivityManager( 2654): Start proc com.chartcross.gpstest for activity com.cha
rtcross.gpstest/.GPSTest: pid=3596 uid=10040 gids={50040, 3003, 1028, 1023}
D/dalvikvm( 3596): DEX prep '/data/data/com.chartcross.gpstest/cache/ads68719616
6.jar': unzip in 0ms, rewrite 230ms
I/ActivityManager( 2654): Displayed com.chartcross.gpstest/.GPSTest: +1s37ms
V/GAV4 ( 3596): Thread[GAThread,5,main]: Sending hit to store PATH: https:
PARAMS: v=1, ul=en-us, t=screenview, ht=1479817064061, sr=1024x558, a=20554
03649, an=GPS Test, tid=UA-931200-4, aid=com.chartcross.gpstest, cid=8dccf4d
9-0262-4e5f-a7a6-69f08697873c, av=1.3.2, _u=.nK-AL, cd=VIEW_SNR,
I/ActivityManager( 2654): START u0 {act=android.intent.action.MAIN cat=[android.
intent.category.LAUNCHER] flg=0x10200000 cmp=com.eclipsim.gpsstatus2/.GPSStatus}
from pid 2850
E/BufferQueue( 2306): [com.eclipsim.gpsstatus2/com.eclipsim.gpsstatus2.GPSStatus
] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

I/ActivityManager( 2654): Displayed com.eclipsim.gpsstatus2/.GPSStatus: +1s453ms

E/BufferQueue( 2306): [com.eclipsim.gpsstatus2/com.eclipsim.gpsstatus2.GPSStatus
] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

E/BufferQueue( 2306): [com.eclipsim.gpsstatus2/com.eclipsim.gpsstatus2.GPSStatus
] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

I/ActivityManager( 2654): START u0 {act=android.intent.action.MAIN cat=[android.
intent.category.LAUNCHER] flg=0x10200000 cmp=com.eclipsim.gpsstatus2/.GPSStatus}
from pid 2850
E/BufferQueue( 2306): [com.eclipsim.gpsstatus2/com.eclipsim.gpsstatus2.GPSStatus
] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

I/ActivityManager( 2654): Displayed com.eclipsim.gpsstatus2/.GPSStatus: +674ms
I/ActivityManager( 2654): START u0 {act=android.intent.action.MAIN cat=[android.
intent.category.LAUNCHER] flg=0x10200000 cmp=com.eclipsim.gpsstatus2/.GPSStatus}
from pid 2850
E/BufferQueue( 2306): [com.eclipsim.gpsstatus2/com.eclipsim.gpsstatus2.GPSStatus
] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

I/ActivityManager( 2654): Displayed com.eclipsim.gpsstatus2/.GPSStatus: +622ms
I/ActivityManager( 2654): START u0 {act=android.intent.action.MAIN cat=[android.
intent.category.LAUNCHER] flg=0x10200000 cmp=com.chartcross.gpstest/.GPSTest} fr
om pid 2850
V/GAV4 ( 3596): Thread[GAThread,5,main]: Sending hit to store PATH: https:
PARAMS: v=1, ul=en-us, t=screenview, ht=1479819010400, sr=1024x558, a=20554
03650, an=GPS Test, tid=UA-931200-4, aid=com.chartcross.gpstest, cid=8dccf4d
9-0262-4e5f-a7a6-69f08697873c, av=1.3.2, _u=.rsK-AL, cd=VIEW_SATELLITES,
V/GAV4 ( 3596): Thread[GAThread,5,main]: Sending hit to store PATH: https:
PARAMS: v=1, ul=en-us, t=screenview, ht=1479819012061, sr=1024x558, a=20554
03651, an=GPS Test, tid=UA-931200-4, aid=com.chartcross.gpstest, cid=8dccf4d
9-0262-4e5f-a7a6-69f08697873c, av=1.3.2, _u=.rK-AL, cd=VIEW_SNR,
I/ActivityManager( 2654): START u0 {act=android.intent.action.MAIN cat=[android.
intent.category.LAUNCHER] flg=0x10200000 cmp=com.eclipsim.gpsstatus2/.GPSStatus}
from pid 2850
E/BufferQueue( 2306): [com.eclipsim.gpsstatus2/com.eclipsim.gpsstatus2.GPSStatus
] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

I/ActivityManager( 2654): Displayed com.eclipsim.gpsstatus2/.GPSStatus: +630ms
I/ActivityManager( 2654): Killing 2936:com.eclipsim.gpsstatus2/u0a10039: remove
task
I/ActivityManager( 2654): START u0 {act=android.intent.action.MAIN cat=[android.
intent.category.LAUNCHER] flg=0x10200000 cmp=com.eclipsim.gpsstatus2/.GPSStatus}
from pid 2850
I/ActivityManager( 2654): Start proc com.eclipsim.gpsstatus2 for activity com.ec
lipsim.gpsstatus2/.GPSStatus: pid=4345 uid=10039 gids={50039, 3003, 1028, 1023,
1015}
I/FA ( 4345): adb shell setprop firebase.analytics.debug-mode com.eclipsi
m.gpsstatus2
E/BufferQueue( 2306): [com.eclipsim.gpsstatus2/com.eclipsim.gpsstatus2.GPSStatus
] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

I/ActivityManager( 2654): Displayed com.eclipsim.gpsstatus2/.GPSStatus: +1s911ms

Michael Goffioul

unread,
Nov 23, 2016, 8:14:57 AM11/23/16
to andro...@googlegroups.com
On Tue, Nov 22, 2016 at 9:05 AM, Matija Tudan <tudan....@gmail.com> wrote:
Hi guys,

I am trying to implement gps.c driver in my project: https://github.com/kconger/android-serial-gps-driver

Things I have done so far:
1) I have included serial converter driver in my kernel
2) I have set the permissions to: /dev/ttyUSB*  0666  gps  gps
3) I have added the build properties: ro.kernel.android.gps=ttyUSB0 and ro.kernel.android.gpsttybaud=4800

Also, when I run "cat /dev/ttyUSB0" there are no NMEA messages. I have to run "stty -F /dev/ttyUSB0 4800" every time if I want to see NMEA messages.

Maybe you could run the stty command in the script init.sh?

Michael.

Jose Luis s

unread,
Jan 30, 2019, 2:19:25 PM1/30/19
to Android-x86
Hi All.

Trying to revive an old usb ublox-7 device to use with android.

I've get to have a working ttyACM0 device that cat nmea messages on screen, but after setting the properties described in this thread and make sure that the permissions are 0660 to system  radio, the location services does not work at all, no GPS test app report a working GPS.


Is the serial driver working in Oreo?

Thanks

El domingo, 5 de mayo de 2013, 16:06:20 (UTC+2), Chih-Wei Huang escribió:
4.0-RC2 supports serial port GPS.
You need to specify the port and baudrate in the properties, e.g.,

ro.kernel.android.gps=ttyUSB0
ro.kernel.android.gpsttybaud=115200


2013/5/3 Keen Lee <achi...@gmail.com>:
> Hi,
>
> A big fan of android x86 here. Managed to install my Atom N230 D945GCLF as
> my carpc was a breeze.
>
> The problem that I am facing right now is to detect my serial port GPS.
>
> Any pointers to make it work? The R323 GPS comes default with the car and it
> would be great if it would be able to work with the android x86 4.0RC2.
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Android-x86" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-x86...@googlegroups.com.
> To post to this group, send email to andro...@googlegroups.com.

Jose Luis s

unread,
Jan 30, 2019, 2:21:00 PM1/30/19
to Android-x86
BTW if I use mock location with GNSS app then gps works but is not very reliable.

Jose Luis s

unread,
Feb 4, 2019, 12:50:30 PM2/4/19
to Android-x86
No one?


El miércoles, 30 de enero de 2019, 20:19:25 (UTC+1), Jose Luis s escribió:

Chih-Wei Huang

unread,
Feb 12, 2019, 10:48:08 PM2/12/19
to Android-x86
Jose Luis s <jose...@gmail.com> 於 2019年1月31日 週四 上午3:19寫道:
>
> Trying to revive an old usb ublox-7 device to use with android.
>
> I've get to have a working ttyACM0 device that cat nmea messages on screen, but after setting the properties described in this thread and make sure that the permissions are 0660 to system radio, the location services does not work at all, no GPS test app report a working GPS.
>
> Is the serial driver working in Oreo?

I think the driver has nothing to do with Oreo.

If I were you, I'll make sure I have a workable driver.
Then trace the gps hal to see what it reads from the driver
by enabling or adding more debug messages.

Jose Luis s

unread,
Feb 13, 2019, 4:36:05 AM2/13/19
to Android-x86
Hello.

Thanks for the answer.

I mislead my Question, I know that the seria driver is OK as I get messages from ttyACM0, and they are ok. I wondered if the GPS hal library is ok, How do you guess I can get the proper debug messages?

BTW, GNSS tool apk works with mock location (not very stable though),

suhas m

unread,
Apr 25, 2020, 12:40:30 AM4/25/20
to Android-x86
I'm not getting the logcat messages for debugging my gps... I have inserted the line

#define GPS_DEBUG 1

In my gps.c file.... I have rebuilt the iso.. the iso now has the new gps.default.so

I have added ro.kernel.android.gps ttyS0

And to.kernel.android.gpsttybaud 9600 in my init.sh... so what am I missing... Which service will invoke the gps.default.so? I'm really missing the logcat messages for my trouble shooting

Message has been deleted

Luke

unread,
Apr 25, 2020, 9:54:00 AM4/25/20
to Android-x86
This method no longer works. I've managed to port https://gitlab.com/gpsd/gpsd/-/tree/master/android

Jose Luis s

unread,
Apr 25, 2020, 3:25:54 PM4/25/20
to Android-x86
This is great. gpsd is the way.

I have a couple of x-86 tablets with a dedicated internal broadcom GPS. These tablets with android-ia 4.4.4 use gpsd as binary to have a gps location service. I've been trying to use this several years using the driver provided by Intel-ia sources (got a driver integrated in every kernel but I think there is somo king of interaction with rfkill to have the GPS working. In my tablets with 4.4.4 gpsd takes control of this.

Do you thik your port will help with my issues?

Michael Goffioul

unread,
Apr 25, 2020, 4:03:59 PM4/25/20
to Android-x86
I'm not using GPS nor do I have corresponding hardware. However this statement triggered my curiosity. Do you know why it no longer works?
AFAICS, if you added module 'android.ha...@1.0-impl' to your build, this should provide a legacy passthrough HAL to the location server in system_server, which is based on the legacy gps.default.so module. This is just deduction from looking at the code, I may overlook something, hence why I asked why it no longer works.

Michael.


On Sat, Apr 25, 2020 at 9:54 AM Luke <hath...@gmail.com> wrote:
This method no longer works. I've managed to port https://gitlab.com/gpsd/gpsd/-/tree/master/android

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.

Luke

unread,
Apr 25, 2020, 9:24:56 PM4/25/20
to Android-x86
Still no messages in logcat after enabling android.ha...@1.0-impl and android.ha...@1.0-service

On Sunday, April 26, 2020 at 8:03:59 AM UTC+12, Michael Goffioul wrote:
I'm not using GPS nor do I have corresponding hardware. However this statement triggered my curiosity. Do you know why it no longer works?
AFAICS, if you added module 'android.hardware.gnss@1.0-impl' to your build, this should provide a legacy passthrough HAL to the location server in system_server, which is based on the legacy gps.default.so module. This is just deduction from looking at the code, I may overlook something, hence why I asked why it no longer works.

Michael.


On Sat, Apr 25, 2020 at 9:54 AM Luke <hath...@gmail.com> wrote:
This method no longer works. I've managed to port https://gitlab.com/gpsd/gpsd/-/tree/master/android

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to andro...@googlegroups.com.

Michael Goffioul

unread,
Apr 25, 2020, 9:48:46 PM4/25/20
to Android-x86
You should check that the HAL is available: adb shell lshal
Also check logcat output after boot for (case-insensitive): location, gps, gnss


On Sat, Apr 25, 2020 at 9:25 PM Luke <hath...@gmail.com> wrote:
Still no messages in logcat after enabling android.ha...@1.0-impl and android.ha...@1.0-service

On Sunday, April 26, 2020 at 8:03:59 AM UTC+12, Michael Goffioul wrote:
I'm not using GPS nor do I have corresponding hardware. However this statement triggered my curiosity. Do you know why it no longer works?
AFAICS, if you added module 'android.ha...@1.0-impl' to your build, this should provide a legacy passthrough HAL to the location server in system_server, which is based on the legacy gps.default.so module. This is just deduction from looking at the code, I may overlook something, hence why I asked why it no longer works.

Michael.


On Sat, Apr 25, 2020 at 9:54 AM Luke <hath...@gmail.com> wrote:
This method no longer works. I've managed to port https://gitlab.com/gpsd/gpsd/-/tree/master/android

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/8f9a47b2-4c81-4534-83cb-b028f9e10440%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/0fe21f0d-5969-43e6-b0ff-8a72d713683c%40googlegroups.com.

Luke

unread,
May 4, 2020, 7:28:18 AM5/4/20
to Android-x86
Here's the output from logcat and lshal


On Sunday, April 26, 2020 at 1:48:46 PM UTC+12, Michael Goffioul wrote:
You should check that the HAL is available: adb shell lshal
Also check logcat output after boot for (case-insensitive): location, gps, gnss


On Sat, Apr 25, 2020 at 9:25 PM Luke <hath...@gmail.com> wrote:
Still no messages in logcat after enabling android.ha...@1.0-impl and android.hardware.gnss@1.0-service

On Sunday, April 26, 2020 at 8:03:59 AM UTC+12, Michael Goffioul wrote:
I'm not using GPS nor do I have corresponding hardware. However this statement triggered my curiosity. Do you know why it no longer works?
AFAICS, if you added module 'android.hardware.gnss@1.0-impl' to your build, this should provide a legacy passthrough HAL to the location server in system_server, which is based on the legacy gps.default.so module. This is just deduction from looking at the code, I may overlook something, hence why I asked why it no longer works.

Michael.


On Sat, Apr 25, 2020 at 9:54 AM Luke <hath...@gmail.com> wrote:
This method no longer works. I've managed to port https://gitlab.com/gpsd/gpsd/-/tree/master/android

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/8f9a47b2-4c81-4534-83cb-b028f9e10440%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to andro...@googlegroups.com.
logcatgps.txt
logcatlocation.txt
lshal.txt
logcatgnss.txt

Michael Goffioul

unread,
May 4, 2020, 8:22:00 AM5/4/20
to Android-x86
Ah, it seems Google is overwriting the location providers with its own. I was looking at AOSP code. When using AOSP, you'd see something like this in the logs at boot:

05-04 03:41:41.467  1484  1484 D GnssLocationProvider: gnssHal 1.1 was null, trying 1.0

This is coming from http://androidxref.com/9.0.0_r3/xref/frameworks/base/services/core/jni/com_android_server_location_GnssLocationProvider.cpp#1130 which is executed when the LocationManagerService component is started up in system_server. The 1.0 HAL is the one that would use gps.default.so module.

Michael.


On Mon, May 4, 2020 at 7:28 AM Luke <hath...@gmail.com> wrote:
Here's the output from logcat and lshal

On Sunday, April 26, 2020 at 1:48:46 PM UTC+12, Michael Goffioul wrote:
You should check that the HAL is available: adb shell lshal
Also check logcat output after boot for (case-insensitive): location, gps, gnss


On Sat, Apr 25, 2020 at 9:25 PM Luke <hath...@gmail.com> wrote:
Still no messages in logcat after enabling android.ha...@1.0-impl and android.ha...@1.0-service

On Sunday, April 26, 2020 at 8:03:59 AM UTC+12, Michael Goffioul wrote:
I'm not using GPS nor do I have corresponding hardware. However this statement triggered my curiosity. Do you know why it no longer works?
AFAICS, if you added module 'android.ha...@1.0-impl' to your build, this should provide a legacy passthrough HAL to the location server in system_server, which is based on the legacy gps.default.so module. This is just deduction from looking at the code, I may overlook something, hence why I asked why it no longer works.

Michael.


On Sat, Apr 25, 2020 at 9:54 AM Luke <hath...@gmail.com> wrote:
This method no longer works. I've managed to port https://gitlab.com/gpsd/gpsd/-/tree/master/android

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/8f9a47b2-4c81-4534-83cb-b028f9e10440%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/0fe21f0d-5969-43e6-b0ff-8a72d713683c%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/5053c5e3-1c2f-4399-b4be-b96fea2ea079%40googlegroups.com.

Luke

unread,
May 4, 2020, 8:59:58 AM5/4/20
to Android-x86
I'd have to test without gapps and see. i also got this message:

05-05 00:49:02.779  1717  1731 E GnssLocationProvider: SetCallback for Gnss Interface fails

On Tuesday, May 5, 2020 at 12:22:00 AM UTC+12, Michael Goffioul wrote:
Ah, it seems Google is overwriting the location providers with its own. I was looking at AOSP code. When using AOSP, you'd see something like this in the logs at boot:

05-04 03:41:41.467  1484  1484 D GnssLocationProvider: gnssHal 1.1 was null, trying 1.0

This is coming from http://androidxref.com/9.0.0_r3/xref/frameworks/base/services/core/jni/com_android_server_location_GnssLocationProvider.cpp#1130 which is executed when the LocationManagerService component is started up in system_server. The 1.0 HAL is the one that would use gps.default.so module.

Michael.


On Mon, May 4, 2020 at 7:28 AM Luke <hath...@gmail.com> wrote:
Here's the output from logcat and lshal

On Sunday, April 26, 2020 at 1:48:46 PM UTC+12, Michael Goffioul wrote:
You should check that the HAL is available: adb shell lshal
Also check logcat output after boot for (case-insensitive): location, gps, gnss


On Sat, Apr 25, 2020 at 9:25 PM Luke <hath...@gmail.com> wrote:
Still no messages in logcat after enabling android.ha...@1.0-impl and android.hardware.gnss@1.0-service

On Sunday, April 26, 2020 at 8:03:59 AM UTC+12, Michael Goffioul wrote:
I'm not using GPS nor do I have corresponding hardware. However this statement triggered my curiosity. Do you know why it no longer works?
AFAICS, if you added module 'android.hardware.gnss@1.0-impl' to your build, this should provide a legacy passthrough HAL to the location server in system_server, which is based on the legacy gps.default.so module. This is just deduction from looking at the code, I may overlook something, hence why I asked why it no longer works.

Michael.


On Sat, Apr 25, 2020 at 9:54 AM Luke <hath...@gmail.com> wrote:
This method no longer works. I've managed to port https://gitlab.com/gpsd/gpsd/-/tree/master/android

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/8f9a47b2-4c81-4534-83cb-b028f9e10440%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/0fe21f0d-5969-43e6-b0ff-8a72d713683c%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to andro...@googlegroups.com.

Luke

unread,
May 7, 2020, 1:52:03 AM5/7/20
to Android-x86
Managed to get it working.
0001-Enable-serial-gps.patch

Chih-Wei Huang

unread,
May 7, 2020, 4:47:45 AM5/7/20
to Android-x86
Luke <hath...@gmail.com> 於 2020年5月7日 週四 下午1:52寫道:
>
> Managed to get it working.

Thank you for the patch.
I've applied it.


Best regards,
Chih-Wei

Jose Luis s

unread,
May 7, 2020, 9:12:18 AM5/7/20
to Android-x86
Hello.

I'm a little lost in this. Do you get gpsd working in android-x86 or the serial library that were included in A-86 already?

I'm really interested in both, can you give more detailed instruction to get gpsd working in A-X86?

Thanks a lot.

Алексей Черепанов

unread,
May 12, 2020, 12:47:07 AM5/12/20
to Android-x86


четверг, 7 мая 2020 г., 13:47:45 UTC+5 пользователь Chih-Wei Huang написал:
Luke <hath...@gmail.com> 於 2020年5月7日 週四 下午1:52寫道:
>
> Managed to get it working.

Thank you for the patch.
I've applied it.


 Hi,
would you rebuild current Oreo and Pie releases with this patch, or we have to wait next releases?

Chih-Wei Huang

unread,
May 13, 2020, 5:25:08 AM5/13/20
to Android-x86
Алексей Черепанов <alx...@gmail.com> 於 2020年5月12日 週二 下午12:47寫道:
> четверг, 7 мая 2020 г., 13:47:45 UTC+5 пользователь Chih-Wei Huang написал:
>> Luke <hath...@gmail.com> 於 2020年5月7日 週四 下午1:52寫道:
>> > Managed to get it working.
>> Thank you for the patch.
>> I've applied it.
>>
> would you rebuild current Oreo and Pie releases with this patch, or we have to wait next releases?

You may download and try the 8.1-r5 now.

For pie-x86 wait the next coming 9.0-r3.

youling 257

unread,
May 13, 2020, 10:36:04 AM5/13/20
to Android-x86
no 8.1 file list at here. https://osdn.net/projects/android-x86/releases/ 

在 2020年5月13日星期三 UTC+8下午5:25:08,Chih-Wei Huang写道:

Antony Stone

unread,
May 13, 2020, 10:52:34 AM5/13/20
to andro...@googlegroups.com
On Wednesday 13 May 2020 at 16:36:04, youling 257 wrote:

Try https://www.android-x86.org/releases.html ?

> 在 2020年5月13日星期三 UTC+8下午5:25:08,Chih-Wei Huang写道:
>

> > Алексей Черепанов <alx...@gmail.com <javascript:>> 於 2020年5月12日 週二


> > 下午12:47寫道:
> >
> > > четверг, 7 мая 2020 г., 13:47:45 UTC+5 пользователь Chih-Wei Huang
> >
> > написал:
> > >> Luke <hath...@gmail.com> 於 2020年5月7日 週四 下午1:52寫道:
> > >>
> > >> > Managed to get it working.
> > >>
> > >> Thank you for the patch.
> > >> I've applied it.
> > >
> > > would you rebuild current Oreo and Pie releases with this patch, or we
> >
> > have to wait next releases?
> >
> > You may download and try the 8.1-r5 now.
> >
> > For pie-x86 wait the next coming 9.0-r3.

Antony.

--
Police have found a cartoonist dead in his house. They say that details are
currently sketchy.

Alexey Cherepanov

unread,
May 13, 2020, 12:09:17 PM5/13/20
to Android-x86


среда, 13 мая 2020 г., 14:25:08 UTC+5 пользователь Chih-Wei Huang написал:
Thanks! It works.
But there is a little trouble. It give wrong location fix time. It seems, reverse sign timezone correction. So I'm at UTC+5, now is 21:09, but location fix time is 11:09.

Jose Luis s

unread,
May 14, 2020, 7:46:15 AM5/14/20
to Android-x86
Great.

So now the serial GPS HAL is working, I can get rid of usb4gps mock location helper in my tablet but I'd like to try the HAL with gpsd,

Luke said that he managed to port https://gitlab.com/gpsd/gpsd/-/tree/master/android, Please can you give me some clue on howto test it? Yes I've read the guide in the gitlab, but not sure how can affect the serialgps hal in A-X86, can both coexist?

Thanks

Michael Goffioul

unread,
May 14, 2020, 7:56:56 AM5/14/20
to Android-x86
AFAIK, they should be able to co-exist. The gpsd HAL implements gnss-1.1 HAL, while the older serial HAL implements gnss-1.0. From what I could see in system_server, it'll try first to use 1.1, and fall back to 1.0 if not found (newer code, e.g. Android Q, will also try gnss-2.0 first).


--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/3e4f0a05-9045-4d89-943c-9364ad126097%40googlegroups.com.

Alexey Cherepanov

unread,
May 16, 2020, 5:45:49 AM5/16/20
to Android-x86


среда, 13 мая 2020 г., 21:09:17 UTC+5 пользователь Alexey Cherepanov написал:
Hi!

Here is patch fixing 2 bugs I've found:
1. inversed timezone correction,
2. nmea string for nmea_cb should be 0-terminated
--- gps.c.bak   2020-05-16 11:32:33.246364116 +0500
+++ gps.c       2020-05-16 14:32:29.308448050 +0500
@@ -308,7 +308,7 @@
     tm.tm_mday  = r->utc_day;
     tm.tm_isdst = -1;
 
-    fix_time = mktime( &tm ) + r->utc_diff;
+    fix_time = mktime( &tm ) - r->utc_diff;    //alxchr
     r->fix.timestamp = (long long)fix_time * 1000;
     return 0;
 }
@@ -493,6 +493,8 @@
         return;
     }
 
+    r->in[r->pos] = 0; // alxchr
+
     gettimeofday(&tv, NULL);
     if (_gps_state->init)
         _gps_state->callbacks->nmea_cb(tv.tv_sec*1000+tv.tv_usec/1000, r->in, r->pos);

Chih-Wei Huang

unread,
May 17, 2020, 7:42:39 PM5/17/20
to Android-x86
Alexey Cherepanov <alx...@gmail.com> 於 2020年5月16日 週六 下午5:45寫道:
> Hi!
> Here is patch fixing 2 bugs I've found:
> 1. inversed timezone correction,
> 2. nmea string for nmea_cb should be 0-terminated
> --- gps.c.bak 2020-05-16 11:32:33.246364116 +0500
> +++ gps.c 2020-05-16 14:32:29.308448050 +0500
> @@ -308,7 +308,7 @@
> tm.tm_mday = r->utc_day;
> tm.tm_isdst = -1;
>
> - fix_time = mktime( &tm ) + r->utc_diff;
> + fix_time = mktime( &tm ) - r->utc_diff; //alxchr
> r->fix.timestamp = (long long)fix_time * 1000;
> return 0;
> }
> @@ -493,6 +493,8 @@
> return;
> }
>
> + r->in[r->pos] = 0; // alxchr
> +
> gettimeofday(&tv, NULL);
> if (_gps_state->init)
> _gps_state->callbacks->nmea_cb(tv.tv_sec*1000+tv.tv_usec/1000, r->in, r->pos);
>

I've applied it.
Thank you for the patch!
Reply all
Reply to author
Forward
0 new messages