Setup: software

There is now an easy interactive setup script that allows you to install this Gateway solution on a raw Raspbian image. But first let’s make sure you get the image prepared correctly.

Preparing your image manually

After you install the latest raspbian image (stretch lite recommended), the first thing you will need is enable SSH so you can remote into your Pi via SSH. This is accomplished via the sudo raspi-config command. If you have a Moteino or MightyHat attached to the GPIO serial (/dev/ttyAMA0 is the hardware GPIO serial port) then also enable hardware serial, and disable the serial console. If you have a MoteinoUSB or another USB device receiving your serial data, then you don’t need this, but you will need to change the serial-port setting once the app in installed (on the Settings page). You may also want to rename the hostname from raspberrypi to something more unique. And while here, if you want to use WiFi instead of a wired LAN connection, then set your Wifi credentials. Reboot to apply all changes.

If you have a Pi3 and you are using the GPIO serial (by default used by built-in Bluetooth) you will need to disable Bluetooth in /boot/config.txt (edit file using sudo nano /boot/config.txt). Go to the end of the file and ensure you have these lines at the end of it to disable the onboard Bluetooth and free the GPIO serial port:

enable_uart=1
dtoverlay=pi3-disable-bt

Other useful packages to install are minicom for serial debugging, samba (publishes hostname on your LAN so you can access it via hostname in your browser) and proftpd for FTP-ing into your Pi with the same credentials you use to SSH:

sudo apt-get install minicom
sudo apt-get install proftpd
sudo apt-get install samba

Install your image and configure your Pi

It’s recommended to use the Raspbian Lite image with this software. After flashing the image, run sudo raspi-config and setup your Wi-Fi, enable SSH etc.

Running the setup script

Open your Pi’s SSH/terminal and type these commands:

cd /home/pi
sudo wget https://raw.githubusercontent.com/LowPowerLab/RaspberryPi-Gateway/master/.setup/gatewaysetup.sh
sudo bash gatewaysetup.sh && sudo rm gatewaysetup.sh

This script was tested on RaspberryPi2 and 3. It installs everything required to support the Gateway and will prompt you for passwords and other input.