Hello,
at first I wish all a better New year as the last one.
I have the following problem :
My application is a ultra low power sensor. When my Adroid App is connected to the device, I have to change the connection parameters as quick as possible to save energy, because I get every 10s a new data.
In a special measurement procedure, I will get every 1 s a new data.
So, I have to changed the connection parameters from time to time.
This is working like expected.
But in my DA14580 code, I want to be sure, that the new connection parameters are excepted by the the master ( Adroid App ) or not. If the connection parameters are not right, I have to disconnect the communication.
My project is based on the " ble_app_sleepmode project "
So my first idea was to catch the following message in the "user_catch_rest_hndl()".
case GAPC_PARAM_UPDATED_IND:
{
// Cast the void pointer to the appropriate message structure
struct gapc_param_updated_ind const *msg_param = (struct gapc_param_updated_ind const *)(param);
// Check if updated Conn Params filled to preffered ones
if ((msg_param->con_interval >= user_connection_param_conf.intv_min) &&
(msg_param->con_interval <= user_connection_param_conf.intv_max) &&
(msg_param->con_latency == user_connection_param_conf.latency) &&
(msg_param->sup_to == user_connection_param_conf.time_out))
{
// my code app_easy_gap_disconnect(app_env[0].conidx); // Send disconnect command
}
} break;
But the variables msg_param->con_interval , msg_param->con_latency , msg_param->sup_to have always the same value.
My second idea was to catch the following message GAPC_PARAM_UPDATE_CFM // Master confirm or not that parameters proposed by slave are accepted or not
But without success.
Maybe it is the wrong place to catch this message in the "user_catch_rest_hndl()" or Android did not send this message.
The third and last idea is to read the actual connection parameters direct, but where are they ?
Thanks in advance
with best regards
Siegmar