device: set as Secure Connection when encrypted with AES

This commit is contained in:
Abel Lucas
2022-12-02 19:28:01 +00:00
parent 5178c866ac
commit f580ffcbc3

View File

@@ -2574,6 +2574,9 @@ class Device(CompositeEventEmitter):
f'*** Connection Encryption Change: [0x{connection.handle:04X}] {connection.peer_address} as {connection.role_name}, encryption={encryption}'
)
connection.encryption = encryption
if not connection.authenticated and encryption == HCI_Encryption_Change_Event.AES_CCM:
connection.authenticated = True
connection.sc = True
connection.emit('connection_encryption_change')
@host_event_handler