I have a question about PeerManager.
When I tried bonding using PeerManager, the following error occurred.
Please tell me the cause.
I have a question about PeerManager.
When I tried bonding using PeerManager, the following error occurred.
Please tell me the cause.
<info> peer_manager_handler: Connection security failed: role: Central, conn_handle: 0x0, procedure: Bonding, error: 4352 <warning> peer_manager_handler: Disconnecting conn_handle 0.
Hi,
Which SDK version and example are you using? What device are you using for testing bonding against? Decimal 4352 is 0x1100. I find the following defines and reasoning for this error in peer_manager_types.h:
#define PM_CONN_SEC_ERROR_BASE 0x1000 /**< @brief The base for Peer Manager defined errors. See @ref PM_SEC_ERRORS and @ref pm_sec_error_code_t. */ #define PM_CONN_SEC_ERROR_DISCONNECT (PM_CONN_SEC_ERROR_BASE + 0x100) /**< @brief Pairing or encryption did not finish before the link disconnected for an unrelated reason. */
So it looks like the device disconnects before the pairing or encryption procedure completed.
Best regards,
Jørgen
Hi,
Which SDK version and example are you using? What device are you using for testing bonding against? Decimal 4352 is 0x1100. I find the following defines and reasoning for this error in peer_manager_types.h:
#define PM_CONN_SEC_ERROR_BASE 0x1000 /**< @brief The base for Peer Manager defined errors. See @ref PM_SEC_ERRORS and @ref pm_sec_error_code_t. */ #define PM_CONN_SEC_ERROR_DISCONNECT (PM_CONN_SEC_ERROR_BASE + 0x100) /**< @brief Pairing or encryption did not finish before the link disconnected for an unrelated reason. */
So it looks like the device disconnects before the pairing or encryption procedure completed.
Best regards,
Jørgen
Thank you for answering.
SDK: 15.3.0
example: ble_app_multirole_lesc (I changed the source from the sample)
device: EYSHJNZWZ (nRF52832)
It may or may not occur under the same conditions.
(Reset every time to make same condition)
What causes the device to disconnect?
Can you provide the full log output from the failing device? If you could set NRF_LOG_DEFAULT_LEVEL to 4 in your sdk_config.h file, that should provide more details.
What device are you testing against?
Can you provide a sniffer trace between the two devices when trying to perform bonding? You can use nRFSniffer v2 for that.
The cause is unknown but the same phenomenon no longer occurs.
Therefore, we can not provide logs.
I will provide the log when it happens again.
The device used for the test is Android (Bluetooth v5.0).
I do not have nRF Sniffer.
Therere, sniffer trace can not be performed.
Is there any other way to identify the cause?
Also, I fear that this will happen at unintended timings.
Please let me know if there is a way to deal with it.