Skip to content

Commit a1bb9ce

Browse files
Marceau Fillonpi-anl
authored andcommitted
aioble/device: Add function to compare db hashes.
1 parent 3eaf027 commit a1bb9ce

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

micropython/bluetooth/aioble/aioble/device.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,15 @@ async def pair(self, *args, **kwargs):
264264

265265
await pair(self, *args, **kwargs)
266266

267+
def compare_database_hashes(self):
268+
"""
269+
Returns 1 if the database doesn't match the one stored for the current device
270+
The internal service-changed indication will be sent if needed by this function
271+
"""
272+
handle = self._conn_handle
273+
if handle is not None:
274+
return ble.gap_compare_database_hashes(handle)
275+
267276
def is_connected(self):
268277
return self._conn_handle is not None
269278

0 commit comments

Comments
 (0)