From 6f8926e80ec06f3cf8fe5226016cee3faa22845d Mon Sep 17 00:00:00 2001 From: "Peter A. Bigot" Date: Sun, 6 May 2018 14:13:30 -0500 Subject: bluez5: fix issues with systemd script Type=simple is wrong: it allows bluetooth.service to start before the uart is configured, resulting in hci0 command tx timeout errors. Type=oneshot blocks follow-up units until the ExecStart completes. Add RemainAfterExit since system state has changed as a result of the unit. Also add a BindsTo for the device that we're going to use. Signed-off-by: Peter A. Bigot --- recipes-connectivity/bluez5/bluez5/brcm43438.service | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'recipes-connectivity') diff --git a/recipes-connectivity/bluez5/bluez5/brcm43438.service b/recipes-connectivity/bluez5/bluez5/brcm43438.service index 9a607bc..df699a4 100644 --- a/recipes-connectivity/bluez5/bluez5/brcm43438.service +++ b/recipes-connectivity/bluez5/bluez5/brcm43438.service @@ -2,10 +2,12 @@ Description=Broadcom BCM43438 bluetooth HCI ConditionPathIsDirectory=/proc/device-tree/soc/gpio@7e200000/bt_pins Before=bluetooth.service +BindsTo=dev-serial1.device After=dev-serial1.device [Service] -Type=simple +Type=oneshot +RemainAfterExit=yes ExecStart=/usr/bin/hciattach -n /dev/serial1 bcm43xx 921600 noflow - [Install] -- cgit v1.2.3-54-g00ecf