This week focused on completing the Bluetooth connection flow in
ivi-homescreen, including paired-device management, discovery, pairing,
connection switching, disconnection, and device removal.
Status#
- Status: Completed
- Timeline: June 15, 2026 to June 21, 2026
Progress#
1. Paired Bluetooth Devices#
Updated the main Bluetooth page to show paired devices only. Each disconnected device is displayed with a forget icon, while the currently connected device is highlighted and includes a Disconnect button. The connection logic limits the system to one active Bluetooth device at a time.

2. Bluetooth Device Discovery#
Implemented the Scan for New Device flow. Starting a scan makes the host pairable and discoverable, starts Bluetooth discovery, and opens a dedicated page containing unpaired devices only. Devices with a resolved name show that name, while unnamed devices fall back to their Bluetooth MAC address.

Selecting a result temporarily blocks further selection and highlights the row with a Connecting... status while BlueZ starts the connection and pairing process.

3. Pairing Agent Flow#
Integrated the BlueZ pairing-agent request with the homescreen UI. When a device requires authentication, the app opens a Bluetooth Pairing Request dialog containing the device name, passkey or PIN, instructions, and Cancel and Confirm actions.

After confirmation, the device is paired, marked as trusted, connected, and added to the main Bluetooth page. The connected row is highlighted and exposes the disconnect action.

4. Connection Switching#
Added handling for incoming pair or connection requests while another device is already connected. The Switch Bluetooth Device? dialog identifies the new device and warns which active device will be disconnected.

Choosing Switch disconnects the current device, accepts the incoming request, pairs and trusts the new device when required, and then connects it. Choosing Cancel rejects the request and keeps the current device connected.

5. Disconnecting a Device#
The Disconnect button appears only on the active device row. Disconnecting keeps the device paired and returns its row to the normal paired state, allowing it to be connected again later without repeating the pairing process.

6. Forgetting a Paired Device#
Added a forget action to every paired-device row. Selecting the X icon opens a confirmation dialog before removing the device. Confirming the action first disconnects the device when necessary, removes it from BlueZ's paired devices, and removes its row from the Bluetooth page. Cancelling leaves the device and its current connection unchanged.
Next Week's Plan#
-
Code Cleanup and Merge Preparation:
- Refactor and document the homescreen Bluetooth UI views and pairing agent classes.
- Clean up the
bluez_media_nativeplugin codebase and prepare the merge requests for the upstream repository.
-
Hardware Validation on Raspberry Pi 5:
- Deploy the updated
ivi-homescreenapplication onto the Raspberry Pi 5 AGL target image. - Capture and verify D-Bus, BlueZ, and PipeWire logs during the pairing, connection, and switching sequences to ensure system stability.
- Deploy the updated
Links#
- Active Development Repository: bluez_media_native
- Issue Tracker: AGL Bluetooth Integration - BlueZ_Media Issues