Skip to content

Conversation

smuppand
Copy link
Contributor

This PR introduces a fully modular and Bluetooth scan and pairing test named BT_SCAN_PAIR for embedded Linux platforms using BlueZ. Key features include:

  • Modular structure with helper functions in functestlib.sh

  • Supports device identification via arguments, environment, or bt_device_list.txt

  • Optional whitelist filtering for MAC address or device name

  • Automatic retries for pairing in case of busy/in-progress errors

  • Expect-based automation for interactive pairing via bluetoothctl

  • Comprehensive cleanup using trap, ensures unpairing and resource cleanup after test (PASS/FAIL/SKIP)

  • Logs captured: scan.log, pair.log, and summary for debugging

@smuppand smuppand force-pushed the bluetooth branch 3 times, most recently from d389887 to 18d264d Compare June 30, 2025 09:36
- Renamed existing Bluetooth validation script to bt_on_off for clarity
- Added new BT_SCAN_PAIR test:
  - Supports dynamic BT device name input
  - Uses bluetoothctl and expect for pairing flow
  - Includes retry logic for hci0 up, scan, and pairing steps
  - Performs full scan-pair-cleanup lifecycle
  - Logs all intermediate steps for better CI debugging
  - Compatible with POSIX and ShellCheck guidelines

Resolves issues in earlier pairing logic and supports robust CI execution with dynamic device handling.

Signed-off-by: Srikanth Muppandam <[email protected]>
Copy link
Contributor

@vnarapar vnarapar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vnarapar vnarapar merged commit 5baf561 into qualcomm-linux:main Jul 10, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants