From: Matthias Kurz <m.kurz@irregular.at>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 2/4] doc: Document component battery objects
Date: Thu, 20 Aug 2026 00:31:42 +0200 [thread overview]
Message-ID: <20260819223144.82045-3-m.kurz@irregular.at> (raw)
In-Reply-To: <20260819223144.82045-1-m.kurz@irregular.at>
Describe the experimental component Battery1 properties, their opaque
object paths, and how BatteryProvider1 implementations publish several
batteries for one device.
Assisted-by: Codex:gpt-5.6-sol
---
doc/org.bluez.Battery.rst | 35 +++++++++++++++++++++++++++++--
doc/org.bluez.BatteryProvider.rst | 16 ++++++++++++++
2 files changed, 49 insertions(+), 2 deletions(-)
diff --git a/doc/org.bluez.Battery.rst b/doc/org.bluez.Battery.rst
index 5f9c6e7c6..e68c5d260 100644
--- a/doc/org.bluez.Battery.rst
+++ b/doc/org.bluez.Battery.rst
@@ -17,15 +17,27 @@ Interface
:Service: org.bluez
:Interface: org.bluez.Battery1
:Object path: [variable prefix]/{hci0,hci1,...}/dev_{BDADDR}
+ [/battery_{identifier}]
+
+Component battery objects are experimental. Their object paths are
+implementation details and shall be treated as opaque. Clients shall use the
+``Device`` and ``Identifier`` properties to associate a component with its
+parent device and its stable identity.
+
+For diagnostic purposes, ASCII letters and digits in the identifier are kept
+in the object path. Every other byte is encoded as an underscore followed by
+two lowercase hexadecimal digits.
Properties
----------
-byte Percentage [readonly]
-``````````````````````````
+byte Percentage [readonly, optional]
+````````````````````````````````````
The percentage of battery left as an unsigned 8-bit integer.
+The property is absent while the battery level is unknown.
+
string Source [readonly, optional]
``````````````````````````````````
@@ -36,3 +48,22 @@ This property is informational only and may be useful for debugging purposes.
Providers from **org.bluez.BatteryProvider(5)** may make use of this property to
indicate where the battery report comes from (e.g. "HFP 1.7", "HID", or the
profile UUID).
+
+object Device [readonly, optional, experimental]
+````````````````````````````````````````````````````````````
+
+The object path of the device containing this battery.
+
+This property is present on component battery objects below the device object.
+
+string Identifier [readonly, optional, experimental]
+````````````````````````````````````````````````````````````
+
+A stable identifier for this battery within the device, such as ``left``,
+``right``, or ``case``.
+
+boolean Charging [readonly, optional, experimental]
+````````````````````````````````````````````````````````````
+
+Indicates whether this battery is currently charging. The property is absent
+while the charging state is unknown.
diff --git a/doc/org.bluez.BatteryProvider.rst b/doc/org.bluez.BatteryProvider.rst
index 2373cebf9..b79cbe6f5 100644
--- a/doc/org.bluez.BatteryProvider.rst
+++ b/doc/org.bluez.BatteryProvider.rst
@@ -30,3 +30,19 @@ object Device [readonly]
````````````````````````
The object path of the device that has this battery.
+
+string Identifier [readonly, optional, experimental]
+````````````````````````````````````````````````````````````
+
+A non-empty identifier that is unique among the batteries for this device.
+Multiple batteries may refer to the same device when each provides a unique
+identifier. They are reflected as component **org.bluez.Battery1** objects.
+
+A provider object without this property represents the legacy aggregate
+battery and is reflected directly on the device object.
+
+boolean Charging [readonly, optional, experimental]
+````````````````````````````````````````````````````````````
+
+Indicates whether this battery is currently charging. The property is absent
+while the charging state is unknown.
--
2.55.0
next prev parent reply other threads:[~2026-08-19 22:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 22:31 [PATCH BlueZ 0/4] Add component batteries and Fast Pair Message Stream Matthias Kurz
2026-08-19 22:31 ` [PATCH BlueZ 1/4] battery: Add component battery objects Matthias Kurz
2026-08-19 23:37 ` Add component batteries and Fast Pair Message Stream bluez.test.bot
2026-08-19 22:31 ` Matthias Kurz [this message]
2026-08-19 22:31 ` [PATCH BlueZ 3/4] fastpair: Add Message Stream battery profile Matthias Kurz
2026-08-19 22:31 ` [PATCH BlueZ 4/4] test: Add Fast Pair Message Stream tool Matthias Kurz
2026-08-20 13:59 ` [PATCH BlueZ 0/4] Add component batteries and Fast Pair Message Stream Bastien Nocera
2026-08-20 17:52 ` Matthias Kurz
2026-08-20 14:00 ` Luiz Augusto von Dentz
2026-08-20 17:54 ` Matthias Kurz
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=20260819223144.82045-3-m.kurz@irregular.at \
--to=m.kurz@irregular.at \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.