Skip to content

Commit

Permalink
Update 30_bluetooth.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
dogi authored Feb 10, 2025
1 parent a98e462 commit 447db2e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts.d/30_bluetooth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ cat mnt/img_root/usr/local/bin/bluetooth-server.py | grep ^class

echo "Switching bluetooth device class to 0x00010c - computer"
sed -i -e 's/#Class = .*/Class = 0x00010c/g' mnt/img_root/etc/bluetooth/main.conf
sed -i -e 's/#DiscoverableTimeout = 0/DiscoverableTimeout = 0/g' mnt/img_root/etc/bluetooth/main.conf
sed -i -e 's/#JustWorksRepairing = never/JustWorksRepairing = always/g' mnt/img_root/etc/bluetooth/main.conf
sed -i -e 's/#FastConnectable = false/FastConnectable = true/g' mnt/img_root/etc/bluetooth/main.conf
echo "\n[Agent]\nDefaultAgent = true\nEnableSecurity = false" >> mnt/img_root/etc/bluetooth/main.conf
cat mnt/img_root/etc/bluetooth/main.conf

sed -i -e 's#libexec/bluetooth/bluetoothd#sbin/bluetoothd --noplugin=sap#' mnt/img_root/lib/systemd/system/bluetooth.service
sed -i -e 's#libexec/bluetooth/bluetoothd#sbin/bluetoothd#' mnt/img_root/lib/systemd/system/bluetooth.service
cat mnt/img_root/lib/systemd/system/bluetooth.service

echo "[Service]\nExecStart=\nExecStart=/usr/sbin/bluetoothd --compat" > mnt/img_root/etc/systemd/system/bluetooth.service.d/override.conf
cat mnt/img_root/etc/systemd/system/bluetooth.service.d/override.conf

0 comments on commit 447db2e

Please sign in to comment.