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

SDK 6.1.0 and s120 v1.0.1 multilink peripheral example: compilation error

Hi community,

When I want to use the example multilink peripheral inside the s120 directory example of the SDK 6.1.0, I'm not able to compile the code.

The device_manager_peripheral.c file is not aligned with the header file ble_gap.h provided for s120 soft device ; some structure (ble_gap_evt_auth_status_t, ble_gap_sec_keys_t, ble_gap_evt_sec_info_request_t) don't contain the right element in the ble_gap.h in nrf51822/include/s120 directory and one function prototype (sd_ble_gap_sec_params_reply) is not the well one. If we take a look, inside s110 or s130 ble_gap.h file, everything is ok.

Why this mismatch exists or something is wrong in my setup ?

Thanks in advance

  • If I modified the ble_gap.h with element provided inside s110 or s130 ble_gap.h file to be able to compile, link and start the program, inside the function gap_params_init, the function sd_ble_gap_ppcp_set return error 6 (NRF_ERROR_NOT_SUPPORTED).

    I don't know why?

  • I get no errors when compiling the example in <sdk 6.1.0>\nrf51822\Board\nrf6310\s120\ble_app_multilink_peripheral\arm\ble_app_multilink_peripheral.uvprojx, using Keil uVision 5.

    • Is this the example you tried as well?
    • What toolchain do you use and on what platform?
    • Did you get this from a fresh (unmodified) version of the SDK?
  • Hi Terje,

    Thanks for your reply!

    I'm using GCC (arm-none-eabi-gcc) as cross compiler and a fresh version of the nrf51 SDK v6.1.0.0.

    One of include directory is nrf51822/include/s120, which is aligned with the header file provided in the s120 soft device version 1.0.1.

    If you take a look, in the ble_gap.h file contains inside the s120 directory, the structure ble_gap_evt_auth_status_t is like that:

    typedef struct
    {
      uint8_t               auth_status; 
      uint8_t               error_src : 2; 
      uint8_t               bonded : 1; 
      ble_gap_sec_levels_t  sm1_levels;  
      ble_gap_sec_levels_t  sm2_levels;  
      ble_gap_sec_kdist_t   kdist_periph; 
      ble_gap_sec_kdist_t   kdist_central; 
    } ble_gap_evt_auth_status_t;
    

    But, in the device_manager_peripheral.c, it needs to access to periph_kex, element of the ble_gap_evt_auth_status_t structure. This element in the ble_gap.h is not available (as you can see above).

    Same for the function prototype sd_ble_gap_sec_params_reply():

    available: SVCALL(SD_BLE_GAP_SEC_PARAMS_REPLY, uint32_t, sd_ble_gap_sec_params_reply(uint16_t conn_handle, uint8_t sec_status, ble_gap_sec_params_t const *p_sec_params, ble_gap_sec_keyset_t const *p_sec_keyset));

    expected: SVCALL(SD_BLE_GAP_SEC_PARAMS_REPLY, uint32_t, sd_ble_gap_sec_params_reply(uint16_t conn_handle, uint8_t sec_status, ble_gap_sec_params_t const * const p_sec_params));

    I wondering if in the Keil project, the include header file is not the one expected, i.e. s110?

    Thanks in advance

  • I have tried to reproduce the issues, but I am unable to.

    • With which example do you get the compilation error? (Full path.)
    • What exactly is the error message?
  • ble_gap.hHi Terje,

    This is the full path of the project example:

    /SDK/nRF51_SDK_v6.1.0.0/Nordic/nrf51822/Board/nrf6310/s120/ble_app_multilink_peripheral

    These are the errors I got (not exhaustive):

    • nRF51_SDK_v6.1.0.0/Nordic/nrf51822/Source/ble/device_manager/device_manager_peripheral.c:2542:62: error: 'ble_gap_evt_auth_status_t' has no member named 'central_kex'
    • nRF51_SDK_v6.1.0.0/Nordic/nrf51822/Source/ble/device_manager/device_manager_peripheral.c:2544:62: error: 'ble_gap_evt_auth_status_t' has no member named 'periph_kex'
    • nRF51_SDK_v6.1.0.0/Nordic/nrf51822/Source/ble/device_manager/device_manager_peripheral.c:2466:115: error: 'ble_gap_evt_sec_info_request_t' has no member named 'div'
    • nRF51_SDK_v6.1.0.0/Nordic/nrf51822/Source/ble/device_manager/device_manager_peripheral.c:2483:24: error: too few arguments to function 'sd_ble_gap_sec_info_reply'
    • nRF51_SDK_v6.1.0.0/Nordic/nrf51822/Source/ble/device_manager/device_manager_peripheral.c:2499:24: error: too few arguments to function 'sd_ble_gap_sec_params_reply'

    I join the ble_gap.h which is provided with the soft device s120 v1.0.1 and I'm using to see the mismatch.

    Thanks

Related