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

Peer Manager throws error NRF_ERROR_SOFTDEVICE_NOT_ENABLED when trying to pair

Hi,

I'm currently trying to implement Peer Manager in my existing project, for both pairing and bonding. I'm using the ble_app_template in examples/ble_peripheral in the SDK as a template for implementing it. I can initialize Peer Manager without issues. However when I connect to the device and try to pair and bond the following sequence happens inside the peer manager event handler:

Event 1: PM_EVT_CONN_SEC_START

Event 2: PM_EVT_CONN_SEC_PARAMS_REQ

Event 3: PM_EVT_ERROR_UNEXPECTED

Inside PM_EVT_ERROR_UNEXPECTED I print the error (which is 2, and as a humanreadable description: NRF_ERROR_SOFTDEVICE_NOT_ENABLED).

But clearly the softdevice is enabled since I can see the device advertising and I can connect to it. 

What am I missing here?

Other info:

SDK: V15.0

Hardware: nRF52832 PCA10040

Parents
  • As follow up on this question, how do I enable logging for Peer Manager? I've spent a couple of hours now trying to enable some form of debug logs for Peer manager.

    I've tried different version of the following in sdk_config:

    #ifndef PM_CONFIG_LOG_ENABLED
    #define PM_CONFIG_LOG_ENABLED 1
    #endif
    
    #ifndef PEER_MANAGER_CONFIG_LOG_ENABLED
    #define PEER_MANAGER_CONFIG_LOG_ENABLED 1
    #endif
    
    #ifndef PM_LOG_ENABLED
    #define PM_LOG_ENABLED 1
    #endif

Reply
  • As follow up on this question, how do I enable logging for Peer Manager? I've spent a couple of hours now trying to enable some form of debug logs for Peer manager.

    I've tried different version of the following in sdk_config:

    #ifndef PM_CONFIG_LOG_ENABLED
    #define PM_CONFIG_LOG_ENABLED 1
    #endif
    
    #ifndef PEER_MANAGER_CONFIG_LOG_ENABLED
    #define PEER_MANAGER_CONFIG_LOG_ENABLED 1
    #endif
    
    #ifndef PM_LOG_ENABLED
    #define PM_LOG_ENABLED 1
    #endif

Children
No Data
Related