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

Secure_manager library adding problem in segger embedded studio

Hello everyone,

I developed my code secure connection with static passkey i'm using ble_app_gls example code to implement my custom code i have added all library files i got some error as below

1> Linking cbeacon-52810.elf
1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.30c/gcc/arm-none-eabi/bin/ld: Output/cbeacon-52810 Release/Obj/security_manager.o: in function `smd_params_reply_perform':
1> E:\BLE\projects\STG\nRF5_SDK_15.2_Beacon_test\components\ble\peer_manager/security_manager.c:331: undefined reference to `nrf_ble_lesc_public_key_get'
1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.30c/gcc/arm-none-eabi/bin/ld: Output/cbeacon-52810 Release/Obj/security_manager.o: in function `sm_init':
1> E:\BLE\projects\STG\nRF5_SDK_15.2_Beacon_test\components\ble\peer_manager/security_manager.c:484: undefined reference to `nrf_ble_lesc_init'
1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.30c/gcc/arm-none-eabi/bin/ld: Output/cbeacon-52810 Release/Obj/security_manager.o: in function `sm_ble_evt_handler':
1> E:\BLE\projects\STG\nRF5_SDK_15.2_Beacon_test\components\ble\peer_manager/security_manager.c:515: undefined reference to `nrf_ble_lesc_on_ble_evt'
Build failed

I added all library file but i don't know where i made a mistake please help to solve this problem.

hardware: NRF52810 SDK15.2

Compiler : Seeger embedded Studio v4.30

Parents Reply Children
  • Hi Hung Bui,

    I added secure parring concept in my ble_app_beacon code. so i take reference code of ble_app_gls to added my beacon code so i added this library 

    peer_manager.c

    peer_manager_handler.c

    security_dispatcher.c

    security_manager.c

    when i enable #define PM_LESC_ENABLED  1

    compiler show error as below. how to solve this error

    1> Linking cbeacon-52810.elf
    1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.30c/gcc/arm-none-eabi/bin/ld: Output/cbeacon-52810 Release/Obj/security_manager.o: in function `smd_params_reply_perform':
    1> E:\BLE\projects\STG\nRF5_SDK_15.2_Beacon_test\components\ble\peer_manager/security_manager.c:331: undefined reference to `nrf_ble_lesc_public_key_get'
    1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.30c/gcc/arm-none-eabi/bin/ld: Output/cbeacon-52810 Release/Obj/security_manager.o: in function `sm_init':
    1> E:\BLE\projects\STG\nRF5_SDK_15.2_Beacon_test\components\ble\peer_manager/security_manager.c:484: undefined reference to `nrf_ble_lesc_init'
    1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.30c/gcc/arm-none-eabi/bin/ld: Output/cbeacon-52810 Release/Obj/security_manager.o: in function `sm_ble_evt_handler':
    1> E:\BLE\projects\STG\nRF5_SDK_15.2_Beacon_test\components\ble\peer_manager/security_manager.c:515: undefined reference to `nrf_ble_lesc_on_ble_evt'
    Build failed

  • Please include the nrf_ble_lesc.c file. 
    If you see a function missing, try to find that function in side ble_app_gls , and then include the same file into your project. 

  • Dear Sir,

    for my application with SDK 17.0.2 and S140 softdevice I've the same trouble, but I've already added the nrf_ble_lesc.c file at the nRF_BLE group, I've also enabled into the sdk_config.h file the PM_LESC_ENABLED so what I've to do in order to get all working?

    Looking through the source file nrf_ble_lesc.c I see this conditional check:

    #if NRF_MODULE_ENABLED(NRF_BLE_LESC)
    
    #include "nrf_ble_lesc.h"
    #include "nrf_crypto.h"
    ...

    the code included by the conditional statement #if is grayed out so it means that the module NRF_BLE_LESC is not enabled, looking inside the sdk_config.h file there are no label related this type of module, only the PM_LESC_ENABLED is present. Searching through all the SDK files for the key NRF_BLE_LESC give no results so how is possible to activate this module?

    Just a side consideration, it is very frustrating and time consuming to do a trial and error procedures to get things working, I kindly ask if is possible to have a guide or some notes inside the docs to follow with all the dependencies related some modules so is possible to know what files are needed to add some functionality ... (I'm try to add the peer module functionality to my design).

    Thanks for your time!

    Best regards.

    F.

Related