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

Using Mesh SDK with nRF5_SDK15.0

Hello,

We have developed a GATT based application based on nRF5_SDK_15.0 (Bluetooth LE without mesh). We want to add mesh functionality in this code as you described in this ticket:

https://devzone.nordicsemi.com/f/nordic-q-a/43167/nrf5-to-mesh-upgrade

To achieve this I'm following this guide: https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v3.1.0%2Fmd_doc_getting_started_how_to_nordicSDK.html

I have copied the mesh, models, external and examples folders into SDK 15 project and added paths to the projects. Next it says:

Add the following preprocessor symbols to the nRF5 SDK example's project file:

NRF52_SERIES
NRF_MESH_LOG_ENABLE=NRF_LOG_USES_RTT (because the logging in the mesh stack relies on RTT)
CONFIG_APP_IN_CORE

I'm not sure in which files to add these symbols. Same goes for following piece of code:

#include "nrf_sdh_soc.h"

#define MESH_SOC_OBSERVER_PRIO 0

static void mesh_soc_evt_handler(uint32_t evt_id, void * p_context)
{
nrf_mesh_on_sd_evt(evt_id);
}

NRF_SDH_SOC_OBSERVER(m_mesh_soc_observer, MESH_SOC_OBSERVER_PRIO, mesh_soc_evt_handler, NULL);

Can you please share some more details/documentation how to achieve this? My end goal is to add mesh functionality to already developed GATT application and utilize the (developed) code as it is (if possible). What is more easier, adding SDK15 code to mesh or adding mesh to SDK15?  

  • To test the mesh co-existence, I'm following this method:

    https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v3.1.0/md_examples_sdk_coexist_ble_app_uart_coexist_README.html

    The nrf5SDKforMeshv310src and nRF5_SDK_15.2.0_9412b96 are in the same folder. Also I have set the Tools->Options->Global Macros to correct path of same mesh SDK.

    Still I get the following error:

    E:/folder/nRF Software/nrf5SDKforMeshv310src/mesh/core/src/core_tx_local.c: No such file or directory

    Complete error log is here:

    Building ‘ble_app_uart_pca10040_s132’ from solution ‘ble_app_uart_pca10040_s132’ in configuration ‘Release’
      'Output/ble_app_uart_pca10040_s132 Release/Obj/thumb_crt0.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_log_backend_rtt.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_log_backend_serial.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_log_default_backends.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_log_frontend.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_log_str_formatter.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/app_button.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/app_error.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/app_error_handler_gcc.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/app_error_weak.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/app_fifo.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/app_scheduler.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/app_uart_fifo.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/app_util_platform.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/hardfault_implementation.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_assert.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_atfifo.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_atflags.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_atomic.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_balloc.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_fprintf.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_fprintf_format.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_memobj.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_pwr_mgmt.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_ringbuf.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_section_iter.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_strerror.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/retarget.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/ses_startup_nrf52.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/ses_startup_nrf_common.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/system_nrf52.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/boards.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_drv_clock.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_drv_uart.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrfx_clock.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrfx_gpiote.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrfx_power_clock.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrfx_prs.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrfx_uart.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrfx_uarte.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/bsp.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/bsp_btn_ble.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/main.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/mesh_main.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/SEGGER_RTT.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/SEGGER_RTT_Syscalls_SES.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/SEGGER_RTT_printf.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/ble_advdata.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/ble_advertising.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/ble_conn_params.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/ble_conn_state.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/ble_link_ctx_manager.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/ble_srv_common.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_ble_gatt.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_ble_qwr.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/utf.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/ble_nus.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_sdh.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_sdh_ble.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/nrf_sdh_soc.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/access.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/access_publish.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/access_publish_retransmission.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/access_reliable.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/device_state_manager.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/ad_listener.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/ad_type_filter.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/adv_ext_packet.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/adv_ext_tx.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/adv_packet_filter.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/advertiser.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/bearer_handler.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/broadcast.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/filter_engine.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/gap_address_filter.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/instaburst.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/instaburst_rx.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/instaburst_tx.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/mesh_pa_lna.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/radio_config.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/rssi_filter.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/scanner.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/aes.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/aes_cmac.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/beacon.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/bearer_event.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/cache.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/ccm_soft.o' is up to date
      'Output/ble_app_uart_pca10040_s132 Release/Obj/core_tx.o' is up to date
      Output/ble_app_uart_pca10040_s132 Release/Obj/core_tx_adv.o does not exist.
      Compiling ‘core_tx_adv.c’
      Output/ble_app_uart_pca10040_s132 Release/Obj/core_tx_local.o does not exist.
      Compiling ‘core_tx_local.c’
        E:/folder/nRF Software/nrf5SDKforMeshv310src/mesh/core/src/core_tx_local.c: No such file or directory
      Output/ble_app_uart_pca10040_s132 Release/Obj/core_tx_lpn.o does not exist.
      Compiling ‘core_tx_lpn.c’
      Output/ble_app_uart_pca10040_s132 Release/Obj/enc.o does not exist.
      Compiling ‘enc.c’
    Build failed

  • Have you the put ble_app_uart_coexist folder into the examples/ble_peripheral folder at your nRF5 SDK installation path? 

    Can you try to download a fresh copy of both SDKs and try again?

  • Have you the put ble_app_uart_coexist folder into the examples/ble_peripheral folder at your nRF5 SDK installation path? 

    Yes.

    OK, I'll download the SDK again and try.

  • Downloading the SDK again did the trick, now the project compiles successfully.

Related