Serial and GPS, is it possible?

1,297 views
Skip to first unread message

Nicolò Veronese

unread,
Apr 10, 2014, 9:53:26 AM4/10/14
to andro...@googlegroups.com
Hello, I would like to know if with the new release 4.4 you can use a GPS via the serial port.

I have a device (ublox) programmed to use the nmea protocol. The transfer is done via serial and would like to use an adapter ftdi/pl2303.
Do you know if it is possible?

Chih-Wei Huang

unread,
Apr 10, 2014, 11:53:55 PM4/10/14
to Android-x86
Yes, we have the GPS hal implemented.
But I didn't try it for a long time.

You need to configure it correctly.
Read the hardware/gps code for how to do it.

Nicolò Veronese

unread,
Apr 11, 2014, 4:17:58 PM4/11/14
to andro...@googlegroups.com
Can you explain me how and where I have to look??
I have to compile the kernel or something else?

Nicolò Veronese

unread,
Apr 12, 2014, 7:47:48 AM4/12/14
to andro...@googlegroups.com
Can you explain me?


Il giorno venerdì 11 aprile 2014 05:53:55 UTC+2, Chih-Wei Huang ha scritto:

Chih-Wei Huang

unread,
Apr 13, 2014, 9:31:04 PM4/13/14
to Android-x86
I've said.
Read the hardware/gps code.
You'll find the properties to be set for GPS.
Set it in the /etc/init.sh.

walter

unread,
May 19, 2014, 4:47:38 PM5/19/14
to andro...@googlegroups.com
I have included these lines in my init.sh

set_property ro.kernel.android.gps ttyUSB0
set_property ro.kernel.android.gpsttybaud 9600

but apparently it's not enough.

Can you suggest what else needs to be done ? My PL2303-based USB GPS is recognised and is connected to ttyUSB0.

walter

unread,
May 20, 2014, 9:54:42 AM5/20/14
to andro...@googlegroups.com
Ok, there is a progress,

I've hardcoded my correct baud rate (replaced 115200 with 9600) in gps.c instead of setting it in init.sh,

and as result GPS Test app shows many satellites in view but none in use, and there is no fix for the location

can anyone help?

Andrey Ivanov

unread,
Apr 13, 2015, 6:08:44 PM4/13/15
to andro...@googlegroups.com
вторник, 20 мая 2014 г., 16:54:42 UTC+3 пользователь walter написал:
> Ok, there is a progress,
>
> I've hardcoded my correct baud rate (replaced 115200 with 9600) in gps.c instead of setting it in init.sh,
>
> and as result GPS Test app shows many satellites in view but none in use, and there is no fix for the location
>
> can anyone help?
>
Not sure if I can help, because I've got the same problem. Actually I'm looking for help too.
My USB GPS receiver is GPS/GNSS U-Blox7.
It is connected to ttyACM0.

1. via Build Prop Editor added
ro.kernel.android.gps = ttyACM0
ro.kernel.android.gpsttybaud = 4800
2. inserted line into init.gps fuction of /init.sh script
chmod 666 /dev/ttyACM0

After reboot I can see NMEA output (with correct lat/lon) of 'cat /dev/ttyACM0' in non-root terminal. Ok, GPS is working.

I use ProGorod navigation app. It can be set up for native GPS or NMEA GPS. In the first case I see 9-10 sats with 0 in use with no fix. Exact the same is in many other apps.
In the second case (switched to NMEA GPS) I see 13-16 sats with up to 10 in use and almost instant fix.

As I can understand by reading forum pccar.ru (post 656 on http://pccar.ru/showthread.php?t=18871&page=66 thread) the problem may be in a portion of source code of GPS HAL driver (?).
GPS sats are numbered 1-32
GNSS sats are numbered 65-96
But unsigned int used in code can transfer only 32 sats (1 bit is 1 sat). So if both of GPS sat no.1 GNSS sat no.65 (and so on N and 64+N) are visible they look like one sat with intermittent data.
It would be nice if any can revise code for this issue or give me advice how to fix the problem.
Actualy there is 'nmeafix' silution in 656 post, but I can't check if it works for me now.
Sorry for noobish post and thank you in advavce.

Greg McGee

unread,
May 11, 2015, 12:24:39 AM5/11/15
to andro...@googlegroups.com
Android4+ simply use gpsd like all other Linux/UNIX variants. (any modern Linux distro or BSD, including OSX)

gpsd can talk to pretty much any gps, and handles all the heavy lifting and even format translations, spits out std NMEA on localhost:2947.

Need to get it working as rild craters about twice a second now that the Gobi4000 is installed.

Not sure yet how its set up in Android-x86 but it is apparently a solved engineering problem, as every current Android device with GPS/Glonass support uses it.

Greg McGee

unread,
May 12, 2015, 10:07:00 PM5/12/15
to andro...@googlegroups.com
Looks like android-x86 is using a simple script for GPS support, working on integrating gpsd into external tree.


On Thursday, April 10, 2014 at 8:53:26 AM UTC-5, Nicolò Veronese wrote:

Mexus

unread,
May 13, 2015, 4:37:42 AM5/13/15
to andro...@googlegroups.com

Greg McGee

unread,
May 21, 2015, 6:08:24 PM5/21/15
to andro...@googlegroups.com
"Soap" is the iPhone misspelling of "AOSP"

On Thursday, May 21, 2015, Greg McGee <gjm...@gmail.com> wrote:
Still working in integrating gpsd, needs some other tools to build, sadly it's bsd liscence so no one has to include their sources in soap etc but Google itself supplies binaries for at least one device in the soap eelease


On Wednesday, May 13, 2015, Mexus <miko...@gmail.com> wrote:
--
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/2J0orQpJ9JM/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.

Greg McGee

unread,
May 21, 2015, 6:06:49 PM5/21/15
to andro...@googlegroups.com
Still working in integrating gpsd, needs some other tools to build, sadly it's bsd liscence so no one has to include their sources in soap etc but Google itself supplies binaries for at least one device in the soap eelease

On Wednesday, May 13, 2015, Mexus <miko...@gmail.com> wrote:
--
Reply all
Reply to author
Forward
0 new messages