micropython-lib icon indicating copy to clipboard operation
micropython-lib copied to clipboard

aioble/security: Add option to limit number of peers stored.

Open andrewleech opened this issue 5 years ago • 0 comments

This can be used to handle hardware that has a limit to the number of pairing / IRK keys that can be stored in the radio.

Needs to be enabled before aioble initialised to have any impact, eg.

import aioble.security
aioble.security.limit_peers = 3

Basically turns the pairing DB into a FIFO when once the set limit is reached, if any new devices are paired the oldest will be forgotten.

andrewleech avatar Nov 18 '21 04:11 andrewleech