Loading README.md +41 −14 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ Maintainer: Jakob Moser <moser@cl.uni-heidelberg.de> 4. Use an ethernet cable to connect the Pi to your main computer - Your computer should immediately start acting as a “wired hotspot” now and provide IP address and internet access to the Pi. 5. You can now `ssh jakob@poolpaypi.local` on your main computer and it shoud Just Work™. 6. Check `/etc/ssh/sshd_config` to ensure it contains `PasswordAuthentication no`. - This should already be the case. ### NFC Reader Loading Loading @@ -53,7 +55,7 @@ Then, connect the cables to the Pi as described in this chart: 1. Open `sudo raspi-config` 2. Go to “Interface Options” 3. Go to “SPI” 4. Enable it (no reboot necessary) 4. Enable it - This will enable the first SPI bus (SPI0) 5. Add the line `dtoverlay=spi1-1cs,cs0_pin=16` somewhere in `/boot/firmware/config.txt` (reboot might be necessary here) - This will enable the second SPI bus (SPI1). Furthermore, it will set the Chip Select pin for device 0 (`cs0`) to GPIO 16. Loading Loading @@ -128,7 +130,7 @@ Then, connect the cables to the Pi as described in this chart: ### Display 1. Connect the display by placing it on the GPIO header 2. Append the following line to `/boot/firmware/config.txt` 2. Add the following line to `/boot/firmware/config.txt` ```ini dtoverlay=fbtft,spi0-0,ili9486,width=320,height=480,regwidth=16,reset_pin=25,dc_pin=24,rotate=270 Loading @@ -154,37 +156,62 @@ Then, connect the cables to the Pi as described in this chart: Install dependencies: ```bash sudo apt install cryptsetup sudo apt install -y cryptsetup git ``` Create a user account called `poolpay`. Equip it with the necessary permissions: Create a user account called `poolpay` (with a secure, auto-generated password), make sure it can access GPIO: - Allow `poolpay` to access GPIO - Allow `poolpay` to use `sudo` **to use `luks`** (don't give it general sudo access)! ```bash sudo adduser poolpay sudo usermod -a -G gpio poolpay ``` Give it the permission to use `sudo` without an additional password prompt (`sudo nano /etc/sudoers.d/010_poolpay-nopasswd`): Create a folder `/coli`, cd into it and make sure the permissions are correct. ``` poolpay ALL=(ALL) NOPASSWD: ALL ``` Clone the repository (you can use a Project Access Token for that, Settings → Access Tokens) and cd into it. Create a folder `/coli`, and adjust the permission to `jakob`: ```bash sudo mkdir /coli sudo chown jakob:jakob /coli cd /coli ``` Clone the repository and set everything up: ```bash git clone https://gitlab.cl.uni-heidelberg.de/moser/poolpay.git cd /coli/poolpay python3 -m venv venv source venv/bin/activate pip install -r requirements.txt pip uninstall rpi-gpio # We want to use rpi-lgpio instead ``` You can then, for example, run the card interfacing tool using: As last step, deploy the systemd unit: ```bash python3 -m poolpay.card id sudo cp /coli/poolpay/poolpay.service /etc/systemd/system sudo systemctl enable poolpay ``` As last step, deploy the systemd unit: Reboot. The application should start automatically. You now need to provide it with a password to create (or, at later starts, unlock) the vault: ```bash sudo cp /coli/poolpay/poolpay.service /etc/systemd/system sudo systemctl enable --now poolpay sudo su poolpay cd /coli/poolpay source venv/bin/activate python3 -m poolpay.admin unlock ``` You could also, for example, run the card interfacing tool: ```bash python3 -m poolpay.card id ``` ## License Loading Loading
README.md +41 −14 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ Maintainer: Jakob Moser <moser@cl.uni-heidelberg.de> 4. Use an ethernet cable to connect the Pi to your main computer - Your computer should immediately start acting as a “wired hotspot” now and provide IP address and internet access to the Pi. 5. You can now `ssh jakob@poolpaypi.local` on your main computer and it shoud Just Work™. 6. Check `/etc/ssh/sshd_config` to ensure it contains `PasswordAuthentication no`. - This should already be the case. ### NFC Reader Loading Loading @@ -53,7 +55,7 @@ Then, connect the cables to the Pi as described in this chart: 1. Open `sudo raspi-config` 2. Go to “Interface Options” 3. Go to “SPI” 4. Enable it (no reboot necessary) 4. Enable it - This will enable the first SPI bus (SPI0) 5. Add the line `dtoverlay=spi1-1cs,cs0_pin=16` somewhere in `/boot/firmware/config.txt` (reboot might be necessary here) - This will enable the second SPI bus (SPI1). Furthermore, it will set the Chip Select pin for device 0 (`cs0`) to GPIO 16. Loading Loading @@ -128,7 +130,7 @@ Then, connect the cables to the Pi as described in this chart: ### Display 1. Connect the display by placing it on the GPIO header 2. Append the following line to `/boot/firmware/config.txt` 2. Add the following line to `/boot/firmware/config.txt` ```ini dtoverlay=fbtft,spi0-0,ili9486,width=320,height=480,regwidth=16,reset_pin=25,dc_pin=24,rotate=270 Loading @@ -154,37 +156,62 @@ Then, connect the cables to the Pi as described in this chart: Install dependencies: ```bash sudo apt install cryptsetup sudo apt install -y cryptsetup git ``` Create a user account called `poolpay`. Equip it with the necessary permissions: Create a user account called `poolpay` (with a secure, auto-generated password), make sure it can access GPIO: - Allow `poolpay` to access GPIO - Allow `poolpay` to use `sudo` **to use `luks`** (don't give it general sudo access)! ```bash sudo adduser poolpay sudo usermod -a -G gpio poolpay ``` Give it the permission to use `sudo` without an additional password prompt (`sudo nano /etc/sudoers.d/010_poolpay-nopasswd`): Create a folder `/coli`, cd into it and make sure the permissions are correct. ``` poolpay ALL=(ALL) NOPASSWD: ALL ``` Clone the repository (you can use a Project Access Token for that, Settings → Access Tokens) and cd into it. Create a folder `/coli`, and adjust the permission to `jakob`: ```bash sudo mkdir /coli sudo chown jakob:jakob /coli cd /coli ``` Clone the repository and set everything up: ```bash git clone https://gitlab.cl.uni-heidelberg.de/moser/poolpay.git cd /coli/poolpay python3 -m venv venv source venv/bin/activate pip install -r requirements.txt pip uninstall rpi-gpio # We want to use rpi-lgpio instead ``` You can then, for example, run the card interfacing tool using: As last step, deploy the systemd unit: ```bash python3 -m poolpay.card id sudo cp /coli/poolpay/poolpay.service /etc/systemd/system sudo systemctl enable poolpay ``` As last step, deploy the systemd unit: Reboot. The application should start automatically. You now need to provide it with a password to create (or, at later starts, unlock) the vault: ```bash sudo cp /coli/poolpay/poolpay.service /etc/systemd/system sudo systemctl enable --now poolpay sudo su poolpay cd /coli/poolpay source venv/bin/activate python3 -m poolpay.admin unlock ``` You could also, for example, run the card interfacing tool: ```bash python3 -m poolpay.card id ``` ## License Loading