Skip to content

dasl-/pifi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pifi

Setting up from Scratch

Install Raspian Lite

  1. diskutil list

  2. sd_disk_num=<disk# from diskutil>

  3. diskutil unmountDisk /dev/disk$sd_disk_num

  4. download Raspberry Pi OS Lite image from https://www.raspberrypi.org/software/operating-systems/

  5. sudo dd bs=1m if=path_of_your_image.img of=/dev/rdisk$sd_disk_num; sync

  6. sudo diskutil eject /dev/rdisk$sd_disk_num

Set up Wifi

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>

Enable ssh, Connect

  1. create a file /boot/ssh to enable SSH on the raspberry pi

  2. plug in raspberry pi

  3. find its IP: sudo arp-scan --interface=en0 --localnet or sudo nmap -sS -p 22 192.168.1.0/24

  4. ssh in ssh <USER>@<IP_ADDRESS>; enter password

Setup Raspberry Pi

  1. sudo raspi-config — change password — enable SPI (interfacing options)

  2. sudo apt-get update

  3. sudo apt-get upgrade -y

  4. sudo apt-get install git

Setup Git

  1. ssh-keygen -t rsa -b 4096 -C “your@email.com

  2. eval "$(ssh-agent -s)"

  3. ssh-add ~/.ssh/id_rsa

  4. more ~/.ssh/id_rsa.pub (copy to git)

  5. https://help.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account

  6. https://github.com/settings/keys

Checkout Repo

  1. git clone git@github.com:dasl-/pifi.git

  2. cd pifi

Install

  1. Create a config file: config.json. The config file should set all of the required config parameters.

  2. ./install/install_dependencies.sh

  3. ./install/install.sh

    1. This may result in an out of memory error. If that happens, simply re-run the install script. It should succeed the second time.

  4. optional reboot to confirm services come up automatically and cleanly from a reboot: sudo shutdown -r now

  5. Check for CPU throttling

Vanity domain name (optional):

  1. After running ./install/install.sh, you can SSH onto the pi or hit the pifi webpage via pifi.local (i.e.: ssh <USER>@pifi.local and http://pifi.local ). Note: using http://pifi.local will not work on android devices.

  2. Optionally reserve an IP address for the pifi on your router (if it supports this)

  3. 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 :)

    1. 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.

Connect GPIO Pins

(pinout: https://pinout.xyz/) - power: 2 - ground: 6 - data: 19 - clock: 23

Hacking on the code:

Issues we’ve seen before

Branch rename

On 2022-04-30, we renamed the branch from master to main. Run these commands to update your local checkout:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •