I am writing a C# application that uses the CySmart API. My device uses security mode 1, unauthenticated pairing with encryption and has no I/O. See the screen shot below:
I am using the example code posted in this thread: https://community.cypress.com/thread/26958
After connecting with the device I use the following API call:
err = m_peerDevice.Pair(new CyPairSettings(CySecurityLevel.UNAUTHENTICATED_PAIRING_WITH_ENCRYPTION, false, 16, CyPairingProperties.USE_KEYPRESS_NOTIFICATION));
My OnPairingComplete event gets called but the status is BLE_ERROR_GAP_AUTH_PASSKEY_ENTRY_FAILED. Any ideas?
I have tried all three of the CyPairingProperties and they all give me the same result.
In order for the encryption to work, you will still need to bond the peripheral/central together. as cypress' BLESS requires bonding for encryption and authentication to work.