Hi
I am developing software for a device that should connect to 8 peripherals. I have used the DSPS_HOST example as inspiration, but when I run into a assert in gapc_disconnect_ind_handler because the state is APP_CONNECTABLE instead of APP_CONNECTED. It happen when one connection is established, but run out of range and it is scanning for more devices at the same time.
When I at start scanning I set ke_state_set(TASK_APP, APP_CONNECTABLE)
When starting the the scan. I do it with:
static void user_scan_start(void)
{
struct gapm_start_scan_cmd* cmd = KE_MSG_ALLOC(GAPM_START_SCAN_CMD,
TASK_GAPM,
TASK_APP,
gapm_start_scan_cmd);
cmd->op.code = GAPM_SCAN_PASSIVE;
cmd->op.addr_src = GAPM_STATIC_ADDR;
cmd->interval = 10;
cmd->window = 5;
cmd->mode = GAP_GEN_DISCOVERY;
cmd->filt_policy = SCAN_ALLOW_ADV_ALL;
cmd->filter_duplic = SCAN_FILT_DUPLIC_EN;
// Send the message
ke_msg_send(cmd);
// We are now connectable
ke_state_set(TASK_APP, APP_CONNECTABLE);
}
Is this the correct way to do it, or do you know what I do wrong.
Is there any examples or documentation that tells how to make a central with more than one connections.
Best regards
Kim
Hi Kim,
Many thanks for your question. Let me check it internally and I will get back to you shortly.
Thanks, PM_Dialog
Thanks. Looking forward for your reply.
regards
Kim
Hi Kim,
I will send you an email in your registered email address.
Thanks, PM_Dialog