From 04b3fff53e7f2fb732e0b4eac0166ee609a438da Mon Sep 17 00:00:00 2001 From: Peter Steenbergen Date: Tue, 21 Jan 2020 21:06:54 +0100 Subject: [PATCH] MycroftOS: Fix BT Speaker service for the RPI onboard BT chip. RPI BT chip needs some extra work that is and can be solved with an extra service running before bluetooth.service and btspeaker.service --- buildroot-external/package/btspeaker/brcm_bt.service | 12 ++++++++++++ buildroot-external/package/btspeaker/btspeaker.mk | 6 ++++++ 2 files changed, 18 insertions(+) create mode 100644 buildroot-external/package/btspeaker/brcm_bt.service diff --git a/buildroot-external/package/btspeaker/brcm_bt.service b/buildroot-external/package/btspeaker/brcm_bt.service new file mode 100644 index 00000000..e34e9b88 --- /dev/null +++ b/buildroot-external/package/btspeaker/brcm_bt.service @@ -0,0 +1,12 @@ +[Unit] +Description=Broadcom BCM4343* bluetooth HCI +ConditionPathIsDirectory=/proc/device-tree/soc/gpio@7e200000/bt_pins +Before=bluetooth.service +Before=btspeaker.service + +[Service] +Type=simple +ExecStart=btattach -B /dev/ttyAMA0 -P bcm -S 921600 + +[Install] +WantedBy=multi-user.target diff --git a/buildroot-external/package/btspeaker/btspeaker.mk b/buildroot-external/package/btspeaker/btspeaker.mk index ff22386d..90adb264 100644 --- a/buildroot-external/package/btspeaker/btspeaker.mk +++ b/buildroot-external/package/btspeaker/btspeaker.mk @@ -14,6 +14,12 @@ define BTSPEAKER_INSTALL_TARGET_CMDS $(INSTALL) -D -m 644 $(@D)/btspeaker.service \ $(TARGET_DIR)/usr/lib/systemd/system/btspeaker.service + $(INSTALL) -D -m 644 $(@D)/brcm_bt.service.service \ + $(TARGET_DIR)/usr/lib/systemd/system/brcm_bt.service.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/brcm_bt.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/brcm_bt.service + mkdir -p $(TARGET_DIR)/etc/bluetooth $(INSTALL) -D -m 644 $(@D)/main.conf \ $(TARGET_DIR)/etc/bluetooth/main.conf