What is GAPC_PARAM_UPDATED_IND in ble_app_peripheral?

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
mahaju
Offline
Last seen:2 years 1 month ago
Joined:2018-01-29 01:08
What is GAPC_PARAM_UPDATED_IND in ble_app_peripheral?

Hello
I am using ble_app_peripheral as the basis of my application
There are a lot of other changes I have made to the basic ble_app_peripheral sample code but I think they won't be relevant to this particular question

After connection between smartphone and the DA14580 development board, the board stops BLE advertising
After about 10 seconds of this, I notice GAPC_PARAM_UPDATED_IND message is always generated

What is this message and why is it generated? I suppose it means GAPC_PARAM_UPDATED indication? Does this mean GAPC_PARAM_UPDATE_CMD or GAPC_PARAM_UPDATE_REQ_IND type message was generated at some point?

What exactly is making this message in the ble_app_peripheral sample code, what does it do, and how do I safely stop it from getting generated?

Device:
PM_Dialog
Offline
Last seen:3 days 2 hours ago
Staff
Joined:2018-02-08 11:03
Hi mahaju,

Hi mahaju,

The GAPC_PARAM_UPDATED_IND event triggered when parameters of the connection have been updated, regarding to RevieraWave’s GAP Interface Specifications. The GAPC_PARAM_UPDATE_CMD is a connection parameter update command and the GAPC_PARAM_UPDATE_REQ_IND is a request of updating connection parameters indication. The GAPC_PARAM_UPDATE_REQ_IND message event is triggered on the master when the slave of the connection requests to update connection parameters. The peripheral will check the connection paramters from the master and if doesn’t accept the current parameters of the connection it will send an update (this occurs in the connection callback). If the connection parameter are not acceptable, the master will reject the update and the callback app_on_update_params_rejected will occur but if the master accepts the app_on_update_params_complete will occur. If the master accepts the parameters the GAPC_PARAM_UPDATED_IND will be send to the application as soon as the parameters are updated.

Thanks PM_dialog

mahaju
Offline
Last seen:2 years 1 month ago
Joined:2018-01-29 01:08
Then what is a simple way of

Then what is a simple way of preventing this from happening, in the DA14580 code? I am assuming whatever is causing GAPC_PARAM_UPDATED_IND to happen, is part of the ble_app_peripheral sample code. Can this part be removed safely? Or do you mean this is happening because of some update command coming in from the master (smartphone app)? Am I supposed to prevent the master (smartphone app) from sending the connection parameters update command? Did I understand how this works correctly? If this is the case, is it possible to make the ble_app_peripheral application ignore connection parameters update command from the smartphone app?

PM_Dialog
Offline
Last seen:3 days 2 hours ago
Staff
Joined:2018-02-08 11:03
Hi mahaju,

Hi mahaju,
Yes, you can do safely this modification in your code. The connection parameters are updated by param_update_request_timer_cb() callback function. You can comment out the following block of code in the user_app_connection() where the param_update_request_timer_cb() callback is invoked in order to be called when the timer elapses.

if ((param->con_interval < user_connection_param_conf.intv_min) ||
(param->con_interval > user_connection_param_conf.intv_max) ||
(param->con_latency != user_connection_param_conf.latency) ||
(param->sup_to != user_connection_param_conf.time_out))
{
// Connection params are not these that we expect
app_param_update_request_timer_used = app_easy_timer(APP_PARAM_UPDATE_REQUEST_TO, param_update_request_timer_cb);
}

根据蓝牙核心规范,《乌利希期刊指南ate connection parameters command can be updated only by master. Although, the slave can propose some connection parameters, then the master decides to accept them or not.

Thanks PM_dialog