Reef-pi setup notes
Notes on getting the reef-pi software setup initially.
The Reef-pi project.
Basic setup of raspbian
Using Buster lite pre-installed SD card.
Enable SSH
Create a file called ssh in the boot partition. No content required.
Enable WiFi
Create a file in the boot partition of the SD card called wpa_supplicant.conf
with the following content:
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
scan_ssid=1
ssid="wifi_network"
psk="wifi_password"
}
This info will automatically be copied to /etc/spa_supplicant on boot.
Find the pi on the network
Insert the SD card into the PI, and plug it in. Wait a few moments, and then
look for the device on the network with arp -n -a (or looking at list of
clients in access point interface). The Pi will have a MAC address beginning
with b8:27 or b8:28 (probably?). It should also have a client identifier of
raspberrypi. It may be accessible via ssh pi@raspberrypi, otherwise use
ssh pi@<ip address>. The default password is raspberry. That password
should be immediately changed with the passwd command.
Update software
sudo apt update
sudo apt upgrade
Set the correct timezone
(instead of below method, can be done from raspi-config)
- Use
timedatectl list-timezonesto show all options, and find the desired option. Copy it exactly. (use 'q' to exit the list) - Use
sudo timedatectl set-timezone America/New_York, except change 'America/New_York' to the desired timezone code.
Further configuration
Run the raspi-config command to configure the device further as desired (run
as root with sudo).
Set Static IP address (optional)
This doesn't appear to be possible via raspi-config. Follow normal debian procedures.
Reef Pi required raspbian settings
Reef-pi guide on AdaFruit: https://learn.adafruit.com/reef-pi-installation-and-configuration/raspberry-pi-configuration
Enable network time
sudo systemctl start systemd-timesyncd
sudo systemctl enable systemd-timesyncd
Enable hardware timers
Edit /boot/config.txt, add the following line:
dtoverlay=pwm-2chan
(requires a reboot)
Enable I2C and 1-wire
(This can instead be done from the raspi-config 'Interfacing Options' selection)
run sudo raspi-config
select Interfacing Options
select I2C, and select Yes
Re-navigate to interfacing options, select 1-wire, and select Yes
Enable UART
Add the following line to the end of /boot/config.txt:
enable_uart=1
Disable SPI
Will allow using the SPI pins as additional GPIO. Can be done from the raspi-config utility
run sudo raspi-config
select Interfacing Options
select SPI, and then select No.
Install Reef-pi
- Go to https://github.com/reef-pi/reef-pi/releases, copy link to latest relevant release (i.e.- https://github.com/reef-pi/reef-pi/releases/download/4.0/reef-pi-4.0-pi0.deb). Be sure to get the correct .deb for the specific pi.
- From pi, download with wget:
wget https://github.com/reef-pi/reef-pi/releases/download/4.0/reef-pi-4.0-pi0.deb - Install with dpkg:
sudo dpkg -i reef-pi-4.0-pi0.debPackage name will be different for different releases. - Ensure service is running with
systemctl status reef-pi. If it's not, start it withsudo systemctl start reef-pi
Should now be able to reach reef-pi via http on port 80.
The default username and password are both 'reef-pi'.