I encountered a scenario where I call sd_ble_gap_connect() and get an event BLE_GAP_EVT_TIMEOUT with source BLE_GAP_TIMEOUT_SRC_CONN. This is followed immediately by an event BLE_GAP_EVT_CONNECTED. I did not think this was possible when looking at this sequence chart. I see this happen on several devices here which are periodically connecting and disconnecting to many sensors.
Timing:
27.802 sd_ble_gap_connect() 28.617 [Event 0x1b (BLE_GAP_EVT_TIMEOUT, source BLE_GAP_TIMEOUT_SRC_CONN)] 28.629 [Event 0x10 (BLE_GAP_EVT_CONNECTED)] 30.602 [Event 0x11 (BLE_GAP_EVT_DISCONNECTED)], reason 0x13 (BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION)
Is this expected behavior?
# Setup info
I'm running the HCI connectivity example code on an nRF52 with the application code on a Linux device using the serial port (1MBaud) for communications.
Softdevice version: s132_nrf52_3.1.0_softdevice.hex.
Thanks,
Dirk