Can a Connection fail due to lost packets?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can a Connection fail due to lost packets?

887 Views
dany_nava
Contributor I

I'm currently working on an application where a master has to connect to a slave.

The slave is advertising with undirected, connectable advertises.

At some point, the master application will ask for a connection to the slave. 

Is there a possibility that the procedure does not succeed (maybe some packets during the validation are lost)?

I'm excluding the cases

- the slave request a disconnect

- after the connection procedure is completed, the slave goes out of range and therefore, the connection timeout trigger a disconnection.

Thank you

Tags (2)
3 Replies

802 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Daniele,

What is the MCU that you are working on?

Is there a possibility that the procedure does not succeed (maybe some packets during the validation are lost)?

Yes, the slave could report a not established connection, because it never received the ack.

Are you able to connect the devices?

Regards,

Mario

802 Views
dany_nava
Contributor I

Thank you for your answer Mario,

It's a KW36Z. 

In the case of connection not established by slave, should i expect a response on the connection callback of type EvtDisconnect?

I usually have no problem connecting to slaves but i want to be able to consider all the possible outputs of a connection requests.

0 Kudos
Reply

802 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Daniele,

Yes, For example, the code has a case Disconnect event

case gConnEvtDisconnected_c:
        {
            .
            .
            if (pConnectionEvent->eventData.disconnectedEvent.reason == gHciConnectionTimeout_c)
            {‍‍‍‍‍‍‍‍

Regards,

Mario