-
diskutil list
-
sd_disk_num=<disk# from diskutil>
-
diskutil unmountDisk /dev/disk$sd_disk_num
-
download Raspberry Pi OS Lite image from https://www.raspberrypi.org/software/operating-systems/
-
sudo dd bs=1m if=path_of_your_image.img of=/dev/rdisk$sd_disk_num; sync
-
sudo diskutil eject /dev/rdisk$sd_disk_num
country=US ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="MyWiFiNetwork" psk="MyPassword" key_mgmt=WPA-PSK }
Note: after this repo has been cloned, wifi may be set up via utils/wifi_config
:
sudo ./utils/wifi_config --network-name <name> --password <password>
-
create a file
/boot/ssh
to enable SSH on the raspberry pi -
plug in raspberry pi
-
find its IP:
sudo arp-scan --interface=en0 --localnet
orsudo nmap -sS -p 22 192.168.1.0/24
-
ssh in
ssh <USER>@<IP_ADDRESS>
; enter password
-
sudo raspi-config
— change password — enable SPI (interfacing options) -
sudo apt-get update
-
sudo apt-get upgrade -y
-
sudo apt-get install git
-
ssh-keygen -t rsa -b 4096 -C “your@email.com”
-
eval "$(ssh-agent -s)"
-
ssh-add ~/.ssh/id_rsa
-
more ~/.ssh/id_rsa.pub
(copy to git)
-
git clone git@github.com:dasl-/pifi.git
-
cd pifi
-
Create a config file:
config.json
. The config file should set all of the required config parameters. -
./install/install_dependencies.sh
-
./install/install.sh
-
This may result in an out of memory error. If that happens, simply re-run the install script. It should succeed the second time.
-
-
optional reboot to confirm services come up automatically and cleanly from a reboot:
sudo shutdown -r now
-
Check for CPU throttling
-
After running
./install/install.sh
, you can SSH onto the pi or hit the pifi webpage viapifi.local
(i.e.:ssh <USER>@pifi.local
and http://pifi.local ). Note: using http://pifi.local will not work on android devices. -
Optionally reserve an IP address for the pifi on your router (if it supports this)
-
Note if you choose 192.168.1.166 for the reserved IP, then the domain name http://pifi.club/ will resolve to your pi on your wifi network :)
-
FreshTomato router firmware has a setting
Enable DNS Rebind protection
, which is enabled by default. When this is enabled, it will prevent upstream DNS servers from resolving queries to any non-routable IP (e.g., 192.168.1.X). So you need to disable this feature for the vanity URL to work.
-
(pinout: https://pinout.xyz/) - power: 2 - ground: 6 - data: 19 - clock: 23