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

S130 Device Manager Peripheral and Central

Hi,

I developed application whitch is using S130 soft device. On central side to manage devices, i've used device manager from sdk 6.1.0. It works fine.

But now i need to make secure connection on peripheral with only one mobile phone whitch would be known. If i understand correctly, i should advertise with whitelist witch contains irk, not adddreses. Because phone address is BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE. To do that at first connection, on BLE_GAP_EVT_SEC_PARAMS_REQUEST event i should reply with security params

case BLE_GAP_EVT_SEC_PARAMS_REQUEST:
    err_code = sd_ble_gap_sec_params_reply(p_ble_evt->evt.gap_evt.conn_handle, BLE_GAP_SEC_STATUS_SUCCESS, &CENTRAL_Data.sec_param, NULL);
    APP_ERROR_CHECK(err_code);
    break;

But on this event i get error NRF_ERROR_INVALID_ADDR.

Maybe i misunderstood something or maybe there is one device manager for both peripheral and central in S130 softdevice?

  • I guess it is something wrong with &CENTRAL_Data.sec_param.

    Please try this project. I made it for S130 0.9.0-1 alpha.

    I used SDK 7.1.0 (with the newest S130 headers) and PCA10001.

    Extract it to C:\Keil_v5\ARM\Device\SDK7.1.0\examples\ble_central_and_peripheral\experimental.

    sd_ble_gap_sec_params_reply() doesn't return an error.

Related