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

Peer Manager Unknown CONN_SEC Error Number

I'm using an Nrf52 with S132v3.0 I'm using Peer Manager to manage pairing and bonding. I'm running as a central connecting to a peripheral (iOS/Android peripheral).

I'm using "out of the box" peer management code using the following link from the SDK as an example. infocenter.nordicsemi.com/index.jsp

Most of the time the connection/pairing/bonding works just fine. On occasion I've experienced PM_EVT_CONN_SEC_FAILED.

Below is my switch statement broken up for debug purposes.

switch (p_evt->params.conn_sec_failed.error)
        {
            case PM_CONN_SEC_ERROR_PIN_OR_KEY_MISSING:
                // Rebond if one party has lost its keys.
                err_code = pm_conn_secure(p_evt->conn_handle, true);
                if (err_code != NRF_ERROR_INVALID_STATE)
                {
                    APP_ERROR_CHECK(err_code);
                }
                break;//PM_CONN_SEC_ERROR_PIN_OR_KEY_MISSING
									
							case PM_CONN_SEC_ERROR_MIC_FAILURE:
                NRF_LOG_DEBUG("error: PM_CONN_SEC_ERROR_MIC_FAILURE");
									sd_ble_gap_disconnect(p_evt->conn_handle, BLE_HCI_AUTHENTICATION_FAILURE);
                break;//PM_CONN_SEC_ERROR_MIC_FAILURE

            case PM_CONN_SEC_ERROR_DISCONNECT :
                NRF_LOG_DEBUG("error: PM_CONN_SEC_ERROR_DISCONNECT ");
									sd_ble_gap_disconnect(p_evt->conn_handle, BLE_HCI_AUTHENTICATION_FAILURE);
                break;//PM_CONN_SEC_ERROR_DISCONNECT

            case PM_CONN_SEC_ERROR_SMP_TIMEOUT:
                NRF_LOG_DEBUG("error: PM_CONN_SEC_ERROR_SMP_TIMEOUT");
									sd_ble_gap_disconnect(p_evt->conn_handle, BLE_HCI_AUTHENTICATION_FAILURE);
                break;//PM_CONN_SEC_ERROR_SMP_TIMEOUT
							
            default:
									/* Close the connection and move on */
									sd_ble_gap_disconnect(p_evt->conn_handle, BLE_HCI_AUTHENTICATION_FAILURE);
                break;
        }

The error I'm getting is "Unknown" with an error ID of 0x0001.
Looking at the documentation: infocenter.nordicsemi.com/index.jsp

The only valid error IDs are 0x6, 0x3D, 0x100 ,0x101. Has anyone seen 0x0001? Any idea what it means?

Parents
  • Hello Greg Nowak

    Please see the following link devzone.nordicsemi.com/.../

    To summarize, Error 0x001 is a SVC handler missing error and can arise when the SDK used is incompatible with the Softdevice. I see the link you provide go to SDK v11, while you state you are using softdevice v 3.0, which was released with SDK 12.

    I recommend you try to change Softdevice to version 2.0, which was released with SDK11, or switch to SDK12 while using Softdevice version 3.0, and see if that resolves your errors.

    Best regards

    Jørn Frøysa

  • I'm not using DFU, I'm using a J-Link debugger to flash over the image (using the Keil IDE).
    I am able to debug, but I'm using the Peer Manager and I'm getting the pm_evt_handler called with the PM_EVT_CONN_SEC_FAILED event ID, with conn_sec_failed.error set to 0x01.
    I can't debug the Soft Device itself so I can't tell why the error is set to 0x01 rather than a valid error.

Reply
  • I'm not using DFU, I'm using a J-Link debugger to flash over the image (using the Keil IDE).
    I am able to debug, but I'm using the Peer Manager and I'm getting the pm_evt_handler called with the PM_EVT_CONN_SEC_FAILED event ID, with conn_sec_failed.error set to 0x01.
    I can't debug the Soft Device itself so I can't tell why the error is set to 0x01 rather than a valid error.

Children
No Data
Related