Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE connection parameter update from peripheral to nRF connect on iOS

Hi,

I am running an nRF5 SDK BLE example (Cycling Speed and Cadence Application) on nRF52 DK as peripheral and connect to nRF connect mobile app as central, and I would like to change connection parameter. I tried two ways for updating the params, one is to modify the defines in main.c (such as #define SLAVE_LATENCY) to change the peripheral preferred parameter values, the other is to use sd_ble_gap_conn_param_update API from peripheral. I have loaded nRF connect app on both iphone7 and android (nexus 6p) and I am seeing different behaviours. 

On Android phone both worked for me. I am using BLE_GAP_EVT_CONN_PARAM_UPDATE event to print out current param values when this event happens,  and I see that peripheral preferred values are used shortly after BLE connection is established, and subsequent sd_ble_gap_conn_param_update calls will trigger another BLE_GAP_EVT_CONN_PARAM_UPDATE event printing newly requested values (as long as I give enough delay in between updates). For example below is after I change slave latency to 2 and timeout to 8s for preferred params and after connection establishment I see BLE_GAP_EVT_CONN_PARAM_UPDATE event:

<info> app: Connection parameters updated:
<info> app: min_conn_interval: 997.50ms
<info> app: max_conn_interval: 997.50ms
<info> app: slave_latency: 2
<info> app: conn_sup_timeout: 8000ms

On the other hand using the same peripheral setup to connect to iOS (iphone7 v14.2) behaviour is very different, neither preferred nor request parameters are used, whenever there is BLE_GAP_EVT_CONN_PARAM_UPDATE event I always see the following values:

<info> app: Connection parameters updated:
<info> app: min_conn_interval: 30.00ms
<info> app: max_conn_interval: 30.00ms
<info> app: slave_latency: 0
<info> app: conn_sup_timeout: 720ms

Is this the limitation of the nRF connect app on iOS or should I do something differently in peripheral FW? From Apple BLE design guideline I think updating conn param from peripheral should be supported. Any suggestion would be appreciated. Thanks.

Regards,

Yang

Parents Reply Children
No Data
Related