feat(core): use MAC addresses in BLE menu
What changed, and why it matters
This commit updates the Bluetooth device menu on Trezor hardware wallets to display real paired-device MAC addresses instead of a hardcoded placeholder name ('Trezor Suite'). It is a UI feature change with no apparent security relevance.
No security action required; treat as a normal feature/UI commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch replaces mock paired-device data in core/src/apps/homescreen/device_menu.py with live data from the BLE subsystem: it calls ble.get_bonds() and ble.connected_addr(), formats bond addresses as MAC strings, and locates the currently connected device in the bond list. No cryptographic, pairing, or access-control logic is modified.
Changed components
core/src/apps/homescreen/device_menu.pyInspect captured patch +24 / −3
diff --git a/core/src/apps/homescreen/device_menu.py b/core/src/apps/homescreen/device_menu.py
index aa74f42a7..09411b05e 100644
--- a/core/src/apps/homescreen/device_menu.py
+++ b/core/src/apps/homescreen/device_menu.py
@@ -8,6 +8,19 @@ from trezorui_api import DeviceMenuResult
MAX_PAIRED_DEVICES = 4
+def _format_mac(ble_addr: bytes) -> str:
+ return ":".join(f"{byte:02X}" for byte in ble_addr)
+
+
+def _find_device(connected_addr: bytes | None, bonds: list[bytes]) -> int | None:
+ if connected_addr is None:
+ return None
+ for i, bond in enumerate(bonds):
+ if bond == connected_addr:
+ return i
+ return None
+
+
async def handle_device_menu() -> None:
from trezor import strings
@@ -15,9 +28,17 @@ async def handle_device_menu() -> None:
led_configurable = is_initialized and utils.USE_RGB_LED
haptic_configurable = is_initialized and utils.USE_HAPTIC
failed_backup = is_initialized and storage_device.unfinished_backup()
- # MOCK DATA
- paired_devices = ["Trezor Suite"]
- connected_idx = 0 if ble.is_connected() else None
+
+ bonds = ble.get_bonds()
+ if __debug__:
+ log.debug(__name__, "bonds: %s", bonds)
+
+ connected_addr = ble.connected_addr()
+ connected_idx = _find_device(connected_addr, bonds)
+ if __debug__:
+ log.debug(__name__, "connected: %s (%s)", connected_addr, connected_idx)
+ paired_devices = [_format_mac(bond) for bond in bonds]
+
bluetooth_version = "2.3.1.1"
# ###
firmware_version = ".".join(map(str, utils.VERSION))
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.