4 Commits

Author SHA1 Message Date
8d2467cdbc fix spacing and spelling 2023-10-09 19:20:00 -05:00
312fbe78b0 move cron install to boot config script 2023-10-09 19:08:41 -05:00
e146811553 update reboot step 2023-10-08 22:42:18 -05:00
587c75ceb0 Add script to configure boot 2023-10-08 22:41:25 -05:00
2 changed files with 39 additions and 64 deletions

25
03_update_boot_config.sh Normal file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
# Disable onboard audio
sudo sed -i 's/dtparam=audio.*/dtparam=audio=off/g' /boot/config.txt
# Disable onboard bluetooth
echo "dtoverlay=disable-bt" | sudo tee -a /boot/config.txt
# Increase default temperature limit from 60C to 70C
echo "temp_soft_limit=70" | sudo tee -a /boot/config.txt
# Isolate (remove) CPU core 3 from kernel process scheduler
#? Is this just to run a little cooler?
sudo sed -i '$ s/$/ isolcpus=3/' /boot/cmdline.txt
# Enable ssh server on boot
sudo touch /boot/ssh.txt
# Disable hdmi output
sudo sed -i 's/exit 0//g' /etc/rc.local
echo "/usr/bin/tvservice -o" | sudo tee -a /etc/rc.local
echo "exit 0" | sudo tee -a /etc/rc.local
# Run startup script at reboot; Register to cron for pi user
echo "@reboot sudo -E bash $HOME/fintic/startup.sh &" | sudo tee -a /var/spool/cron/pi

View File

@@ -14,67 +14,20 @@
1. Enter the repo: `cd fintic` 1. Enter the repo: `cd fintic`
1. Install Packages: `bash 01_setup_packages.sh` 1. Install Packages: `bash 01_setup_packages.sh`
1. Install Python dependencies: `bash 02_setup_python.sh` 1. Install Python dependencies: `bash 02_setup_python.sh`
1. Configure boot configuration: `bash 03_update_boot_config.sh`
1. Reboot the pi: `sudo reboot now`
Now to turn off the audio circuit open the config file with
```console
sudo nano /boot/config.txt
```
look for the dtparam=audio option and turn it to off, the line should look like this. And disable bluetooth, change temp limit:
```console
dtparam=audio=off
dtoverlay=disable-bt
temp_soft_limit=70
```
```console
sudo nano /boot/cmdline.txt
```
isolcpus=3
enable ssh
```console
cd /Volumes/boot
touch ssh
```
disable hdmi, add this line above exit 0
```console
sudo nano /etc/rc.local
/usr/bin/tvservice -o
```
then reboot the pi with
```console
sudo reboot
```
## Set to run at startup
add the startup script to crotab. Open the crontab
```console
crontab -e
```
add the line
```console
@reboot sudo -E <path to fintic>/startup.sh &
```
dont forget the ampersand!
also make sure that the paths in startup.sh are correct for your install location
## Install the hotspot ## Install the hotspot
```console
```shell
cd ~ cd ~
curl "https://www.raspberryconnect.com/images/hsinstaller/AutoHotspot-Setup.tar.gz" -o AutoHotspot-Setup.tar.gz curl "https://www.raspberryconnect.com/images/hsinstaller/AutoHotspot-Setup.tar.gz" -o AutoHotspot-Setup.tar.gz
tar -xzvf AutoHotspot-Setup.tar.gz tar -xzvf AutoHotspot-Setup.tar.gz
cd Autohotspot cd Autohotspot
sudo ./autohotspot-setup.sh sudo ./autohotspot-setup.sh
``` ```
Choose option 2, then option 7 to change the SSID and password (for some reason it didnt work with the default SSID and password).
Choose option 2, then option 7 to change the SSID and password (for some reason it didn't work with the default SSID and password).
Then you can connect to the network and go to http://fintic.local:1024 or http://10.0.0.5:1024 and enter wifi information, then reboot Then you can connect to the network and go to http://fintic.local:1024 or http://10.0.0.5:1024 and enter wifi information, then reboot
@@ -82,29 +35,26 @@ Then you can connect to the network and go to http://fintic.local:1024 or http:/
## Change the hostname ## Change the hostname
To change the hostname (URL used to access the server) first open config To change the hostname (URL used to access the server) first open config
```console ```console
sudo raspi-config sudo raspi-config
``` ```
Then go to system options -> hostname and change it to e.g. fintic Then go to system options -> hostname and change it to e.g. fintic
You then connect to the server using the url fintic.local:1024 You then connect to the server using the url fintic.local:1024
## Run instructions ## Run instructions
```console ```console
sudo -E python3 server.py sudo -E python3 server.py
``` ```
in browser go to url http://raspberrypi.local:1024 in browser go to url http://raspberrypi.local:1024
If it doesnt work because of a missing package try running setup.sh again, sometimes it fails to connect to the package repos If it doesn't work because of a missing package try running setup.sh again, sometimes it fails to connect to the package repos
## Notes ## Notes
To convert bdf font to pil format do `pilfont.py <font filename>`
To conver bdf font to pil format do pilfont.py <font filename> pillow v 5.4.1 works, but version 8.2.0 breaks.
pillow v 5.4.1 works, but version 8.2.0 breaks.