Open unknownconstant opened 3 years ago
provide an explicit callback to indicate a new device has paired
This sounds like a great idea, independent of implementation of a timeout. It could be implemented by extending the existing Connected/Disconnected event handlers.
Yes - when I looked at your code I saw how you'd solved it and it makes sense. Providing further info in the event handlers is probably the way forward like you suggest.
Create function to allow developer to put BLE into pairing mode without a timeout so that if a device has not paired with a defined period that the device exits from pairing mode.
This could be implemented by the developer already by monitoring for key storage requests, however it would be simpler to pass a timeout to the library, or to at least provide an explicit callback to indicate a new device has paired