From 8b08f903948c878a4327c15718d7b3d17e18d722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Danis?= Date: Fri, 23 May 2025 09:26:46 +0200 Subject: [PATCH] org.bluez.Device: Add Disconnected signal This adds Disconnected signal which can be used by clients to discover the reason of a disconnection. --- doc/org.bluez.Device.rst | 52 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/doc/org.bluez.Device.rst b/doc/org.bluez.Device.rst index 205f65761..aaa979705 100644 --- a/doc/org.bluez.Device.rst +++ b/doc/org.bluez.Device.rst @@ -155,6 +155,58 @@ array{array{byte}} GetServiceRecords() [experimental] :org.bluez.Error.NotConnected: :org.bluez.Error.DoesNotExist: +Signals +------- + +void Disconnected(string reason, string message) +```````````````````````````````````````````````` + + This signal is launched when a device is disconnected, with the reason + of the disconnection. + + This could be used by client application, depending on internal policy, + to try to reconnect to the device in case of timeout or unknown + disconnection, or to try to connect to another device. + + Possible reasons: + + :org.bluez.Reason.Unknown: + + :org.bluez.Reason.Timeout: + + Connection timeout. + + The link supervision timeout has expired for a connection or the + synchronization timeout has expired for a broadcast. + + :org.bluez.Reason.Local: + + Connection terminated by local host. + + The local device terminated the connection, terminated + synchronization with a broadcaster, or terminated broadcasting + packets. + + :org.bluez.Reason.Remote: + + Connection terminated by remote host. + + This disconnection can be due to: + - the user on the remote device either terminated the connection + or stopped broadcasting packets, + - the remote device terminated the connection because of low + resources, + - the remote device terminated the connection because the device + is about to power off. + + :org.bluez.Reason.Authentication: + + Connection terminated due to an authentication failure. + + :org.bluez.Reason.Suspend: + + Connection terminated by local host for suspend. + Properties ---------- -- 2.47.3