From 55f8ccadec0e759f25e22734321e3fbc882d90cd Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Fri, 27 Sep 2024 14:02:34 +0200 Subject: [PATCH] bluetooth-init: start driver load service before bluetooth daemon Revert to the previous used order for the bluetooth related services. First, load the driver and then execute the bluetooth daemon. This is needed for two reasons: * The bluetooth daemon caches the MAC address. Loading the module before ensures the daemon caches the correct MAC. * The connectcore-demo server stops working if the bluetooth interface is unavailable when the server launches. This order ensures the demo works as expected. This change also brings back the problem of the btnxpuart module unload failure on reboot/suspend. The following commit adds a workaround for the driver issue. Signed-off-by: Javier Viguera --- .../bluez/bluez5-init/ccimx9/bluetooth-init.service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5-init/ccimx9/bluetooth-init.service b/meta-digi-dey/recipes-connectivity/bluez/bluez5-init/ccimx9/bluetooth-init.service index cc1b54a0f..adc369562 100644 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-init/ccimx9/bluetooth-init.service +++ b/meta-digi-dey/recipes-connectivity/bluez/bluez5-init/ccimx9/bluetooth-init.service @@ -1,7 +1,8 @@ [Unit] Description=Initialization of the IW612 bluetooth chip ConditionPathIsDirectory=/proc/device-tree/bluetooth -After=systemd-udev-settle.service bluetooth.service +After=systemd-udev-settle.service +Before=bluetooth.service [Service] Type=oneshot