We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8a0f4c commit b136108Copy full SHA for b136108
micropython/bluetooth/aioble/aioble/security.py
@@ -35,8 +35,8 @@
35
limit_peers = None
36
37
SEC_TYPES_SELF = (10, )
38
-SEC_TYPES_PEER = (1, 2, 3, 4)
39
-
+SEC_TYPES_PEER = (1, 2, 4)
+SEC_TYPES_CCCD = (3, )
40
41
# Must call this before stack startup.
42
def load_secrets(path=None):
@@ -124,7 +124,7 @@ def _log_peers(heading=""):
124
if core.log_level <= 2:
125
return
126
log_info("secrets:", heading)
127
- for sec_type in SEC_TYPES_PEER:
+ for sec_type in SEC_TYPES_PEER + SEC_TYPES_CCCD:
128
log_info("-", sec_type)
129
130
if sec_type not in _secrets:
@@ -216,6 +216,9 @@ def _security_irq(event, data):
216
217
for k, v in secrets:
218
if k == key:
219
+ if index:
220
+ index -= 1
221
+ continue
222
return v
223
return None
224
0 commit comments