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
This commit is contained in:
Peter Steenbergen 2020-01-21 21:06:54 +01:00
parent 8bc3fbea37
commit 04b3fff53e
2 changed files with 18 additions and 0 deletions

View File

@ -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

View File

@ -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