Detailed Raspberry Pi Setup Documentation

This is the detailed documentation of every step necessary to create the Raspberry Pi chartplotter computer. I upsized my SD card to an 8-gig version so I could have more room for charts and other programs, and when I did so, I documented the process. This is the same process that was done before, but this time it is documented much more thoroughly.

Setting Up Raspberry Pi

  1. Format a new SD card.
    On my windows machine, I used the SDCard.org application as the OOB Windows format apparently doesn’t work (I didn’t try it, just going off of forum posts).The only option I changed was to set FORMAT SIZE ADJUSTMENT = ON and give the volume a name.
  2. Download the NOOBS package from raspberrypi.org and extract onto the SD card
  3. Connect the RPI hardware
    • HDMI connection to a monitor
    • Ethernet connection to a router with internet connectivity
    • USB Keyboard & Mouse
  4. Insert the SD card into the Raspberry Pi and boot. Install the OS of your choice (I used Raspbian)
    Confirm overwriting of the data
  5. On first load, set a few settings. I used the following:
    • Boot to Desktop: ON
    • Overclock: Medium (950MHz ARM, 250MHz Core, 2 overvolt)
    • Update internationalization for US
      • Raspberry pi is a UK product, set the Locale, timezone, and keyboard layout to the US versions.
    • Reboot
  6. It’s always smart to get the latest updates for the OS, so:
    • sudo apt-get update
    • sudo apt-get upgrade
  7. Next I want to set the video resolution to something fast, and yet of high quality. I settled on 1280×720@60Hz (720p CEA : Group 1, Mode 4)
  8. I also don’t want the screen to get turned off, since it’s probable that the chartplotter will run for long periods unattended. I found a forum post that fixed it, by editing lightdm.conf
  9. I want to use a wireless keyboard with built in trackpad, so the next step is to set that up
    • This was a very rigorous and difficult process that entailed inserting the USB dongle and turning on the power switch on the keyboard!
  10. Up to this point, I was using wired Ethernet for internet access. I don’t have a hub on the boat, so I got a wireless USB adapter to connect through instead. Setup was a 2-minute task:
    • Turn off the Pi
    • Plug the adapter into the Pi, and disconnect Ethernet
    • Reboot
    • Open the WiFi Gui
    • Click scan. double-click the network you want to connect to.
    • Enter WiFi password
    • Click connect
  11. Install Geany for C/C++/Python development
    • sudo apt-get install geany
  12. Enable I2C communication (for Arduino and sensors)
    • edit /etc/modules
      • add i2c-bcm2708 and i2c-dev
    • edit /etc/modprobe.d/raspi-blacklist.conf
      • #blacklist i2c-bcm2708
    • sudo apt-get install python-smbus i2c-tools

At this point I have a RPI device up and running.

Setup OpenCPN

  1. Rather than replicate the instructions, and to make sure that they stay up to date as new versions are released, I refer to the instructions at http://www.agurney.com/raspberry-pi/pi-chart  since that is line-for-line what I did to install OpenCPN
    • I did update config.txt for vector charts so that if I change my mind it won’t crash
    • I did update opencpn.config for MEMCacheLimit=40 NCacheLimit=10 (Must be done after running OpenCPN for the first time)
  2. Reboot
  3. Download the appropriate NOAA charts, and extract them into a directory
    • You can use Raster or Vector charts. I use raster charts as I think they look cool, and they seem to perform better on the Raspberry Pi
  4. Add the directory to the charts directory in OpenCPN, and allow them to be scanned and indexed
  5. As you zoom in and pan, more charts will be indexed and scanned. This takes a while on the RPI, but it seems to be pretty stable. Spend some time getting the most common areas in your cruising grounds stored, I simply pan, zoom, and wait until the charts are indexed. I took 3 iterations until I got all the charts indexed
  6. Install the Konni Logbook plugin from http://opencpn.org/ocpn/downloadplugins

References

Advertisements

7 Responses to Detailed Raspberry Pi Setup Documentation

  1. Guy says:

    How did you install the komi logbook, did you compile from source? If not did you use the 32 bit version? If so where does it go in linux land? Thanks!
    Guy
    🙂

    • mattkabrown says:

      That was a while ago, and all I had done was download the .so file, drop it in the plugins directory, and enable it.

      But I just tried it again, and it didn’t work. I’ll have to research it later this week. Sorry.

      If I figure out a solution I’ll post another article. 🙂

  2. Pingback: CubieTruck Chartplotter Setup | m/v C:[ESC]

  3. Pingback: OpenCPN on the Raspberry Pi 2 with AIS | m/v C:[ESC]

  4. Pingback: The Big Bash 2015 | m/v C:[ESC]

  5. Curt Brownlow says:

    I have attempted to edit my boot/config.txt and each time I get the cant open file to write message. this is using both the leaf and VI text editor.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: