Difference between revisions of "GPS"

From Gumstix User Wiki
Jump to: navigation, search
(Initial version describes how to make a console image with gps daemon and test utility built-in.)
 
(Added more content, improved formatting)
Line 1: Line 1:
The following steps will allow you to quickly test the GPS module on the Gallop43 board.
+
Testing GPS can be done using a daemon, gpsd, and console application, cgps, which is included in the gps-utils package.
  
<code>
+
== Installing Packages ==
$ cd ~/overo-oe/org.openembedded.dev/recipes/images/<br>
+
 
$ cp omap3-console-image.bb omap3-gps-image.bb<br>
+
Here are two methods for installing gpsd and gps-utils.
$ nano omap3-gps-image.bb
+
 
</code>
+
=== Network Install ===
 +
 
 +
If your Overo is connected to the Internet installation is very simple.
 +
 
 +
# opkg update
 +
# opkg download gpsd
 +
# opkg download gps-utils
 +
# opkg install gpsd
 +
# opkg install gps-utils
 +
 
 +
=== Offline Install ===
 +
 
 +
If your Overo doesn't have an Internet connection, the easiest way to install the required GPS packages is by including them in an image. This is one way to do so, see [http://www.gumstix.net/Setup-and-Programming/view/Build-system-overview/Hello-world-tutorial/111.html the Gumstix hello world tutorial] for a better alternative.
 +
 
 +
$ cd ~/overo-oe/org.openembedded.dev/recipes/images/
 +
$ cp omap3-console-image.bb omap3-gps-image.bb
 +
$ nano omap3-gps-image.bb
  
 
Add the packages gpsd and gps-utils to the TOOLS_INSTALL section.
 
Add the packages gpsd and gps-utils to the TOOLS_INSTALL section.
  
<code>
+
$ bitbake omap3-gps-image
$ bitbake omap3-gps-image
+
 
</code>
+
Create a [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html bootable microSD] with the resulting image.
 +
 
 +
== Configuration ==
  
Create a [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html bootable microSD] using the resulting image.
 
 
'''gpsd''' will start automatically when you boot, however you will need to tell it what serial port the device is connected to.
 
'''gpsd''' will start automatically when you boot, however you will need to tell it what serial port the device is connected to.
  
<code>
+
# killall gpsd
$ killall gpsd<br>
+
# gpsd /dev/ttyS0
$ gpsd /dev/ttyS0<br>
+
 
</code>
+
You can change the ${GPS_DEV} variable in the /etc/default/gpsd to /dev/ttyS0 so it will work automatically on boot.
  
You can change the ${GPS_DEV} variable in the /etc/default/gpsd to /dev/ttyS0 so it will work at startup. Finally:
+
== Test ==
  
<code>
+
# cgps
$ cgps
+
</code>
+

Revision as of 14:40, 1 December 2010

Testing GPS can be done using a daemon, gpsd, and console application, cgps, which is included in the gps-utils package.

Installing Packages

Here are two methods for installing gpsd and gps-utils.

Network Install

If your Overo is connected to the Internet installation is very simple.

# opkg update
# opkg download gpsd
# opkg download gps-utils
# opkg install gpsd
# opkg install gps-utils

Offline Install

If your Overo doesn't have an Internet connection, the easiest way to install the required GPS packages is by including them in an image. This is one way to do so, see the Gumstix hello world tutorial for a better alternative.

$ cd ~/overo-oe/org.openembedded.dev/recipes/images/
$ cp omap3-console-image.bb omap3-gps-image.bb
$ nano omap3-gps-image.bb

Add the packages gpsd and gps-utils to the TOOLS_INSTALL section.

$ bitbake omap3-gps-image

Create a bootable microSD with the resulting image.

Configuration

gpsd will start automatically when you boot, however you will need to tell it what serial port the device is connected to.

# killall gpsd
# gpsd /dev/ttyS0

You can change the ${GPS_DEV} variable in the /etc/default/gpsd to /dev/ttyS0 so it will work automatically on boot.

Test

# cgps