This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Immediate Disconnection in Peripheral Mode

Hi,

I am struggling to connect to my device using the nRF Connect app and keep getting an immediate disconnection when attempting to connect.

The error looks like this on nRF Connect for PC (two separate connection attempts)

The error looks like this on nRF Connect for Android

The Wireshark sniff capture looks like this:

The device is an nRF52832 running s132 7.0.1 and SDK 16.0.0.

Any ideas on how to overcome this issue would be much appreciated!

Thanks

Wireshark Immediate Disconnect Capture.pcapng

Parents
  • Hi,

    Is it possible that the peripheral device have already bonded with a peer and have whitelist enabled when advertising? This will prevent other peers to connect.

    If it only happens sporadic (e.g. <5% of the connection attempts) then it can also be packet loss due to interference.

    Best regards,
    Kenneth

  • Hi Kenneth,

    The device does not use bonding and/or whitelisting. I can see the device advertising, I just cannot maintain a connection. I even removed the peer manager initialisation from the project and the result is the same.

    It is not sporadic, it is every time.

    I cannot seem to get any breakpoint to be hit in the code during a connection. Do you know where/what the first line of code hit after a connection attempt is? I would like to put a breakpoint there to see if I can get the code to halt at this point. Currently, I register the BLE event handler using NRF_SDH_BLE_OBSERVER but this function is never called upon the connection/immediate disconnection.

    Thanks,

    Ben

Reply
  • Hi Kenneth,

    The device does not use bonding and/or whitelisting. I can see the device advertising, I just cannot maintain a connection. I even removed the peer manager initialisation from the project and the result is the same.

    It is not sporadic, it is every time.

    I cannot seem to get any breakpoint to be hit in the code during a connection. Do you know where/what the first line of code hit after a connection attempt is? I would like to put a breakpoint there to see if I can get the code to halt at this point. Currently, I register the BLE event handler using NRF_SDH_BLE_OBSERVER but this function is never called upon the connection/immediate disconnection.

    Thanks,

    Ben

Children
Related