Difference between revisions of "GPS"

From ArmadeusWiki
Jump to: navigation, search
m
 
(25 intermediate revisions by 6 users not shown)
Line 2: Line 2:
  
 
==Introduction==
 
==Introduction==
GPS stands for Global Positioning System and is intended to allow one to knows its localization on Earth quite accuratly. See [http://en.wikipedia.org/wiki/Global_Positioning_System this Wikipedia article] for more informations.
+
GPS stands for Global Positioning System and is intended to allow one to knows its localization on Earth quite accuratly. See [http://en.wikipedia.org/wiki/Global_Positioning_System this Wikipedia article] for more informations. GPS receivers are generally driven through a low speed RS232 bus or USB.
  
==APF27Wireless hardware==
 
The uBlox NEO-5M module is used on the [[Wireless_extension_board|APF27Wireless board]]. The specifications can be found here: http://www.ublox.com/en/gps-modules/pvt-modules/neo-5m.html
 
 
==Other tested hardware==
 
GPS receivers are generally driven through a low speed RS232 bus or USB.
 
 
===RS232 modules===
 
===RS232 modules===
 
The following RS232 receivers were successfully tested:
 
The following RS232 receivers were successfully tested:
 +
* the GPS receiver of the [[Wireless_extension_board|APF27 Wireless extension]] & [[APF51Dev]] boards (uBlox)
 
* the GPS receiver of the [http://projetaurore.assos.univ-fcomte.fr/ Projet Aurore association]. This autonomous receiver uses a standard NMEA GPS module that can be connected to the 3,3V RS232 port of your APF9328. All you need to do is to get the GND and TX signals out of this module and connect is to your GND and RX signals of your APF:<br>
 
* the GPS receiver of the [http://projetaurore.assos.univ-fcomte.fr/ Projet Aurore association]. This autonomous receiver uses a standard NMEA GPS module that can be connected to the 3,3V RS232 port of your APF9328. All you need to do is to get the GND and TX signals out of this module and connect is to your GND and RX signals of your APF:<br>
 
{|border=0 summary="APF pictures"
 
{|border=0 summary="APF pictures"
Line 17: Line 13:
 
|----------------
 
|----------------
 
|}
 
|}
* the GPS receiver of the APF27 Wireless extension board
 
  
 
===USB modules===
 
===USB modules===
These modules are mostly serial one with a RS232 <-> USB converter.
+
These modules are mostly serial one with a RS232 <-> USB converter. None were tested yet.
  
==Usage==
+
==APF6Dev==
=== APF27 Wireless (APW)===
+
====Configuration====
* Be sure to have correctly choosen the GPS option [[Wireless_extension_board#Linux_configuration|while configuring you Linux kernel for the APW]]. This will autoselect and activate corresponding serial port.
+
* This is done by default.
 +
 
 +
====Usage====
 +
* On APF6Dev, optional GSM module is access through the serial port UART1 of the IMX6 chip.
 +
 
 +
* Configure the port:
 +
 
 +
<pre class="apf">
 +
# export GPS_PORT=/dev/ttymxc0
 +
# stty -F $GPS_PORT raw -echo -echoe -echok 38400
 +
</pre>
 +
 
 +
* Test it: you'll get NMEA frames:
 +
<pre class="apf">
 +
# cat /dev/ttymxc0
 +
$GPGSV,3,1,12,01,80,354,,02,32,070,38,04,13,037,09,09,14,146,*78
 +
 +
$GPRMC,164916.00,V,,,,,,,130709,,,N*7C
 +
 
 +
$GPGGA,164916.00,,,,,0,00,99.99,,,,,,*6B
 +
...
 +
</pre>
 +
 
 +
== APF51Dev ==
 +
===Configuration===
 +
* Should be done by default; if not here is how to:
 +
<pre class="host">
 +
$ make linux-menuconfig
 +
</pre>
 +
 
 +
<pre class="config">
 +
Device Drivers  --->
 +
  Armadeus specific drivers  --->
 +
    FPGA Drivers  --->
 +
      [*]  Board designs
 +
      [*]    board drivers for twin uarts design
 +
      <M>      board twin uarts
 +
      <M>      board irq manager
 +
</pre>
 +
 
 +
===Usage===
 +
* Don't forget to put "Wireless" jumper J42 on your [[APF51Dev]] (near microSD connector) '''AND''' to power on FPGA Bank 3 (with corresponding jumper J39).
 +
* On APF51Dev, optionnal GPS module (like GSM/3G) is accessed through a serial port synthetized in APF51's FPGA. So it has to be "loaded" first. (Needed dual UARTs FPGA firmware can be found under armadeus-4.0 distribution in ''firmware/pod_scripts'' directory, with the [[POD]] script needed to regenerate it, and is by default installed in rootfs).
 +
<pre class="apf">
 +
# load_fpga /lib/firmware/fpga/apf51_gsm_gps_firmware.bin
 +
</pre>
 +
Once firmware loaded, drivers related to FPGA can be used :
 +
<pre class="apf">
 +
# modprobe irq_ocore
 +
# modprobe 8250
 +
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
 +
# modprobe twin_uarts_irq_mng
 +
# modprobe twin_uarts_16750
 +
serial8250.0: ttyS0 at MMIO 0xb8000020 (irq = 320) is a TI16750
 +
serial8250.0: ttyS1 at MMIO 0xb8000040 (irq = 321) is a TI16750
 +
</pre>
 +
* Configure serial port:
 +
If the ''/dev/ttyS[0-1]'' device files are not created automatically, then create it/them with ''mknod'' :
 +
<pre class="apf">
 +
# mknod /dev/ttyS0 c 4 64
 +
# mknod /dev/ttyS1 c 4 65
 +
</pre>
 +
{{Note| depending on GPS firmware '''9600 bauds''' may be the default speed instead of 38400 bauds}}
 +
Then for a 38400 bauds communication:
 +
<pre class="apf">
 +
# export GPS_PORT=/dev/ttyS1
 +
# stty -F $GPS_PORT raw -echo -echoe -echok 38400
 +
</pre>
 +
* Test it: you'll get NMEA frames:
 +
<pre class="apf">
 +
# cat /dev/ttyS1
 +
$GPGSV,3,1,12,01,80,354,,02,32,070,38,04,13,037,09,09,14,146,*78
 +
 +
$GPRMC,164916.00,V,,,,,,,130709,,,N*7C
 +
 
 +
$GPGGA,164916.00,,,,,0,00,99.99,,,,,,*6B
 +
...
 +
</pre>
 +
 
 +
== APF27 Wireless (APW)==
 +
* Be sure to have correctly choosen the GPS option [[Wireless_extension_board#Linux_configuration|while configuring you Linux kernel for the APW]]. This will autoselect and activate corresponding serial port. Reflash your Linux kernel.
 +
* Be sure that J3 jumper (near SIM card socket) is plugged in
 
* Configure GPS serial port (4 for Linux == UART5 for i.MX) of your APF27 (raw, no echo, 38400 bauds 8N1):
 
* Configure GPS serial port (4 for Linux == UART5 for i.MX) of your APF27 (raw, no echo, 38400 bauds 8N1):
 +
* Remark: depending on GPS firmware 9600 bauds may be the default speed
 
<pre class="apf">
 
<pre class="apf">
# stty -F /dev/ttySMX4 raw -echo -echoe -echok
+
# stty -F /dev/ttySMX4 raw -echo -echoe -echok 38400
# stty -F /dev/ttySMX4 38400
+
 
</pre>
 
</pre>
  
Line 41: Line 117:
 
</pre>
 
</pre>
  
=== APF9328 ===
+
== APF9328 ==
 
* Configure Serial port 1 of your APF9328 (4800 bauds 8N1):
 
* Configure Serial port 1 of your APF9328 (4800 bauds 8N1):
 
<pre class="apf">
 
<pre class="apf">
Line 70: Line 146:
  
 
==Troubleshots==
 
==Troubleshots==
* In case your Aurore GPS module is detected and then automatically removed from USB stack when you plug it on your PC, try to deinstall that:
+
* In case your Aurore GPS module is detected and then automatically removed from the USB stack when you plug it on your PC, try to uninstall brltty:
 +
<pre class="host">
 
  $ sudo apt-get remove brltty
 
  $ sudo apt-get remove brltty
 +
</pre>
 +
 +
==Going further==
 +
* If you don't want to manually parse NMEA frames in your app or want to support different GPS receivers type, you'll probably be interested by the [[GPS daemon]]
 +
 +
==Resources==
 +
* [http://www.ublox.com/en/gps-modules/pvt-modules/neo-5m.html Datasheet of the GPS module used on Armadeus Systems APW]
 +
* [http://www.futuraelettronica.net/pdf_ita/8160-ET312.pdf Datasheet of the GPS module used by Projet Aurore]
 +
* [http://jmfriedt.free.fr/notice_gps.pdf Documentation sur le module GPS du projet Aurore]
  
 
==Links==
 
==Links==
 
* http://en.wikipedia.org/wiki/Global_Positioning_System
 
* http://en.wikipedia.org/wiki/Global_Positioning_System
 +
* [http://gpsd.berlios.de/gps-hacking.html How GPS is working, from gpsd (Linux daemon) creators]
 
* http://vancouver-webpages.com/peter/nmeafaq.txt
 
* http://vancouver-webpages.com/peter/nmeafaq.txt
* http://www.futuraelettronica.net/pdf_ita/8160-ET312.pdf
+
 
* [http://jmfriedt.free.fr/notice_gps.pdf Documentation sur le module GPS du projet Aurore]
+
[[Category:Navigation]]
 +
[[Category:Localization]]
 +
[[Category:GPS]]

Latest revision as of 13:50, 29 March 2017

This page will summarize informations to connect GPS modules to your Armadeus board.

Introduction

GPS stands for Global Positioning System and is intended to allow one to knows its localization on Earth quite accuratly. See this Wikipedia article for more informations. GPS receivers are generally driven through a low speed RS232 bus or USB.

RS232 modules

The following RS232 receivers were successfully tested:

  • the GPS receiver of the APF27 Wireless extension & APF51Dev boards (uBlox)
  • the GPS receiver of the Projet Aurore association. This autonomous receiver uses a standard NMEA GPS module that can be connected to the 3,3V RS232 port of your APF9328. All you need to do is to get the GND and TX signals out of this module and connect is to your GND and RX signals of your APF:
Recto
Verso

USB modules

These modules are mostly serial one with a RS232 <-> USB converter. None were tested yet.

APF6Dev

Configuration

  • This is done by default.

Usage

  • On APF6Dev, optional GSM module is access through the serial port UART1 of the IMX6 chip.
  • Configure the port:
# export GPS_PORT=/dev/ttymxc0
# stty -F $GPS_PORT raw -echo -echoe -echok 38400
  • Test it: you'll get NMEA frames:
# cat /dev/ttymxc0
$GPGSV,3,1,12,01,80,354,,02,32,070,38,04,13,037,09,09,14,146,*78
 
$GPRMC,164916.00,V,,,,,,,130709,,,N*7C

$GPGGA,164916.00,,,,,0,00,99.99,,,,,,*6B
...

APF51Dev

Configuration

  • Should be done by default; if not here is how to:
$ make linux-menuconfig
Device Drivers  --->
  Armadeus specific drivers  --->
    FPGA Drivers   --->
      [*]   Board designs
      [*]     board drivers for twin uarts design
      <M>       board twin uarts
      <M>       board irq manager

Usage

  • Don't forget to put "Wireless" jumper J42 on your APF51Dev (near microSD connector) AND to power on FPGA Bank 3 (with corresponding jumper J39).
  • On APF51Dev, optionnal GPS module (like GSM/3G) is accessed through a serial port synthetized in APF51's FPGA. So it has to be "loaded" first. (Needed dual UARTs FPGA firmware can be found under armadeus-4.0 distribution in firmware/pod_scripts directory, with the POD script needed to regenerate it, and is by default installed in rootfs).
# load_fpga /lib/firmware/fpga/apf51_gsm_gps_firmware.bin

Once firmware loaded, drivers related to FPGA can be used :

# modprobe irq_ocore
# modprobe 8250
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
# modprobe twin_uarts_irq_mng
# modprobe twin_uarts_16750
serial8250.0: ttyS0 at MMIO 0xb8000020 (irq = 320) is a TI16750
serial8250.0: ttyS1 at MMIO 0xb8000040 (irq = 321) is a TI16750
  • Configure serial port:

If the /dev/ttyS[0-1] device files are not created automatically, then create it/them with mknod :

# mknod /dev/ttyS0 c 4 64
# mknod /dev/ttyS1 c 4 65
Note Note: depending on GPS firmware 9600 bauds may be the default speed instead of 38400 bauds

Then for a 38400 bauds communication:

# export GPS_PORT=/dev/ttyS1
# stty -F $GPS_PORT raw -echo -echoe -echok 38400
  • Test it: you'll get NMEA frames:
# cat /dev/ttyS1
$GPGSV,3,1,12,01,80,354,,02,32,070,38,04,13,037,09,09,14,146,*78
 
$GPRMC,164916.00,V,,,,,,,130709,,,N*7C

$GPGGA,164916.00,,,,,0,00,99.99,,,,,,*6B
...

APF27 Wireless (APW)

  • Be sure to have correctly choosen the GPS option while configuring you Linux kernel for the APW. This will autoselect and activate corresponding serial port. Reflash your Linux kernel.
  • Be sure that J3 jumper (near SIM card socket) is plugged in
  • Configure GPS serial port (4 for Linux == UART5 for i.MX) of your APF27 (raw, no echo, 38400 bauds 8N1):
  • Remark: depending on GPS firmware 9600 bauds may be the default speed
# stty -F /dev/ttySMX4 raw -echo -echoe -echok 38400
  • Test it: you'll get NMEA frames:
 # cat /dev/ttySMX4
 $GPGSV,3,1,12,01,80,354,,02,32,070,38,04,13,037,09,09,14,146,*78
  
 $GPRMC,164916.00,V,,,,,,,130709,,,N*7C
 
 $GPGGA,164916.00,,,,,0,00,99.99,,,,,,*6B

APF9328

  • Configure Serial port 1 of your APF9328 (4800 bauds 8N1):
 # stty -F /dev/ttySMX1 4800
  • Power on your GPS module
  • Test it: you'll get NMEA frames:
 # cat /dev/ttySMX1
 $GPGGA,000026.032,,,,,0,00,,,M,0.0,M,,0000*53
 
 $GPGSA,A,1,,,,,,,,,,,,,,,*1E
 
 $GPRMC,000026.032,V,,,,,,,160406,,*2F
 
 $GPGGA,000027.032,,,,,0,00,,,M,0.0,M,,0000*52

NMEA Frames signification

  • There is a small tool (under development) in target/demos/gps/ that can help you to understand how to parse some NMEA frames in your application.
  • $GPGGA: Global Positioning System Fix Data
  • $GPGLL: Geographic Position, Latitude/Longitude
  • $GPGSA: GPS DOP and Active Satellites
  • $GPGSV: GPS Satellites in View
  • $GPRMB: Recommended Minimum Navigation Information
  • $GPRMC: Recommended Minimum Specific GPS/TRANSIT Data

Troubleshots

  • In case your Aurore GPS module is detected and then automatically removed from the USB stack when you plug it on your PC, try to uninstall brltty:
 $ sudo apt-get remove brltty

Going further

  • If you don't want to manually parse NMEA frames in your app or want to support different GPS receivers type, you'll probably be interested by the GPS daemon

Resources

Links