unknownconstant / ArduinoBLE

ArduinoBLE library for Arduino
GNU Lesser General Public License v2.1
6 stars 4 forks source link

Pairing enable / disable timeout #14

Open unknownconstant opened 3 years ago

unknownconstant commented 3 years ago

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

eltos commented 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.

unknownconstant commented 3 years ago

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.