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

static Passkey add central ble_app_uart_c

Hello everyone,

I trying to communicate nrf52832 SDK 15.0 ble_app_uart(peripheral)  to ble_app_uart_c (central) with secured purpose adding static passkey but i don't get perfect examples on central side adding passkey and peer manager.  please share some example code for adding passkey in central side for better communication.

I added peer manager concept using ble_app_gls example but my code doesn't come in this case BLE_GAP_EVT_AUTH_KEY_REQUEST. i using whitelist in peripheral side it's also need central side...???

  please refer any working code.

  • Take a look at this case, where I have attached code for respectively the central and the peripheral (SDK 15.0) on how to bond using a static passkey.

    Best regards,

    Simon

  • Thanks for replay Simon,

    I trying central this example code using SDK 15.2 Its get many errors as below


    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol asm (referred from main.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol pm_conn_secure (referred from main.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol pm_handler_disconnect_on_sec_failure (referred from main.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol pm_handler_flash_clean (referred from main.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol pm_handler_on_pm_evt (referred from main.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol pm_init (referred from main.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol pm_register (referred from main.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol pm_sec_params_set (referred from main.o).

    Which example code suitable for adding this library.

    This example not suitable SDK 15.0....???

  • I wrote the examples for SDK 15.0, but it should work fine with SDK 15.2 since the API is the same.

    Regarding the "undefined symbol", you should add the header files of the libraries to the path. Check out this link on how to do it.

    You should also add the source files of the libraries to the Project explorer window. Check out this link on how to do it.

    Best regards,

    Simon

  • hello simon,

    I test this example code in SDK 15.2 same passkey enter both side but connection doesn't make central to peripheral error show continuously as below


     0> <info> app: ATT MTU exchange completed.
     0> <info> app: Ble NUS max data length set to 0xF4(244)
     0> <info> peer_manager_handler: Connection security failed: role: Central, conn_handle: 0x0, procedure: Encryption, error: 4102
     0> <warning> peer_manager_handler: Disconnecting conn_handle 0.
     0> <info> app: Disconnected.
     0> <info> app: Disconnected. conn_handle: 0x0, reason: 0x16

    please guide me any step or function i missing in this example code...???

  • I am sorry for the long delay, I am currently looking into your issue and will try to provide an answer as soon as possible.

    Best regards,

    Simon

Related