Hi, I am using the DSPS profile for development using PAN1740 modules based on the DA14580 chipset,
Unfortunately as soon as I try to disconnect the host from a device I get a hard reset, I use the app_disconnect();
function:
void app_disconnect(void)
{
struct gapc_disconnect_cmd *cmd = KE_MSG_ALLOC(GAPC_DISCONNECT_CMD,
KE_BUILD_ID(TASK_GAPC, app_env.conidx), TASK_APP,
gapc_disconnect_cmd);
cmd->operation = GAPC_DISCONNECT;
cmd->reason = CO_ERROR_REMOTE_USER_TERM_CON;
// Send the message
ke_msg_send(cmd);
}
to disconnect based on a serial command.
Any help regarding this will be much appreciated.
Thanks.