2 posts / 0 new
Last post
awesley
Offline
Last seen:2 years 9 months ago
Joined:2015-07-07 12:08
connection interval

Hi all

void send_connection_upd_req(void)
{
ke_state_t app_state = ke_state_get(TASK_APP);

// Modify Conn Params
if (app_state == APP_SECURITY || app_state == APP_PARAM_UPD || app_state == APP_CONNECTED)
{
struct gapc_param_update_cmd * req = KE_MSG_ALLOC(GAPC_PARAM_UPDATE_CMD, TASK_GAPC, TASK_APP, gapc_param_update_cmd);

// Fill in the parameter structure
req->operation = GAPC_UPDATE_PARAMS;
#ifndef __DA14581__
req->params.intv_min = PREFERRED_CONN_INTERVAL_MIN; // N * 1.25ms
req->params.intv_max = PREFERRED_CONN_INTERVAL_MAX; // N * 1.25ms
req->params.latency = PREFERRED_CONN_LATENCY; // Conn Events skipped
req->params.time_out = PREFERRED_CONN_TIMEOUT; // N * 10msI
#else
req->intv_min = PREFERRED_CONN_INTERVAL_MIN; // N * 1.25ms
req->intv_max = PREFERRED_CONN_INTERVAL_MAX; // N * 1.25ms
申请- >延迟= PREFERRED_CONN_LATENCY;/ /康涅狄格州前夕nts skipped
req->time_out = PREFERRED_CONN_TIMEOUT; // N * 10ms
#endif
dbg_puts(DBG_FSM_LVL, "Send GAP_PARAM_UPDATE_REQ\r\n");
ke_msg_send(req);

ke_state_set(TASK_APP, APP_PARAM_UPD);
}
}
if I set the PREFERRED_CONN_INTERVAL_MIN being equal to PREFERRED_CONN_INTERVAL_MAX to 40, it means the connection interval is 50ms( 40*1.25ms) .??
In that position, the keyboard would disconnect after the connection is successful for several minutes.

if I set the PREFERRED_CONN_INTERVAL_MIN being equal to PREFERRED_CONN_INTERVAL_MAX to 6, the keyboard would disconnect.

Device:
MT_dialog
Offline
Last seen:2 days 16 hours ago
Staff
Joined:2015-06-08 11:34
Hi awesley,

Hi awesley,

Can you please check the KBD_ENC_SAFEGUARD_TIMEOUT maybe this is the reason your keyboard is disconnecting, as far as the PREFERRED_CONN_INTERVAL_MIN and the PREFERRED_CONN_INTERVAL_MAX, is the keyboard ref design running as is to your dev kit. 6 is the default value of the reference design. Also try to toggle the TIME_TO_REQUEST_PARAM_UPD (is the time that the device waits before sending a parameters update).

Thanks MT_dialog