From f9a330c84083c08668390610dd6c29ad1a1091d6 Mon Sep 17 00:00:00 2001 From: Craig Schardt Date: Thu, 2 Jan 2025 21:27:20 -0600 Subject: [PATCH 1/2] don't remove bluetooth --- install_opi5.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install_opi5.sh b/install_opi5.sh index 3b39277..5c7a183 100755 --- a/install_opi5.sh +++ b/install_opi5.sh @@ -25,7 +25,7 @@ apt-get purge --yes --quiet lxd-installer lxd-agent-loader apt-get purge --yes --quiet snapd # remove bluetooth daemon -apt-get purge --yes --quiet bluez +# apt-get purge --yes --quiet bluez apt-get --yes --quiet autoremove @@ -65,7 +65,8 @@ cat /etc/systemd/system/photonvision.service systemctl disable systemd-networkd-wait-online.service # the bluetooth service isn't needed and causes a delay at boot -systemctl disable ap6275p-bluetooth.service +# systemctl disable ap6275p-bluetooth.service +# systemctl disable ap6256s-bluetooth.service rm -rf /var/lib/apt/lists/* apt-get --yes --quiet clean From 3750f3da3f2eea6e1e66322bee17d82841dcb8ae Mon Sep 17 00:00:00 2001 From: Craig Schardt Date: Thu, 2 Jan 2025 23:29:20 -0600 Subject: [PATCH 2/2] find and mask any bluetooth service --- install_opi5.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/install_opi5.sh b/install_opi5.sh index 5c7a183..0b5280e 100755 --- a/install_opi5.sh +++ b/install_opi5.sh @@ -25,7 +25,7 @@ apt-get purge --yes --quiet lxd-installer lxd-agent-loader apt-get purge --yes --quiet snapd # remove bluetooth daemon -# apt-get purge --yes --quiet bluez +apt-get purge --yes --quiet bluez apt-get --yes --quiet autoremove @@ -64,9 +64,18 @@ cat /etc/systemd/system/photonvision.service # networkd isn't being used, this causes an unnecessary delay systemctl disable systemd-networkd-wait-online.service -# the bluetooth service isn't needed and causes a delay at boot -# systemctl disable ap6275p-bluetooth.service -# systemctl disable ap6256s-bluetooth.service +# the bluetooth service isn't needed and causes problems with cloud-init +# the chip has different names on different boards. Examples are: +# OrangePi5: ap6275p-bluetooth.service +# OrangePi5pro: ap6256s-bluetooth.service +# OrangePi5b: ap6275p-bluetooth.service +# OrangePi5max: ap6611s-bluetooth.service +# instead of keeping a catalog of these services, find them based on a pattern and mask them +btservices=$(systemctl list-unit-files *bluetooth.service | tail -n +2 | head -n -1 | awk '{print $1}') +for btservice in $btservices; do + echo "Masking: $btservice" + systemctl mask "$btservice" +done rm -rf /var/lib/apt/lists/* apt-get --yes --quiet clean