@Rohit, Sorry to open old thread, but I'm having some issues with the security, and you seem to be the go-to man.
I have a peripheral device based on nRF51822, and want to enable encryption, but not necessarily bonding. My device has no IO capabilities so am using the just works model, however the central device (iPhone) is having lots of trouble connecting. I've tried various combinations of security manager settings with enabledBonding and requireMITM,
enableBonding = true, requireMITM = false
connection works ok using Master Control Panel and Nordic dongle, however iPhone will connect and pair and read characterisitics on first connection, then not be able to read any characterisitics on subsequent connections.
enableBonding = false, requireMITM = false
connection works ok using Master Control Panel and Nordic dongle, however iPhone keeps requesting pairing, and won't exit popup unless user cancels pairing operation.
Also, on all of my custom characterisitics, I've set the security requirements to ENCRYPTION_NO_MITM
Do you have any suggestions? Are there more security settings that might be relevant? I'm also searching through Nordic forum but not finding anything specifically helpful.
Andrew
Hi,
I'd like to introduce some APIs to allow link security in BLE.
Encryption/pairing/bonding can be enabled by initializing security-manager module of the BLE stack. Marking characteristics as requiring security will then enforce pairing/bonding during attribute access. I've also added some callbacks to get indications about the progress of the pairing procedure.
These APIs depend on v8 of the Nordic SDK. You can review the proposed extensions at https://github.com/mbedmicro/BLE_API/compare/securityExtensions
I request your feedback.
thanks.
security extensions to BLEDevice.h
security extensions to GattCharacteristic.h