Neo 1973 GPS

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Added command line params for gllin)
m (-Documentation)
 
(59 intermediate revisions by 27 users not shown)
Line 1: Line 1:
The Neo1973 device contains an integrated GPS. The particular device
+
{{Neo1973}}
is marketed as an AGPS, and there is some [[Hardware:AGPS |
+
See [[GTA02_GPS|Here]] For information about the GPS in the Neo FreeRunner
discussion]] available as to what significance that "A" might have.
+
  
Note that the GTA02 device (not yet available) contains a different GPS chip (see http://www.u-blox.com/products/atr0635.html and/or http://www.atmel.com/dyn/products/product_card.asp?part_id=3932 for specs).
+
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.
  
All purchased phones do not include the GPS binary driver.  [http://lists.openmoko.org/pipermail/community/2007-July/008466.html]
+
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 is an ongoing 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.  
+
The Iphone 3G uses the same GPS chip. It's not inconceivable that this might lead to further effort.
  
 
See [[Hammerhead/Protocol]] for details and the latest status.
 
See [[Hammerhead/Protocol]] for details and the latest status.
Line 26: Line 24:
 
Some scripts for those with the binary are on [[Manually_using_GPS]]
 
Some scripts for those with the binary are on [[Manually_using_GPS]]
  
==== gllin command line parameters ====
+
Please see the important information on [[gllin]]!
  
Usage (version 1.1.7):
+
== Using GPS ==
  
-help                    Help
+
Aside from accessing the GPS data in applications programs running directly on the smartphone,
-board <type>            Defines board type    Ex: '-board matchbox'
+
you can also access the GPS data stream from another gadget such as a laptop.
                        supported: matchbox, trident
+
-com <com port>          GPS com port;        Ex: '-com com6'
+
-baud <baud rate>        Set baud rate;        Ex: '-baud 115200'
+
-rft <RF type>          Set RF type;          Ex: '-rft RF_LN22OUT'
+
-freq <freq plan> | ?    set frequency plan for GPS or show the list of all available plans
+
                        Ex: '-freq FRQ_PLAN_OCXO_10000'
+
                        Ex: '-freq ?' -- Show all available plans
+
-g <URL>                SUPL Server URL or IP address;
+
                        Ex: '-g 216.15.9.46'
+
-p <port>                SUPL Server port number;
+
                        Ex: '-p 9118'
+
-udp <port>              Local UDP port to send NMEA to.
+
                        '-udp 6000'      [default]
+
-gsm_cell <cell ID>      set GSM Cell ID information
+
                        cell ID has the following format: '<MCC>.<MNC>.<LAC>.<CI>'
+
                        Where:
+
                              MCC - Mobile Country Code
+
                              MNC - Mobile Network Code
+
                              LAC - Location Area Code
+
                              CI  - Cell Identification
+
                        Ex: '-gsm_cell 310.170.367.25732'
+
-set_assisted_off        disable SET assisted capability
+
-set_based_off          disable SET based capability
+
-msisdn <MSISDN>        set value for MSISDN (international phone number) as SET id
+
                        Ex: '-msisdn 14081234567'
+
-nai <nai>              specify Network Access Identifier as SET id
+
                        Ex: '-nai 12345@mywebsite.com'
+
-periodic <nowiki><s></nowiki>            make periodic request every s second (-1 to 64)
+
                        -1  single shot: perform one fix, then quit
+
                          0      native: perform fixes as fast as possible
+
                        <nowiki><s></nowiki>      timed: report a position every <nowiki><s></nowiki> seconds
+
                                          where <nowiki><s></nowiki> is 1 to 64
+
-recover                recover GLLIN after signaled exit
+
-low [<count>]          low level test.  Default <count> is 1
+
-low_debug              Low level debug ON
+
+low_debug              Low level debug OFF
+
-train <count>          Send train data <count> times
+
+pty | -pty              Enable or disable NMEA output to pty "/tmp/nmeaPTY"
+
                        Default is off [-pty]
+
+np | -np                Enable or disable NMEA output to named pipe "/tmp/nmeaNP"
+
                        Default is on [-np]
+
+nmea | -nmea            Enable or disable NMEA output to log file
+
                        Default is off [-nmea]
+
+daemon | -daemon        Become a daemon (or not)
+
                        Default is -daemon
+
-a2 | -a3 | -a0          Select a GTA01 board revision.  Default is a3
+
-batch <st> <n> <fix>    perform batch test of <n> starts of type <st>
+
                        <st> is hot, warm, cold, or SNR.
+
                        Each start has <fix> fixes.
+
-i                      start GLLIN command line
+
+pnd                    optimize for PND
+
-pnd                    look for low signal strength signals
+
+sim                    using simulator so don't use almanac
+
-sim                    not using simulator
+
SNR                      manufacturing SNR test mode
+
hot                      hot start [default]
+
warm                    warm start
+
cold                    cold start
+
-v[n]                    Report GLLIN version string.
+
                        n is 1234 to report selected versions.
+
  
=== Possible GPS programs ===
+
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.
  
As people develop more sophisticated GPS applications, please note them here.
+
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 ===
  
Here are some ideas for possibilities:
+
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.
  
* Cairo-based mapping
+
First be sure you have gllin and gpsd installed.
* 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.
+
* [[GPS-Trail]] a simple trail logger.
+
* [[GPS_Navigation#roadmap|roadmap]] mapping system using freely available maps (US census TIGER, DGLib, shapefiles).
+
* [[Geocaching]] paper chase for advanced users
+
* Set Profile (Mute, etc.) to coordinates (ex. At work)
+
* [[qpegps]] qtopia (arm PDA) based map viewer with gps features
+
* [[Navit]] a car navigation system with routing engine.
+
* [[QMapControl]] Qtopia based mapping widget. Displays maps and custom data, also other widgets can be bound to coordinates. GPS parser for the gllin output included.
+
* [http://lists.openmoko.org/pipermail/community/2007-July/007252.html collection of ideas]
+
  
== Using the Neo's GPS on a Laptop ==
+
# On host type: '''nc -vvn -l -p 5000 > /tmp/nmeaNP''' (Host starts listening on port 5000 for GPS-signals and sends them to /tmp/nmeaNP)
 +
# 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.
  
*First be sure you have gllin installed on the Neo.
+
Tested with RoadNav. Works great!
*On host type: '''nc -vvn -l -p 5000 > /tmp/nmeaNP'''
+
*On the Neo type:  '''nc 192.168.0.200 5000 < /tmp/nmeaNP'''
+
*
+
*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!
+
*
+
*With this in mind if you have an unlimited data package you could export this over the internet.
+
*the possibilities are limitless. 
+
  
 +
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.
 +
 +
=== Bluetooth GPS relay ===
 +
 +
Here is how to make your smartphone appear to be a Bluetooth GPS.
 +
 +
#Power up the bluetooth radio
 +
#Run the gllin script
 +
#Run '''sdptool add SP'''
 +
#Run '''rfcomm watch 0 1 sh -c "cat /tmp/nmeaNP >/dev/rfcomm0" &'''
 +
 +
== GPS applications ==
 +
{{main|GPS applications}}
  
 
[[Category:GPS]]
 
[[Category:GPS]]
 +
[[category:Standard]]

Latest revision as of 22:15, 12 September 2008

Neo 1973
sold out

(Other phones)

See Here For information about the GPS in the Neo FreeRunner

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.

The Neo 1973 used the Hmamerhead.

Contents

[edit] Low level access

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.

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

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.

See Hammerhead/Protocol for details and the latest status.

Some scripts for those with the binary are on Manually_using_GPS

Please see the important information on gllin!

[edit] Using GPS

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.

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.

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.

[edit] Using gpsd with a network connection

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.

First be sure you have gllin and gpsd installed.

  1. On host type: nc -vvn -l -p 5000 > /tmp/nmeaNP (Host starts listening on port 5000 for GPS-signals and sends them to /tmp/nmeaNP)
  2. 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.
  3. On the host PC install GPSD, your GPS is attached as /tmp/nmeaNP
  4. start gpsd on host with: gpsd -p /tmp/nmeaNP
  5. 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.

[edit] Bluetooth GPS relay

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

  1. Power up the bluetooth radio
  2. Run the gllin script
  3. Run sdptool add SP
  4. Run rfcomm watch 0 1 sh -c "cat /tmp/nmeaNP >/dev/rfcomm0" &

[edit] GPS applications

Main article: GPS applications
Personal tools

The Neo1973 device contains an integrated GPS. The particular device is marketed as an AGPS, and there is some discussion available as to what significance that "A" might have.

Note that the GTA02 device (not yet available) contains a different GPS chip (see http://www.u-blox.com/products/atr0635.html and/or http://www.atmel.com/dyn/products/product_card.asp?part_id=3932 for specs).

All purchased phones do not include the GPS binary driver. [1]

GTA01 GPS driver (gllin)

Main article - gllin

The GPS driver is available here: 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.

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


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 is an ongoing effort to write a Free Software program that could be used instead of this binary-only program.

See Hammerhead/Protocol for details and the latest status.

Some scripts for those with the binary are on Manually_using_GPS

gllin command line parameters

Usage (version 1.1.7):

-help                    Help
-board <type>            Defines board type    Ex: '-board matchbox'
                        supported: matchbox, trident
-com <com port>          GPS com port;         Ex: '-com com6'
-baud <baud rate>        Set baud rate;        Ex: '-baud 115200'
-rft <RF type>           Set RF type;          Ex: '-rft RF_LN22OUT'
-freq <freq plan> | ?    set frequency plan for GPS or show the list of all available plans
                        Ex: '-freq FRQ_PLAN_OCXO_10000'
                        Ex: '-freq ?' -- Show all available plans
-g <URL>                 SUPL Server URL or IP address;
                        Ex: '-g 216.15.9.46'
-p <port>                SUPL Server port number;
                        Ex: '-p 9118'
-udp <port>              Local UDP port to send NMEA to.
                        '-udp 6000'      [default]
-gsm_cell <cell ID>      set GSM Cell ID information
                        cell ID has the following format: '<MCC>.<MNC>.<LAC>.<CI>'
                        Where:
                              MCC - Mobile Country Code
                              MNC - Mobile Network Code
                              LAC - Location Area Code
                              CI  - Cell Identification
                        Ex: '-gsm_cell 310.170.367.25732'
-set_assisted_off        disable SET assisted capability
-set_based_off           disable SET based capability
-msisdn <MSISDN>         set value for MSISDN (international phone number) as SET id
                        Ex: '-msisdn 14081234567'
-nai <nai>               specify Network Access Identifier as SET id
                        Ex: '-nai 12345@mywebsite.com'
-periodic <s>            make periodic request every s second (-1 to 64)
                        -1  single shot: perform one fix, then quit
                         0       native: perform fixes as fast as possible
                        <s>       timed: report a position every <s> seconds
                                         where <s> is 1 to 64
-recover                 recover GLLIN after signaled exit
-low [<count>]           low level test.  Default <count> is 1
-low_debug               Low level debug ON
+low_debug               Low level debug OFF
-train <count>           Send train data <count> times
+pty | -pty              Enable or disable NMEA output to pty "/tmp/nmeaPTY"
                        Default is off [-pty]
+np | -np                Enable or disable NMEA output to named pipe "/tmp/nmeaNP"
                        Default is on [-np]
+nmea | -nmea            Enable or disable NMEA output to log file
                        Default is off [-nmea]
+daemon | -daemon        Become a daemon (or not)
                        Default is -daemon
-a2 | -a3 | -a0          Select a GTA01 board revision.  Default is a3
-batch <st> <n> <fix>    perform batch test of <n> starts of type <st>
                        <st> is hot, warm, cold, or SNR.
                        Each start has <fix> fixes.
-i                       start GLLIN command line
+pnd                     optimize for PND
-pnd                     look for low signal strength signals
+sim                     using simulator so don't use almanac
-sim                     not using simulator
SNR                      manufacturing SNR test mode
hot                      hot start [default]
warm                     warm start
cold                     cold start
-v[n]                    Report GLLIN version string.
                        n is 1234 to report selected versions.

Possible GPS programs

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

Here are some ideas for possibilities:

  • Cairo-based mapping
  • Routing
  • Openstreetmap a map viewer, annotation, and editing system.
  • Pyroute is a routing program written in Python by Ojw, and a mobile phone GUI for maps, GPS, and routing.
  • GPS-Trail a simple trail logger.
  • roadmap mapping system using freely available maps (US census TIGER, DGLib, shapefiles).
  • Geocaching paper chase for advanced users
  • Set Profile (Mute, etc.) to coordinates (ex. At work)
  • qpegps qtopia (arm PDA) based map viewer with gps features
  • Navit a car navigation system with routing engine.
  • QMapControl Qtopia based mapping widget. Displays maps and custom data, also other widgets can be bound to coordinates. GPS parser for the gllin output included.
  • collection of ideas

Using the Neo's GPS on a Laptop

  • First be sure you have gllin installed on the Neo.
  • On host type: nc -vvn -l -p 5000 > /tmp/nmeaNP
  • On the Neo type: nc 192.168.0.200 5000 < /tmp/nmeaNP
  • 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!
  • With this in mind if you have an unlimited data package you could export this over the internet.
  • the possibilities are limitless.