This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how to change the connection interval dynamically

Hello , 

I am using nRF52832 , sdk 16version. I want to set the BLE connection interval via BLE   using application. How to do that? I tried to assign the variable  to the min connection interval and assigned the value via BLE command , but didn't work . please suggest me . Is it possible ?

I want to set for 10ms,20ms and 30ms 

Thanks & Regards 

pspavi

  • Hello pspavi,

    I am using nRF52832 , sdk 16version. I want to set the BLE connection interval via BLE   using application. How to do that? I tried to assign the variable  to the min connection interval and assigned the value via BLE command , but didn't work . please suggest me . Is it possible ?

    Will the device be working as a central or peripheral?
    I am not sure I understand what you have tried previously, could you elaborate on which functions you were using?

    If the device is working as a peripheral it can not determine what the connection parameters should be, but it could try to negotiate with the central using connection parameter update requests, and then disconnect if the negotiation is unsuccessful. You could see this demonstrated in the Heart Rate example in the SDK - the specific update procedure happens as part of the ble_conn_params.c file's update_timeout_handler function.

    Best regards,
    Karl

  •  The device is working as peripheral,  I want to change the connection interval for 10 , 20,30ms as per my requirement.  I will send these commands from central application, if I send 10?ms then it should change from default connection interval to 10ms connection interval either disconnecting or or in connection mode.Is it possible?? 

  • ps_anu said:
    I will send these commands from central application, if I send 10?ms then it should change from default connection interval to 10ms connection interval either disconnecting or or in connection mode.Is it possible?? 

    This is possible, yes.
    For this, you can use the sd_ble_gap_conn_params_update function.
    The sequence is described in the Central Connection Parameter Update sequence messaging chart.

    I do not understand what you mean when you say "either disconnecting or or in connection mode", but if you are referencing what I said in my last post, then you may indeed either configure your peripheral to accept or decline the update request. If it declines, it will then disconnect.

    Best regards,
    Karl

Related