public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: "Frédéric Danis" <frederic.danis@collabora.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v4 3/4] doc/device: Add Disconnected signal
Date: Fri, 23 May 2025 09:26:46 +0200	[thread overview]
Message-ID: <20250523072647.689324-4-frederic.danis@collabora.com> (raw)
In-Reply-To: <20250523072647.689324-1-frederic.danis@collabora.com>

---
v1->v2: Replace text reason by numerical reason
	Improve documentation
v2->v3: Replace numerical reason by name and message

 doc/org.bluez.Device.rst | 41 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/doc/org.bluez.Device.rst b/doc/org.bluez.Device.rst
index 205f65761..39e51f79c 100644
--- a/doc/org.bluez.Device.rst
+++ b/doc/org.bluez.Device.rst
@@ -155,6 +155,47 @@ array{array{byte}} GetServiceRecords() [experimental]
 	:org.bluez.Error.NotConnected:
 	:org.bluez.Error.DoesNotExist:
 
+Signals
+-------
+
+void Disconnected(string name, 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:
+
+		The link supervision timeout has expired for a connection or the
+		synchronization timeout has expired for a broadcast.
+
+	:org.bluez.Reason.Local:
+
+		The local device terminated the connection, terminated synchronization
+		with a broadcaster, or terminated broadcasting packets.
+
+	:org.bluez.Reason.Remote:
+
+		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:
+
+	:org.bluez.Reason.LocalSuspend:
+
 Properties
 ----------
 
-- 
2.43.0


  parent reply	other threads:[~2025-05-23  7:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-23  7:26 [PATCH BlueZ v4 0/4] Propagate disconnection reason Frédéric Danis
2025-05-23  7:26 ` [PATCH BlueZ v4 1/4] lib/mgmt: Add MGMT_DEV_DISCONN_AUTH_FAILURE define Frédéric Danis
2025-05-23  8:46   ` Propagate disconnection reason bluez.test.bot
2025-05-23  7:26 ` [PATCH BlueZ v4 2/4] src/device: Add Disconnected signal to propagate " Frédéric Danis
2025-05-23  7:26 ` Frédéric Danis [this message]
2025-05-23  7:26 ` [PATCH BlueZ v4 4/4] client: Display " Frédéric Danis
2025-05-23 15:20 ` [PATCH BlueZ v4 0/4] Propagate " patchwork-bot+bluetooth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250523072647.689324-4-frederic.danis@collabora.com \
    --to=frederic.danis@collabora.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox