gatt: update read_characteristics_by_uuid to returns [(handle, value)] instead of [value]

This commit is contained in:
Abel Lucas
2022-11-29 18:03:56 +00:00
parent 0d70cbde64
commit 0cd93ca0c5
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -149,9 +149,9 @@ async def get_peer_name(peer, mode):
if not services:
return None
values = await peer.read_characteristics_by_uuid(GATT_DEVICE_NAME_CHARACTERISTIC, services[0])
if values:
return values[0].decode('utf-8')
characteristics = await peer.read_characteristics_by_uuid(GATT_DEVICE_NAME_CHARACTERISTIC, services[0])
if characteristics:
return characteristics[0][1].decode('utf-8')
# -----------------------------------------------------------------------------