Hi!
We're working in an environment where many many peripherals form connections to a windows 10 based PC. Note, these connections are not simultaneous, so very few peripherals are connected simultaneously to the gateway. Mostly, they advertise, connect, pass some info and disconnect until the next scheduled wake up.
We're seeing issues with the LTKs (long term keys) after a while, which prevent the peripherals from forming a connection to the gateway. This happens after they have already paired and bonded with it, so the keys themselves are present and valid on both sides. Furthermore, these errors are not consistent; usually a restart to the PC enables the devices which previously failed to connect to the PC successfully.
The error I'm seeing in the event viewer are numerous, but one has caught my eye: "Windows cannot store Bluetooth authentication codes (link keys) on the local adapter. Bluetooth keyboards might not work in the system BIOS during startup".
This is surprising to me because, as far as I understand it, when running via an application, the keys are NOT saved on the adapter itself, as it has very limited space in its flash (if any) for keys. It is the application layers' job (via windows drivers) to hold a record of the LTKs it is using and use it when relevant.
Our UWP app uses the Windows.Devices.Enumeration pairasync method in the Windows.Devices.Enumeration namespace to connect to these peripherals (which we also wrote), with the MITM option.
I've had a chat with the representative of the hardware company selling us the dongles (adapters) , and from what I understand from him, this is correct. The LTKs will only be saved internally on the dongle if no application is used to drive the BT/BLE core, then the internal stack will use the internal flash to save LTKs. Otherwise, they should be saved on the host PC.
Could the windows drivers be saving a copy on both the adapter and the local disk? this would explain why I'm getting a 'problem with saving keys to adapter' error when no such thing should be happening.
Thanks!