- Download Raspbian Stretch Lite Image
- Flash image to micro sd card with Balena Etcher and insert into raspberry pi
- Connect raspberry pi to monitor and keyboard then power on
- Login to the raspberry pi with
username: pi
andpassword: raspberry
- Change the password to something more secure
passwd # default password is raspberry --> for non-secure images just use `openag12`
- Enable the ssh and i2c interface then set keyboard layout
sudo raspi-config
# To enable SSH:
# Select Option 5: Interfacing Options --> P2: SSH --> Enabled? Yes --> OK
#
# To enable I2C
# Select Option 5: Interfacing Options --> P5: I2C --> Enabled? Yes --> OK
#
# To set keyboard layout
# Select Option 4: Localisation Options --> I3: Change Keyboard Layout --> OK --> Other (If not in UK) --> English (US) --> OK
- Set wifi network credentials
nano /etc/wpa_supplicant/wpa_supplicant.conf
# Add to the bottom of the file:
network={
ssid="<wifi-ssid>"
psk="<wifi-password>"
}
Example:
<wifi-ssid> = HomeNetwork1
<wifi-ssid> = password1
- Reboot the system
sudo reboot
- Take note of your raspberry pi ip address from line that says
My IP address is <ip-address>
- Login to raspberry pi via ssh from your laptop
# Make sure your laptop is on the same network as your raspberry pi
ssh pi@<ip-address> # password: openag12
# If you didn't make a note of your ip address you can get it by runnning: ifconfig
- Install git
sudo apt-get install git -y
- Install remote sublime for easy remote text editing
sudo wget -O /usr/local/bin/subl https://raw.github.com/aurora/rmate/master/rmate && sudo chmod +x /usr/local/bin/subl
- Clone project repository
cd ~
git clone https://github.com/OpenAgInitiative/openag-device-software.git
- Install the software in preferred runtime mode
cd ~/openag-device-software
sudo -H -u pi ./install.sh --<runtime-mode> # either --development or --production
- Verify the install
ps aux | grep autossh # for both production and development
ps aux | grep python # for production only
./run.sh # for development only