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

Parents
  • 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.

  • 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.

Reply
  • 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.

Children
No Data
Related