I would like to change the BLE connection Parameters on my Nano V2 using the Arduino IDE. Mainly the Connection Interval. The Nano is in the peripheral role and I use the following function:
But the function always return BLE_ERROR_PARAM_OUT_OF_RANGE.
I know the following limits:
minConnectionInterval: 7.5 ms - 4 s
maxConnectionInterval: 7.5 ms - 4s
slaveLatency: 0 - 499
connectionSupervisionTimeout: 100ms - 32 s
I tried differend combination but i always get the out-of-range error. For example:
Gap::ConnectionParams_t *params; params->minConnectionInterval = 100; params->maxConnectionInterval = 200; params->slaveLatency = 0; params->connectionSupervisionTimeout = 400; ble.gap().setPreferredConnectionParams(params);
Is there something wrong with my code? Or are there more Limits/constraints on the paramters ?