This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Changing BLE connection interval time

I'd like to be able to change the ble connection interval during during runtime to save power. I followed this post and found that p_ble_evt->evt.gap_evt.params.connected.conn_params.max_conn_interval was 24 (ms?). However I can't get this number to change, even after changing MAX_CONN_INTERVAL, MIN_CONN_INTERVAL, and CONN_SUP_TIMEOUT. Am I missing something?

I also tried calling sd_ble_gap_conn_param_update with different values but 1) the 24 never changed, and 2) occasionally it crashed (though I'm guessing the latter may be due to it's being called multiple times).

iOS 9.3 SDK 13 PCA10040

  • Firstly connection interval has "native" unit of 1.25ms so you need to be careful if you talk in these or in real time. Secondly you haven't mentioned if you are talking about GAP Central role (which sets the connection parameters as master and so you have pretty much full control about connection interval used) or GAP Peripheral (which only follows and suggests parameters back to master, you can use Connection Parameters Change procedure which has form of request to GAP Central who has always final word.

    If you are on Central side then I'd assume that SD should try o use Minimal Connection Interval value and only if there is Parameters' Change request from Peripheral it can go as high as Maximum. But if you want to be sure then simply set both to the same values and then SD should use that for connection establishment.

  • Currently I have the nRF52 set up as the peripheral. On iOS or Android (assuming they are operating at the central), is the connection interval decided by the app or the OS (within the limits defined in the ble spec, of course)?

  • It depends;) There seems to be certain way how to influence it (at least on Android), but as you know it changes from version to version and have these vague names "high/mid/low" which get translated by OS/lower BT stack to actual timing... there are some Q&S on this topic on this forum, try search.

  • Hi, I'm also using nrf52 as peripheral and iOS as central. I'm trying to check the connection interval established by reading the value of p_ble_evt-evt.gap_evt.params.connected.conn_params.max_conn_interval. The value is 24 (30ms) at BLE_GAP_EVT_CONNECTED and non representative at BLE_GAP_EVT_CONN_PARAM_UPDATE.

    I checked at my central application that the established connection interval is 15ms during peripheral to central notification. I guess this means there is some negotiation after the first connection event, which is the proper way to get the connection interval value? If this is too specific, can you give me some advice about ble events management? I'm using SDK 14.1.0 and SoftDevice s132.

    Thank you

  • Firstly I would submit separate question rather then resurrecting some answered thread. Secondly how exactly you get value of connection interval through iOS BLE API???? Thirdly if there is connection parameter update procedure you should get BLE_GAP_EVT_CONN_PARAM_UPDATE and the ble_gap_conn_params_t structure again contains new parameters. Fourthly the truth is in the air meaning trace/log from BLE sniffer should tell you all.

Related