This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Best practices to secure a BLE NRF51 to NRF51 link ?

Hello,

I want to secure a link between 2 NRF51 (man in the middle and privacy with AES).

How to do that ? (I can use a static key in this application)

Most of the codes i found are partials and not up to date (timeout does not exist in structure, ...). Documentation is good but difficult to apply without an exemple to start and I not found any exemple in SDK.

Thank you.

edit 29.09.2015: traces.txt

edit 03.10.2015: traces.txt

  • Have you found BLE_GAP_EVT_SEC_PARAMS_REQUEST in the code now? If the peripheral application doesn't receive BLE_GAP_EVT_SEC_PARAMS_REQUEST most likely the central hasn't sent a pairing request. The central application triggers a pairing request by calling sd_ble_gap_authenticate(), in the attached ble_app_hrs_c this is done when the BLE_HRS_C_EVT_DISCOVERY_COMPLETE event is received, through dm_security_setup_req()->initiate_security_request()->sd_ble_gap_authenticate().

    If the BLE_GAP_EVT_AUTH_KEY_REQUEST event is not received it is most likely because there is something wrong with the IO capabilites.

    You can test with the nRF Sniffer.Or you can use the debugger.To test you can put a breakpoint on the BLE_GAP_EVT_SEC_PARAMS_REQUEST in device_manager_peripehral.c If BLE_GAP_EVT_SEC_PARAMS_REQUEST is not received I would check if sd_ble_gap_authenticate() is called on the central side.

  • Changing device_manager_central.c to device_manager_peripheral.c make me receive BLE_GAP_EVT_AUTH_KEY_REQUEST on one side. I will look for your last infos asap, thank you.

  • Now I understand. Maybe I should have done that earlier. Anyways, I recommend getting the examples I provided to work with S110 and S120 first, then port them to S130. Let me know how it goes.

  • Hello, I used winmerge to visualise the differences between the 2 files. There is just some significant changes in functions dm_security_setup_req, dm_distributed_keys_get and dm_ble_evt_handler but I'm not sur how to merge it. Could you take 5 minutes to do a quick look on it please ?

  • How to merge device_manager_peripheral and device_manager_central?

Related