From f8c09124a4a54808776d49ad17e11ad4bc0ba455 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Tue, 30 Dec 2025 22:00:43 +0000 Subject: [PATCH] feat: Set agent capability to NoInputNoOutput and define service UUIDs --- main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index a91dbd4..29687ff 100644 --- a/main.py +++ b/main.py @@ -28,7 +28,9 @@ AGENT_IFACE = 'org.bluez.Agent1' AGENT_MANAGER_IFACE = 'org.bluez.AgentManager1' AGENT_PATH = '/io/bluetooth_speaker/agent' CAPABILITY = 'DisplayYesNo' -HFP_UUID = '0000111e-0000-1000-8000-00805f9b34fb' +CAPABILITY = 'NoInputNoOutput' +CALLS_SERVICE_UUID = '0000111e-0000-1000-8000-00805f9b34fb' +AUDIO_SERVICE_UUID = '0000110d-0000-1000-8000-00805f9b34fb' class Agent(ServiceInterface): def __init__(self, interface_name): @@ -72,7 +74,7 @@ class Agent(ServiceInterface): @method() def AuthorizeService(self, device: 'o', uuid: 's'): logging.info(f"AuthorizeService request for device {device} with UUID {uuid}") - if uuid.lower() == HFP_UUID: + if uuid.lower() == CALLS_SERVICE_UUID: logging.warning("Rejecting Hands-Free Profile (HFP) connection.") raise DBusError('org.bluez.Error.Rejected', 'HFP profile not supported') logging.info(f"Authorizing service UUID {uuid}")