I am finding that I have roughly a 20 second timeout when pairing the CC2541 to OSX.
We are set up to make a connection parameters update request:
// Whether to enable automatic parameter update request when a connection is formed
#define DEFAULT_ENABLE_UPDATE_REQUEST TRUE
// HID idle timeout in msec; set to zero to disable timeout
#define DEFAULT_HID_IDLE_TIMEOUT 0
// Minimum connection interval (units of 1.25ms, 80=100ms) if automatic parameter update request is enabled
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 8
// Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic parameter update request is enabled
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 8
// Slave latency to use if automatic parameter update request is enabled
#define DEFAULT_DESIRED_SLAVE_LATENCY 0
// Supervision timeout value (units of 10ms, 1000=10s) if automatic parameter update request is enabled
#define DEFAULT_DESIRED_CONN_TIMEOUT 500
// Connection Pause Peripheral time value (in seconds)
#define DEFAULT_CONN_PAUSE_PERIPHERAL 10
We are also set up to require a passkey. This works reliably if we enter the passkey fast enough.
BUT if we take too long entering the passkey, on OSX I see
Connection Parameter Update Response: new parameters accepted
OSX updates its connection parameters and logs that its connection update is complete
about 6.1 seconds later, the CC2541 starts advertising again
and 4 seconds after that, OSX says "disconnection complete - connection timeout"
What is happening here? Why does it only happen in the window where we have requested a pairing but have not submitted a passkey?