core/gatt: Introduce encryption flags
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | doc/gatt-api: Add encryption flagsdoc/ | +4 | 0 replies | |
| 2/8 | core/gatt: Add support for encryption flagssrc/ src/ | +53 | 1 reply | |
| 3/8 | shared/att: Add own security definitionssrc/ src/ unit/ | +7 | 0 replies | |
| 4/8 | shared/gatt-server: Check attribute permissionssrc/ src/ | +58 | 0 replies | |
| 5/8 | doc/gatt-api: Add Flags property to GattDescriptordoc/ | +14 | 1 reply | |
| 6/8 | shared/gatt: Drop CHRC term of properties definesrc/ src/ src/ +3 more | +156 | 1 reply | |
| 7/8 | core/gatt: Add Flags property to GattDescriptorsrc/ | +86 | 1 reply | |
| 8/8 | test/example-gatt-server: Add encrypt attributestest/ | +50 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH BlueZ 0/8] core/gatt: Introduce encryption flags
From: Luiz Augusto von Dentz <[email protected]>
This set introduce encryption flags to GattCharacteristic and GattDescriptor along with the necessary changes to bt_gatt_server to honor them.
In addition to that example-gatt-server has been updated to include attributes that makes use of the new flags.
The following is the output using bluetoothctl to navigate in the new attributes introduced to example-gatt-server:
[Vudentz's T440s:/service0016/char001c]# attribute-info Characteristic - Vendor specific
UUID: 12345678-1234-5678-1234-56789abcdef1 Service: /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0016 Notifying: no Flags: read Flags: write Flags: extended-properties Flags: writable-auxiliaries Descriptors: /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0016/char001c/desc001e Descriptors: /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0016/char001c/desc001f Descriptors: /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0016/char001c/desc0020 [Vudentz's T440s:/service0016/char001c]# select-attribute /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0016/char0017 [Vudentz's T440s:/service0016/char0017]# attribute-info Characteristic - Vendor specific UUID: 12345678-1234-5678-1234-56789abcdef3 Service: /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0016 Notifying: no Flags: read Flags: write Flags: extended-properties Descriptors: /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0016/char0017/desc0019 Descriptors: /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0016/char0017/desc001a Descriptors: /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0016/char0017/desc001b
[Vudentz's T440s:/service0016/char0017]# read
Attempting to read /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0016/char0017
Failed to read: org.bluez.Error.NotPermitted
[Vudentz's T440s:/service0016/char0017]# write 00
Attempting to write /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0016/char0017
Failed to write: org.bluez.Error.NotPermitted
[Vudentz's T440s:/service0016/char0017]# select-attribute /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0016/char0017/desc001a [Vudentz's T440s:/service0016/char0017/desc001a]# attribute-info
Descriptor - Vendor specific
UUID: 12345678-1234-5678-1234-56789abcdef4 Characteristic: /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0016/char0017
[Vudentz's T440s:/service0016/char0017/desc001a]# read
Attempting to read /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0016/char0017/desc001a Failed to read: org.bluez.Error.NotPermitted
[Vudentz's T440s:/service0016/char0017/desc001a]# write 00
Attempting to write /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0016/char0017/desc001a Failed to write: org.bluez.Error.NotPermitted
Luiz Augusto von Dentz (8):
doc/gatt-api: Add encryption flags core/gatt: Add support for encryption flags shared/att: Add own security definitions shared/gatt-server: Check attribute permissions doc/gatt-api: Add Flags property to GattDescriptor shared/gatt: Drop CHRC term of properties define core/gatt: Add Flags property to GattDescriptor test/example-gatt-server: Add encrypt attributes
doc/gatt-api.txt | 18 +++++ src/gatt-client.c | 32 ++++---- src/gatt-database.c | 185 +++++++++++++++++++++++++++++++++++------------ src/shared/att-types.h | 51 +++++++++---- src/shared/att.c | 2 +- src/shared/gatt-client.c | 4 +- src/shared/gatt-server.c | 93 +++++++++++++----------- test/example-gatt-server | 52 ++++++++++++- tools/btgatt-server.c | 14 ++-- unit/test-gatt.c | 148 ++++++++++++++++++------------------- 10 files changed, 392 insertions(+), 207 deletions(-)
Signature · 1 line
2.1.0