Hello,
I have a question regarding BLE_GAP_EVT_CONN_PARAM_UPDATE (nrf52840, SDK 15.2).
I'm evaluating the BLE_UART example using multiple peripherals.
The goal is to scan for peripherals on the central, start a connection, send one data packet from the peripheral to the central, send one packet back and close the connection.
In general it works but sometimes the ble_evt_handler on the peripheral is called with BLE_GAP_EVT_CONN_PARAM_UPDATE. If I ignore this, my peripheral does not work anymore (I am waiting for nus_data_handler with event id BLE_NUS_EVT_COMM_STARTED for sending the packet to the central. But this is then not called.)
I have to call sd_ble_gap_disconnect if BLE_GAP_EVT_CONN_PARAM_UPDATE is called and try it again.
My question is why? As far as I can see it connection parameter update is called because of these two defines (in peripheral).
#define FIRST_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(3000)
#define NEXT_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(30000)
So if connection establishing takes more time an update parameters will be called? But if I get the event on the peripheral then this update should already have worked, shouldn't it?
Maybe I am missing something?
Thanks, Andreas