Skip to content

Commit db9f23a

Browse files
committed
BT_FW_KMD_Service: use btctl_script for controller list diagnostics
Replace plain diagnostics with btctl_script list+quit so controller listing is consistent on ramdisk/minimal images where non-interactive output can be empty. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
1 parent c3881a1 commit db9f23a

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

  • Runner/suites/Connectivity/Bluetooth/BT_FW_KMD_Service

Runner/suites/Connectivity/Bluetooth/BT_FW_KMD_Service/run.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,18 @@ else
209209
fi
210210

211211
log_info "=== bluetoothctl list (controllers) ==="
212-
bluetoothctl list 2>/dev/null || true
212+
213+
out="$(bluetoothctl list 2>/dev/null | sanitize_bt_output || true)"
214+
if printf '%s\n' "$out" | grep -qi '^[[:space:]]*Controller[[:space:]]'; then
215+
# Non-interactive worked print what we got
216+
printf '%s\n' "$out"
217+
else
218+
# Non-interactive printed no controllers → retry using interactive method
219+
log_warn "bluetoothctl list returned no controllers in non-interactive mode, retrying interactive list."
220+
221+
log_info "=== bluetoothctl list (controllers) ==="
222+
btctl_script "list" "quit" | sanitize_bt_output || true
223+
fi
213224

214225
log_info "=== lsmod (subset: BT stack) ==="
215226
lsmod 2>/dev/null | grep -E '^(bluetooth|hci_uart|btqca|btbcm|rfkill|cfg80211)\b' || true

0 commit comments

Comments
 (0)