Difference between revisions of "RPI GPS Board"

From ElectroDragon
Jump to navigation Jump to search
(Created page with "=== RPI Usage === ==== Raw data read on Uart ==== * Make sure uart is turn on on RPI by raspi-config * Direct output raw data from serial - sudo cat /dev/ttyS0, new command i...")
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
=== RPI Usage ===
+
== Hardware Configuration ==
 +
*
 +
=== Software Usage ===
 +
* Use serial to read raw data, tutorial here: [[RPI UART]], please make sure login shell on uart is turned off
 +
* Data output example:
 +
 +
$GPTXT,01,01,01,NMEA unknown msg*58
  
==== Raw data read on Uart ====
+
$GPTXT,01,01,01,NMEA unknown msg*58
* Make sure uart is turn on on RPI by raspi-config
 
* Direct output raw data from serial - sudo cat /dev/ttyS0, new command is cat /dev/serial0
 
* You can always just read that raw data, but its much nicer if you can have some Linux software prettify it. We'll try out gpsd which is a GPS-handling Daemon (background-helper)
 
  
==== Use APPs ====
+
$GPTXT,01,01,01,NMEA unknown msg*58
===== Mus-do Preparation =====
 
* backup and change line in /boot/cmdline.txt to -> dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
 
===== Use GPSD =====
 
* sudo apt-get install gpsd-clients gpsd -y
 
* to run at boot, sudo killall gpsd, and sudo nano /etc/default/gpsd
 
change line DEVICES=””to DEVICES=”/dev/serial0″
 
* if kill automatically stop, then try to run line sudo gpsd /dev/serial0 -F /var/run/gpsd.sock in case
 
* reboot and try gpsmon or cgps
 
  
===== Not yet sort =====
+
$GPRMC,,V,,,,,,,,,,N*53
 +
 
 +
$GPVTG,,,,,,,,,N*30
 +
 
 +
$GPGGA,,,,,,0,00,99.99,,,,,,*48
 +
 
 +
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
 +
 
 +
* recommanded GPS parsing application [[GPSD]]
  
* And you can stop/start service by commands, in case the interface is conlict or you don't want to use it:
 
sudo systemctl stop gpsd.socket
 
sudo systemctl disable gpsd.socket
 
sudo systemctl enable gpsd.socket
 
sudo systemctl start gpsd.socket
 
* Run the following command to start up -  sudo gpsd /dev/ttyS0 -F /var/run/gpsd.sock, or manually store on foreground by:  gpsd -b -N -D 3 -n -F /var/run/gpsd.sock /dev/ttyAMA0
 
* Then output dumb data by  cgps -s, or gpsmon
 
[[File:Cgps-s.png|400px]]
 
* If no data update or com through, double check config:
 
* run command sudo nano /etc/default/gpsd, and change it to look like this
 
<pre>
 
# Default settings for gpsd.
 
# Please do not edit this file directly - use `dpkg-reconfigure gpsd' to
 
# change the options.
 
START_DAEMON="true"
 
GPSD_OPTIONS="-n"
 
DEVICES="/dev/ttyS0"
 
USBAUTO="false"
 
GPSD_SOCKET="/var/run/gpsd.sock"
 
</pre>
 
  
 
[[category: Location SDK]]
 
[[category: Location SDK]]

Revision as of 23:56, 28 June 2020

Hardware Configuration

Software Usage

  • Use serial to read raw data, tutorial here: RPI UART, please make sure login shell on uart is turned off
  • Data output example:
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,,,,,,,,N*30
$GPGGA,,,,,,0,00,99.99,,,,,,*48
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
  • recommanded GPS parsing application GPSD