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

  • 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

  • Hi,

    Everything is pointing to an hardware issue with the device (e.g. noise is preventing the connection request packet from being received, hence the device continue to advertise as if nothing happened). Is this code running on an nRF52-DK or your own made hardware?

    Best regards,
    Kenneth

  • Hi Kenneth,

    The code is running on the development kit for the ISP4520 (ISP4520-EU-TB).

    After some testing using both the PCA10040 and the above test board, I have discovered the following. While the ISP4520 is either being debugged with Segger Embedded Studio or just connected using Segger RTT Viewer, the BLE will not connect properly. As soon as I disconnect the RTT viewer or stop debugging, I can connect as normal. (Note that when I disconnect, I do NOT remove any cables). However, the PCA10040 does not have these issues and works well in either debug or when not in debug and regardless of whether the RTT viewer is connected.

    Have you seen this issue before?

    Thanks,

    Ben

  • It sounds like poor grounding that cause noise from SWD to impact reception. I suggest that you check with InsightSIP if you have followed recommendation in terms of proper grounding and decoupling of the module.

    Best regards,
    Kenneth

Related