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 <pab@pabigot.com>
This commit is contained in:
Peter A. Bigot 2018-05-06 14:13:30 -05:00 committed by Andrei Gherzan
parent df53ac131a
commit 6f8926e80e

View File

@ -2,10 +2,12 @@
Description=Broadcom BCM43438 bluetooth HCI Description=Broadcom BCM43438 bluetooth HCI
ConditionPathIsDirectory=/proc/device-tree/soc/gpio@7e200000/bt_pins ConditionPathIsDirectory=/proc/device-tree/soc/gpio@7e200000/bt_pins
Before=bluetooth.service Before=bluetooth.service
BindsTo=dev-serial1.device
After=dev-serial1.device After=dev-serial1.device
[Service] [Service]
Type=simple Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/hciattach -n /dev/serial1 bcm43xx 921600 noflow - ExecStart=/usr/bin/hciattach -n /dev/serial1 bcm43xx 921600 noflow -
[Install] [Install]