The smartphones contain an integrated GPS receiver. The devices used are marketed as Assisted GPS ('AGPS'). Performance requirements are defined in GSM/GPRS 3GPP TS 25.171, CDMA 3GPP2 C.S0036-0. There is some [[Hardware:AGPS | discussion]] available as to what significance that "A" might have.

The external antenna for the GPS uses an [http://en.wikipedia.org/wiki/MMCX MMCX] connector. More information about external antennas on the [[GPS antennas for neo1973|GPS antennas page]]. The connector for the internal GPS antenna also uses an MMCX connector. The external connector is located on the side of FreeRunner.

−

=== GTA01 GPS driver (gllin) ===

+

The Neo 1973 used the [[Neo1973 hardware#AGPS|Hmamerhead]].

−

''Main article - [[gllin]]''

+

−

The GPS driver is available here: [http://3rdparty.downloads.openmoko.org/gllin/ http://3rdparty.downloads.openmoko.org/gllin/]. It is a command line tool that after starting writes the positioning data so that they can be read as if they were written to the file.

+

== Low level access ==

−

And here the Mail from Michael Shiloh [http://lists.openmoko.org/pipermail/community/2007-November/011916.html http://lists.openmoko.org/pipermail/community/2007-November/011916.html]

+

The Neo 1973 uses a separate userland driver to access the Hammerhead GPS. See this article for more information on this driver: [[gllin]]

+

The gllin driver itself is available here: http://3rdparty.downloads.openmoko.org/gllin/

+

It can be run from a command line. It outputs the NMEA data stream from the Hammerhead chip on a pseudotty device, so that it can be read as if the data were coming in on a serial port.

−

In the very early shipment to 50 Phase 1 developers, a binary-only program for talking to the the GPS was accidentally included

+

Here is email from Michael Shiloh about it. http://lists.openmoko.org/pipermail/community/2007-November/011916.html

−

in /home/root/DM2/gps, (and presumably, the same binary would function on a P0 device).

+

−

This binary is called gllin and it is a oabi binary, i.e. it will only work in the 2007.1 OpenMoko environment. There is now a eabi binary, which works with 2007.2.

+

−

There was an effort to write a Free Software

+

There was an effort to write a Free Software program that could be used instead of this binary-only program, but this stalled after the decision to change GPS chips in GTA02.

−

program that could be used instead of this binary-only program, but this stalled after the decision to change GPS chips in GTA02.

+

The Iphone 3G uses the same GPS chip. It's not inconceivable that this might lead to further effort.

Aside from accessing the GPS data in applications programs running directly on the smartphone,

+

you can also access the GPS data stream from another gadget such as a laptop.

−

To turn on the GPS, echo 1 to the file ./devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/neo1973-pm-gps.0/pwron

+

Here are a couple ways to do that. You can use a network connection to pull data from the gpsd daemon, or you can make the smartphone appear to be a generic Bluetooth-connected GPS receiver.

−

To read from the GPS, simply read /dev/ttySAC1.

+

Using gpsd requires a program that understands its protocol, such as GPSdrive.

+

Using Bluetooth would allow using just about any program that understands the NMEA protocol.

+

+

=== Using gpsd with a network connection ===

−

cat /dev/ttySAC1 will work fine.

+

This procedure depends upon being able to set up a network connection between your Neo and your laptop. The connection can be over either WiFi or USB cable.

−

Before getting a fix, the GPS spits out lots of "$GPTXT,01,01,01,NMEA unknown msg*58", though these stop once a fix is obtained. --[[User:Speedevil|Speedevil]] 11:52, 7 April 2008 (CEST)

+

First be sure you have gllin and gpsd installed.

−

In Openmoko projects, you could find a GPS test program that could provide graphical and text dump of GPS information. This project called [http://svn.projects.openmoko.org/svnroot/openmoko-agpsui Openmoko AGPS UI project].

# On the Neo type: '''nc 192.168.0.200 5000 < /dev/ttySAC1''' (Signals from device will be send to port 5000 on host.) If your host is connected to the neo via wifi, change the IP address in the command to the one of the host.

+

# On the host PC install GPSD, your GPS is attached as /tmp/nmeaNP

+

# start gpsd on host with: '''gpsd -p /tmp/nmeaNP'''

+

# run your application! I used gpsdrive and it works better than my stand-alone GPS.

−

=== Possible GPS programs ===

+

Tested with RoadNav. Works great!

−

As people develop more sophisticated GPS applications, please note them here.

+

If you have an unlimited [[GPRS]] data package you could make your gpsd service accessible over the Internet. This opens up many possibilities. For example, you could implemented AVL (Automatic Vehicle Location) by having a web server somewhere query your gpsd server for your position and write it to a KML file which would then display your location on a Google map.

−

Here are some ideas for possibilities:

+

=== Bluetooth GPS relay ===

−

* Cairo-based mapping

+

Here is how to make your smartphone appear to be a Bluetooth GPS.

−

* Routing

+

−

* [[Openstreetmap]] a map viewer, annotation, and editing system.

+

−

* [http://wiki.openstreetmap.org/index.php/Pyroute Pyroute] is a routing program written in Python by Ojw, and a mobile phone GUI for maps, GPS, and routing.

* [http://www.kflog.org/cumulus/ Cumulus] GPS software for glider pilots (and pilots in general), has a port for Qtopia and pulls (world) maps from the KFLog flight planner project. I think someone has put a project like this on the projects website [http://projects.openmoko.org/projects/openvario/ here].

Latest revision as of 20:15, 12 September 2008

The smartphones contain an integrated GPS receiver. The devices used are marketed as Assisted GPS ('AGPS'). Performance requirements are defined in GSM/GPRS 3GPP TS 25.171, CDMA 3GPP2 C.S0036-0. There is some discussion available as to what significance that "A" might have.

The external antenna for the GPS uses an MMCX connector. More information about external antennas on the GPS antennas page. The connector for the internal GPS antenna also uses an MMCX connector. The external connector is located on the side of FreeRunner.

Contents

The Neo 1973 uses a separate userland driver to access the Hammerhead GPS. See this article for more information on this driver: gllin

The gllin driver itself is available here: http://3rdparty.downloads.openmoko.org/gllin/
It can be run from a command line. It outputs the NMEA data stream from the Hammerhead chip on a pseudotty device, so that it can be read as if the data were coming in on a serial port.

There was an effort to write a Free Software program that could be used instead of this binary-only program, but this stalled after the decision to change GPS chips in GTA02.
The Iphone 3G uses the same GPS chip. It's not inconceivable that this might lead to further effort.

On the Neo type: nc 192.168.0.200 5000 < /dev/ttySAC1 (Signals from device will be send to port 5000 on host.) If your host is connected to the neo via wifi, change the IP address in the command to the one of the host.

On the host PC install GPSD, your GPS is attached as /tmp/nmeaNP

start gpsd on host with: gpsd -p /tmp/nmeaNP

run your application! I used gpsdrive and it works better than my stand-alone GPS.

Tested with RoadNav. Works great!

If you have an unlimited GPRS data package you could make your gpsd service accessible over the Internet. This opens up many possibilities. For example, you could implemented AVL (Automatic Vehicle Location) by having a web server somewhere query your gpsd server for your position and write it to a KML file which would then display your location on a Google map.

In the very early shipment to 50 Phase 1 developers, a binary-only program for talking to the the GPS was accidentally included
in /home/root/DM2/gps, (and presumably, the same binary would function on a P0 device).
This binary is called gllin and it is a oabi binary, i.e. it will only work in the 2007.1 OpenMoko environment. There is now a eabi binary, which works with 2007.2.

There was an effort to write a Free Software
program that could be used instead of this binary-only program, but this stalled after the decision to change GPS chips in GTA02.

Cumulus GPS software for glider pilots (and pilots in general), has a port for Qtopia and pulls (world) maps from the KFLog flight planner project. I think someone has put a project like this on the projects website here.