We have an nRF52 with dual roles: peripheral for the connection to an app, and central, connecting to multiple third party peripheral devices.
we have a few problems with parameter negotiation as central. The current one is that one of the peripherals seems to be requesting illegal parameters:
When handling BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST
we get these:
min_conn_interval: 6
max_conn_interval: 32
slave_latency: 0
conn_sup_timeout: 10000
but allowed are only conn_intervals 6-3200, slave_latency 0-499, conn_sup_timeout 10-3200.
Plus if both conn_sup_timeout and max_conn_interval are specified: conn_sup_timeout * 4 > (1 + slave_latency) * max_conn_interval.
ie the supervision timeout requested is too long.
sd_ble_gap_conn_param_update() fails with ERROR 0x00000007 (NRF_ERROR_INVALID_PARAM)
But If I edit the connection parameters before calling sd_ble_gap_conn_param_update(), with the edited copy, the peripheral disconnects after a while with reason 0x22 (LL_RESPONSE_TIMEOUT)
This happens about 40s after the negotiation, even if I receive data in those 40s
Any best practises how to handle such "illegal requests"?