From 756a48c08083cf4d510ca7cfb6981133ff8464f5 Mon Sep 17 00:00:00 2001 From: Patrick Yavitz Date: Sat, 2 Aug 2025 09:23:30 -0400 Subject: [PATCH] Add AIC8800 Bluetooth Service and Script Signed-off-by: Patrick Yavitz --- packages/bsp/aic8800/aic-bluetooth | 15 +++++++++++++++ packages/bsp/aic8800/aic-bluetooth.service | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 packages/bsp/aic8800/aic-bluetooth create mode 100644 packages/bsp/aic8800/aic-bluetooth.service diff --git a/packages/bsp/aic8800/aic-bluetooth b/packages/bsp/aic8800/aic-bluetooth new file mode 100755 index 000000000..12b310691 --- /dev/null +++ b/packages/bsp/aic8800/aic-bluetooth @@ -0,0 +1,15 @@ +#!/bin/bash + +# HW Reset +hciattach -r -s 1500000 /dev/ttyS1 any 1500000 flow nosleep > /dev/null 2>&1 + +# Kill hciattach +sleep .50 +killall hciattach + +# Attach Bluetooth HCI UART +sleep .50 +hciattach -s 1500000 /dev/ttyS1 any 1500000 flow nosleep > /dev/null 2>&1 +rfkill unblock all + +exit 0 diff --git a/packages/bsp/aic8800/aic-bluetooth.service b/packages/bsp/aic8800/aic-bluetooth.service new file mode 100644 index 000000000..56e508d0b --- /dev/null +++ b/packages/bsp/aic8800/aic-bluetooth.service @@ -0,0 +1,13 @@ +[Unit] +Description=AIC8800 Bluetooth +After=bluetooth.service bluetooth.target +Requires=bluetooth.service bluetooth.target + +[Service] +Type=idle +ExecStartPre=/usr/sbin/rfkill unblock all +ExecStart=/usr/bin/aic-bluetooth +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target