Difference between revisions of "RPI GPS Board"

From ElectroDragon
Jump to navigation Jump to search
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
=== RPI Usage ===
+
== Hardware Configuration ==
* Use serial to read raw data, tutorial here: [[RPI UART]]
+
=== GPS ===
 +
* Schematic please see at this page: https://www.electrodragon.com/w/Location_HDK
 +
3-way jumper setup
 +
{| class="wikitable sortable"
 +
|-
 +
! Board Interface !! RPI !! Default
 +
 
 +
|-
 +
| SD CS Selection || via 3-way jumper: GPIO8 or GPIO7 || IO7
 +
|-
 +
| RF(LORA) CS Selection ||
 +
* via 3-way jumper: GPIO8 or GPIO7
 +
* via 2-way jumper: GPIO25
 +
|| IO8
 +
|-
 +
| RF(LORA) DIO0 || GPIO4 || IO4
 +
|-
 +
| RF(LORA) RST || GPIO17 || IO7
 +
|-
 +
| SD / RF: SCK MOSI MISO || GPIO 9 / 10 / 11 || IO 9/10/11
 +
|-
 +
| GPS_INT || GPIO 22 || IO22
 +
|-
 +
| GPS_1PPS || On board LED or GPIO27 || LED
 +
|}
 +
 
 +
 
 +
== 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:  
 
* Data output example:  
 
   
 
   
Line 17: Line 45:
 
  $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
 
  $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
  
==== Use APPs ====
+
* recommanded GPS parsing application [[GPSD]]
===== 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 =====
+
=== Lora ===
 +
* Please check demo code here in lora folder: https://github.com/Edragon/RPI
  
* And you can stop/start service by commands, in case the interface is conlict or you don't want to use it:
+
== Note ==
sudo systemctl stop gpsd.socket
+
* For raspberry Pi 4, if it can not boot well, please remove the 3.3V power jumper, or cut off the pin of 3.3V to raspberry pi.
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]]

Latest revision as of 02:31, 29 June 2020

Hardware Configuration

GPS

3-way jumper setup

Board Interface RPI Default
SD CS Selection via 3-way jumper: GPIO8 or GPIO7 IO7
RF(LORA) CS Selection
  • via 3-way jumper: GPIO8 or GPIO7
  • via 2-way jumper: GPIO25
IO8
RF(LORA) DIO0 GPIO4 IO4
RF(LORA) RST GPIO17 IO7
SD / RF: SCK MOSI MISO GPIO 9 / 10 / 11 IO 9/10/11
GPS_INT GPIO 22 IO22
GPS_1PPS On board LED or GPIO27 LED


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

Lora

Note

  • For raspberry Pi 4, if it can not boot well, please remove the 3.3V power jumper, or cut off the pin of 3.3V to raspberry pi.