Skip to content

Add Role property to org.bluez.Bearer.LE1

Kevin Dewald linux-bluetooth 3 versions – Applied

Status from this message: This series was applied to bluetooth/bluez.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 1 replyApplied
  2. v23 patches 4 repliesSuperseded
  3. v13 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- Add functional tests for the bearer interfaces, with their documentation (Luiz)

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/5org.bluez.Bearer: Add Role propertydoc/org.bluez.Bearer.LE.rst+24 -01 reply
2/5bearer: Add Role propertysrc/bearer.c src/device.c src/device.h+48 -00 replies
3/5client: Print LE.Role in infoclient/main.c+1 -00 replies
4/5doc: Add functional-bearer documentationMakefile.am doc/functional-bearer.rst doc/functional-testing.rst+143 -00 replies
5/5test: functional: add bearer teststest/functional/test_bearer.py+302 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH BlueZ v3 0/5] Add Role property to org.bluez.Bearer.LE1

Applications acting as a peripheral, or in both roles, cannot tell whether a connected device is a central that connected to the adapter or a peripheral the adapter connected to. When several applications share the adapter, a device object can appear because of any of them, so the order of events does not answer it either.

bluetoothd already tracks this per bearer from the Device Connected event. This series exposes it as a Role property on org.bluez.Bearer.LE1, "central" or "peripheral", present only while the device is connected over LE, and prints it as LE.Role in bluetoothctl info. The documentation states that it is the link layer role and says nothing about GATT client and server roles.

As a step towards marking the bearer interfaces stable, the series also adds functional tests for them, test/functional/test_bearer.py, described in doc/functional-bearer.rst. Two hosts connect or pair over LE or BR/EDR, and each checks the bearer interfaces of the device object it has for the other: Connect and Disconnect, Connected and the Disconnected signal with its reason, Paired and Bonded, Connectable for a connectable advertiser and for a broadcaster, and Role on both sides of an LE connection.

The five tests take about 45 seconds and passed in five consecutive runs, and the rest of test-functional still passes.

If these tests cover what you had in mind, I can follow up with a patch marking the bearer interfaces stable.

Changes in v3:
- Add functional tests for the bearer interfaces, with their documentation (Luiz)

Changes in v2:
- Move the property from org.bluez.Device1 to org.bluez.Bearer.LE1, so it is clearly per connection (Luiz)
- State in the documentation that it says nothing about GATT roles (Luiz)

Kevin Dewald (5):
org.bluez.Bearer: Add Role property
bearer: Add Role property
client: Print LE.Role in info
doc: Add functional-bearer documentation
test: functional: add bearer tests

 Makefile.am                    |   1 +
 client/main.c                  |   1 +
 doc/functional-bearer.rst      | 141 +++++++++++++++
 doc/functional-testing.rst     |   1 +
 doc/org.bluez.Bearer.LE.rst    |  24 +++
 src/bearer.c                   |  42 +++++
 src/device.c                   |   5 +
 src/device.h                   |   1 +
 test/functional/test_bearer.py | 302 +++++++++++++++++++++++++++++++++
 9 files changed, 518 insertions(+)
 create mode 100644 doc/functional-bearer.rst
 create mode 100644 test/functional/test_bearer.py
Signature · 1 line
2.54.0 (Apple Git-157)