1. issue a connection request (Connection Request) from iOS.
2. the peripheral issues a Connection Request Indication.
3. Issue a disconnect process from the peripheral.
In iOS 9 it will be identified as disconnected and disconnected immediately.
However, iOS 10 identifies it as timeout and takes time to disconnect.
Is this a problem with iOS?
Is it a problem on the peripheral side?
static int gapc_connection_req_ind_handler(ke_msg_id_t const msgid,
struct gapc_connection_req_ind const *param,
ke_task_id_t const dest_id,
ke_task_id_t const src_id)
{
uint8_t connection_idx = KE_IDX_GET(src_id);
// In iOS 9 it will be identified as disconnected and disconnected immediately.
// However, iOS 10 identifies it as timeout and takes time to disconnect.
app_easy_gap_disconnect(connection_idx);
return (KE_MSG_CONSUMED);
}
Hi y-takamine,
There is no difference for the 580 for issuing a disconnection request towards different OS, the disconnection command is the same for all devices. If you are experincing what you mention then perhaps that has something to do with the OS on the other side and not the 580. I can only assume that the reason for this is the case that the IOS 10 after connection it attemps some additional requests and the fact that you are issuing a disconnection right after the connection leaves the requests from the central as pending and the disconnection request from the 580 pending as well, so the central doesn't communicate with the peripheral and therefore the reason of the disconnection is a timeout. I suppose that if you try to issue a disconnection after a period of time, lets say 10 seconds, the devices will be properly disconnected, you can test this via a ke_timer and issue a disconnection request after 10 seconds.
Thanks MT_dialog