SmartFox: launcher, Siri Remote driver, Debian image and installer
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
25
tools/siri-remote/setup-host-2.sh
Normal file
25
tools/siri-remote/setup-host-2.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
# Second root step: let sf-remote own the Siri Remote's HID service.
|
||||
# BlueZ's HID (HoG) plugin drops the remote's vendor reports, so we disable it
|
||||
# and sf-remote reads the GATT characteristics itself over D-Bus.
|
||||
# Run: sudo bash setup-host-2.sh
|
||||
set -euo pipefail
|
||||
|
||||
if command -v dnf >/dev/null; then
|
||||
dnf install -y dbus-devel pkgconf-pkg-config
|
||||
elif command -v apt-get >/dev/null; then
|
||||
apt-get install -y libdbus-1-dev pkg-config
|
||||
fi
|
||||
|
||||
BTD=$(systemctl cat bluetooth | sed -n 's/^ExecStart=\(\/[^ ]*bluetoothd\).*/\1/p' | head -1)
|
||||
mkdir -p /etc/systemd/system/bluetooth.service.d
|
||||
cat >/etc/systemd/system/bluetooth.service.d/smartfox.conf <<EOF
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=$BTD --noplugin=input,hog
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
systemctl restart bluetooth
|
||||
sleep 2
|
||||
systemctl --no-pager status bluetooth | head -5
|
||||
echo "== done (undo: rm /etc/systemd/system/bluetooth.service.d/smartfox.conf && systemctl daemon-reload && systemctl restart bluetooth)"
|
||||
Reference in New Issue
Block a user