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

About BLE security and static pass key

Hi Nordic,

I am using SDK 12.3.0, S130 2.0.1 and PCA10028 nrf51 DK.

I would like to ask some questions about BLE security setting.

1. If I want to enable LE secure connections (just work), all I need to do is to set SEC_PARAM_LESC to 1 if both central and peripheral are nRF51822? Do I need to further modify sec_param or add some code?

2. If I want to enable MITM but both central and peripheral do not have any I/O hardware, can I use static passkey? Do BLE spec support static pass key?

3. If using static pass key is possible, can you provide some examples to illustrate how to implement static pass key?

Thank you.

  • Hi,

    1. Yes, setting SEC_PARAM_LESC to 1 enables LESC in the examples. LESC is then handled by the libraries.

    2./3. Yes, you can use static passkey, by hard coding a passkey. Vidar Berg provided a recent example in the thread static passkey implementation in Central role. Although for an example not present in SDK 12.3, the change log contains all required changes and they should work correspondingly for SDK 12 examples. (This part of the SoftDevice and SDK API has barely changed since. The log configuration changes from UART to RTT can be ignored.) Let me know if you meet any issues.

    Regards,
    Terje

Related