mbox series

[BlueZ,v3,0/3] Propagate disconnection reason

Message ID 20250522154944.665655-1-frederic.danis@collabora.com
Headers show
Series Propagate disconnection reason | expand

Message

Frédéric Danis May 22, 2025, 3:49 p.m. UTC
Currently a client application is informed of the disconnection by the
update of the Connected property to false.
This sends a Disconnected signal with the disconnection reason before
the property is updated.

This will help client application to know the reason for the
disconnection and to take appropriate action.

bluetoothctl is updated to display the disconnection reason on reception
of the signal.

This can be tested in bluetoothctl by disconnecting a device, which
generates:
[SIGNAL] org.bluez.Device1.Disconnected disconnection-local-host

v1->v2: Propagate numerical reason instead of text one
	Improve documentation
	Display disconnect reason in numerical and text in bluetoothctl
v1->v2: Replace numerical value by name and message to be more consistent
        with Device.Connect error reply.

Frédéric Danis (3):
  src/device: Add Disconnected signal to propagate disconnection reason
  doc/device: Add Disconnected signal
  client: Display disconnection reason

 client/main.c            | 18 +++++++++++++
 doc/org.bluez.Device.rst | 41 +++++++++++++++++++++++++++++
 src/adapter.c            | 13 +++++----
 src/device.c             | 57 ++++++++++++++++++++++++++++++++++++++--
 src/device.h             |  3 ++-
 5 files changed, 124 insertions(+), 8 deletions(-)