Change Connection Parameters



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:

  1. minConnectionInterval: 7.5 ms - 4 s

  2. maxConnectionInterval: 7.5 ms - 4s

  3. slaveLatency: 0 - 499

  4. 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;;

Is there something wrong with my code? Or are there more Limits/constraints on the paramters ?


I could solve my Problem by using No error occurs.

But I first changed the min- and maxConnectionInterval to 200ms, and now this value remains. I have done several other Connection Updates with other interval values, but the Intervall is still 200ms. Really strange. Seems that These value was saved somewhere…

I flashed the BLE Nano V2 several times but the Connection Interval remains 200 ms.

Any suggestions?


Hi @blebeginner,

You have defined a pointer, but not the variable. the params points to null memory. Try the code below:

Gap::ConnectionParams_t params;
params.minConnectionInterval = 100;
params.maxConnectionInterval = 200;
params.slaveLatency = 0;
params.connectionSupervisionTimeout = 400;;

This API updates connection parameters. In the central role this will initiate a Link Layer connection parameter update procedure. In the peripheral role, this will send the corresponding L2CAP request and wait for the central to perform the procedure. According to the Nordic SoftDevice API documentation, the parameter of this function is a pointer to desired connection parameters. If NULL is provided on a peripheral role, the parameters in the PPCP characteristic of the GAP service will be used instead. If NULL is provided on a central role and in response to a BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST, the peripheral request will be rejected. Again, the params you defined is pointer to NULL memory, instead of variable.

Best regards,


@guohui thank you for your Reply! Now it works. Such a stupid mistake…


I am not able to update the minconnection interval. I am using the following code in the peripheral side:

Gap::ConnectionParams_t connectionParams;
connectionParams.minConnectionInterval = 12;
connectionParams.maxConnectionInterval = 12;
connectionParams.slaveLatency = 0;
connectionParams.connectionSupervisionTimeout = 500;;

However, when I read the set values in the central side, both the min and max intervales are always set to 100ms. The code segment in the central side is as follows:

void connectionCallBack( const Gap::ConnectionCallbackParams_t *params ) {
Serial.println(params->connectionParams->minConnectionInterval, DEC);
Serial.println(params->connectionParams->maxConnectionInterval, DEC);

Am I missing something in the central side? Please let me know if anyone knows the proper way of changing these parameters.




I have a question please. Have you suggested these lines to be included in the void setup() portion of the code? Because I have included your code in the BLE_SimplePeripheral’s void setup() in an Arduino IDE and it is not showing any change in Min and Max ConnectionIntervals when the ConnectionCallBack is called.

I will be grateful for any help.

I am struggling with changing the connection interval of the my BLE Nano 1.5 device. I would be grateful for your help.


Hi @zahak and @sim,

The connection parameters in the connection callback is the effective connection parameters that is set by Central, in which there is only the maximum connection interval is used and the minimum connection interval is meaningless, i.e. the maximum connection interval in the callback is the effective interval. Once connected, the connection parameters is set by Central. If this parameters don’t meet the Peripheral Preferred Connection Parameters, the Peripheral can call to request updating the interval after connected.

Best regards.