From d46ee840b026f07f3cb64471433e3955a3e0c9f2 Mon Sep 17 00:00:00 2001 From: torlando-tech Date: Wed, 29 Oct 2025 00:23:33 -0400 Subject: [PATCH] fix: add automatic rfkill unblocking to installer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automatically detect and unblock soft-blocked Bluetooth adapters during installation, preventing "Failed to set power on" errors on Raspberry Pi and other systems where rfkill may block the adapter by default. Changes: - Add rfkill soft-block detection in install.sh Step 5B - Automatically run 'sudo rfkill unblock bluetooth' when needed - Verify unblock succeeded before attempting power-on - Provide clear feedback during unblock process Fixes the root cause of power-on failures when adapter is soft-blocked, which was discovered during testing on Raspberry Pi Zero 2 W. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- install.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/install.sh b/install.sh index 3ebf450..e5563db 100755 --- a/install.sh +++ b/install.sh @@ -624,6 +624,24 @@ print_header "Bluetooth Adapter Power State" if command -v bluetoothctl &> /dev/null; then print_info "Checking Bluetooth adapter power state..." + # Check for rfkill blocks first (must be unblocked before power-on works) + if command -v rfkill &> /dev/null; then + if rfkill list bluetooth | grep -q "Soft blocked: yes"; then + print_warning "Bluetooth adapter is soft-blocked by rfkill" + print_info "Unblocking Bluetooth adapter..." + sudo rfkill unblock bluetooth + sleep 1 + + # Verify unblock succeeded + if rfkill list bluetooth | grep -q "Soft blocked: yes"; then + print_error "Failed to unblock Bluetooth adapter" + print_warning "You may need to check hardware switch or BIOS settings" + else + print_success "Bluetooth adapter unblocked successfully" + fi + fi + fi + # Check if adapter is powered if bluetoothctl show | grep -q "Powered: yes"; then print_success "Bluetooth adapter is powered on"