Skip to content

Update install script for OS compatibility and improvements - #188

Open
PoRiFiRo123 wants to merge 1 commit into
nicokaiser:mainfrom
PoRiFiRo123:main
Open

PoRiFiRo123 wants to merge 1 commit into
nicokaiser:mainfrom
PoRiFiRo123:main

Conversation

@PoRiFiRo123

Copy link
Copy Markdown

Raspberry Pi Audio Receiver Script - Updates

Version Information

Component Original Updated
Supported OS Debian 12 only Debian 12 & 13
Shairport Sync 4.3.2 4.3.5

Critical Compatibility Updates

1. OS Support Extended to Debian 13

# Added support for VERSION_ID "13" alongside "12"
if [[ ! ("$VERSION_ID" == "12" || "$VERSION_ID" == "13") ]]; then

Why: Enables script to run on Debian 13 (Trixie)

2. Hostname Configuration Fallback

if command -v raspi-config &> /dev/null; then
    sudo raspi-config nonint do_hostname ${HOSTNAME}
else
    # Manual hostname configuration for pure Debian
    echo "$NEW_HOSTNAME" | sudo tee /etc/hostname > /dev/null
fi

Why: Pure Debian doesn't include raspi-config

3. Bluetooth Configuration Enhanced

Added to /etc/bluetooth/main.conf:

  • PairableTimeout = 0 - Always pairable
  • Name = Raspberry Pi - Default name

4. Bluetooth Agent Timing Fixed

Added to systemd service:

ExecStartPre=/bin/sleep 2
ExecStartPre=/usr/bin/bluetoothctl power on
ExecStartPre=/usr/bin/bluetoothctl pairable on

Why: Debian 13 needs explicit initialization and timing delay

5. Bluetooth Unblocking

sudo rfkill unblock bluetooth

Why: Prevents soft-block issues on Debian 13

6. GPIO Group Check

if getent group gpio > /dev/null 2>&1; then
    sudo usermod -a -G gpio shairport-sync
fi

Why: Prevents failure on systems without gpio group


New Features Added

1. Audio Output Configuration

Interactive menu to select:

  • Auto (system default)
  • Headphone jack (3.5mm)
  • HDMI

Purpose: Essential for Bluetooth speaker setup requiring 3.5mm output

2. Enhanced User Feedback

Added progress messages:

  • "Installing Bluetooth Audio packages..."
  • "Building ALAC..."
  • "Building NQPTP..."
  • "Building Shairport Sync..."

3. Installation Summary

Final summary screen showing:

  • Completion status
  • Reboot instructions
  • Device name for Bluetooth discovery

Troubleshooting

Bluetooth not discoverable:

sudo systemctl status bt-agent@hci0.service
sudo rfkill list
bluetoothctl show

No audio output:

amixer
speaker-test -t wav -c 2

Updated supported OS versions and improved Bluetooth installation steps for compatibility with Debian 13. Enhanced error handling and configuration for audio output and Shairport Sync installation.
Comment thread install.sh

sudo apt update
sudo apt install -y --no-install-recommends wget unzip autoconf automake build-essential libtool git autoconf automake libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev libgcrypt20-dev xxd
sudo apt install -y --no-install-recommends wget unzip autoconf automake build-essential libtool git libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev libgcrypt20-dev xxd

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to include systemd-dev as well like in #187. When testing on a fresh install of RaspiOS Lite 13 this fails due to this missing dependency during the make process.

@nicokaiser

Copy link
Copy Markdown
Owner

Thanks for this PR. I will have a look at it in detail soon. However I would like to keep this project as slim as possible: so it will only support Raspberry Pi OS in only one version (13). Making it work on other systems (like Raspberry Pi OS Legacy (based on Debian 12) or Debian) should be trivial, but will not be covered by this script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants