-
Notifications
You must be signed in to change notification settings - Fork 39
Part 1. Raspberry Pi Setup
This tutorial suggests using the current, latest release of Raspbian, nicknamed Jessie. You can use the previous version, nicknamed Wheezy as well, but keep in mind that the instructions will not be the same for both.
If you're using Jessie, continue this tutorial skipping the Wheezy sections. If you have Wheezy and would like to upgrade to Jessie, here are some instructions. If you have Wheezy and want to stay with Wheezy, pay attention to the notes.
We'll need pip for getting some Python Modules for our code later as well as two python modules pynmea2 for parsing NMEA Sentences from the GPS and ISStreamer for streaming GPS data to Initial State for near real-time visualization.
$ sudo apt-get install python-pip
$ sudo pip install pynmea2
$ sudo pip install ISStreamer
NOTE: Some GPS/Raspberry Pi tutorials will walk you through using USB serial (extra hardware required) or use HW UART and interface with the GPS via
cgpslibraries. For this tutorial, we'll be using the Raspberry Pi's HW UART and will be skippingcgpsall together to avoid extra setup requirements and extra dependencies and code that aren't necessary for this particular tutorial.
We'll need to free up Raspberry Pi's Hardware UART in order to read the serial communications from the GPS Breakout Board. By default, Raspbian is configured to attach a console to ttyAMA0 to send shell and kernal messages over this serial channel. There are three ways to change this setting based on how you're interfacing with the Raspberry Pi.
$ sudo nano /boot/cmdline.txt
Remove console=ttyAMA0,115200 from the config.
Previous:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p6 roo tfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Edited:
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p6 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Wheezy Note: your edited line will look more like this
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
$ sudo raspi-config

Select Option 8 Advanced Options

Select Option A8 Serial

Select <No>
Then you may be prompted to restart your Raspberry Pi, select <No>. We'll reboot at the end.
Raspbian provides a UI to edit the raspi-config settings from the desktop as well by going to Configuration and following similar steps as the raspi-config ui steps as described in Option B.
$ sudo systemctl disable serial-getty@ttyAMA0.service
Wheezy Note: Wheezy and Jessie have fundamentally different ways system services are started and managed. In Wheezy, you edit /etc/inittab instead.
sudo nano /etc/inittabthen comment out the line that saysT0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100by putting a#in front of it so that it is#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100instead.
$ sudo reboot now