From 5451a0f4bc90f133ae5824ab2cd042e694bafb26 Mon Sep 17 00:00:00 2001 From: Isaac Hermida Date: Tue, 29 Oct 2024 15:52:45 +0100 Subject: [PATCH] bluetooth-init: ccimx6ul: validate FW was correctly loaded Sporadically, the BT FW is uploaded but the interface is not functional as it is not up and its entries are not populated. Validate the FW was correctly set, if not, rely on the retry mechanism. https://onedigi.atlassian.net/browse/DEL-9006 Signed-off-by: Isaac Hermida --- .../bluez/bluez5-init/ccimx6ul/bluetooth-init | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5-init/ccimx6ul/bluetooth-init b/meta-digi-dey/recipes-connectivity/bluez/bluez5-init/ccimx6ul/bluetooth-init index 87b0e561b..515233092 100644 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-init/ccimx6ul/bluetooth-init +++ b/meta-digi-dey/recipes-connectivity/bluez/bluez5-init/ccimx6ul/bluetooth-init @@ -70,7 +70,10 @@ bluetooth_init() { if hciattach ttyBt qca ${BT_RATE:-3000000} -t30 ${BT_FLOW:-flow} unused ${BT_MACADDR} >${HCIATTACH_LOG} 2>&1; then # hciattach performs a reset to load the new firmware and needs some time to be ready sleep 1 - return + # Validate that FW was correcly loaded by checking if file exists + if [ -f "/sys/kernel/debug/bluetooth/hci0/features" ]; then + return + fi fi sleep 1