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:

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

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?  

Parents
  • Hi,

    To add the preprocessor symbols, do this:

    In SES, right click on your project in the left pane -> "Edit Options" -> In the upper-left corner change it from "Debug" to "Common" -> In the left pane under "Code" press "Preprocessor" -> "Preprocessor Definitions", press the "..." button on the right -> Add the symbols here.

    As for the piece of code you mentioned, add it to your main.c file.

    What is more easier, adding SDK15 code to mesh or adding mesh to SDK15?  

    This depends on the complexity of your application and what you need to add. Haven't tested this myself so I'm not sure but I think it might be easier to add SDK15 code to a mesh example.

  • Yes, you should be able to send data through the mesh network and access the nodes through a mobile app.

    Aftab said:
    Does it mean we will be able to access the same UUIDs as we were doing before but with longer distances because of mesh?

     Not totally sure what you mean by this. You will still be able to access to the same UUIDs. You will also be able to send data over longer distances.

  • Our mobile app currently accesses the UUIDs of the device to exchange data with it. What I mean by above comment is if we can use same mobile app (with little changes like addition of provisioning etc.) and also have mesh functionality with greater range (due to mesh topology).

  • Yes, you should be able to use the same mobile :) 

  • 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:

  • 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?

Reply
  • 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?

Children
  • 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.

  • Glad it worked out :) 

  • Thanks for the help.

    I was also able to integrate the mesh into SDK (Including nRF5 SDK for Mesh functionality in an nRF5 SDK example) using this method:

    infocenter.nordicsemi.com/.../md_doc_getting_started_how_to_nordicSDK.html

    I could access the SDK functionality (accessing UUIDs) through nRFConnet app. But my nRF Mesh could not search the device.

    I wonder how the two stacks (mesh and PtoP) communicated internally and how PtoP UUIDs are accessed via mesh? I assume that if we need to use long range of mesh, we will need to call the mesh APIs from mobile app and then, somehow, pass on the commands/data to the PtoP UUIDs. I could not find any document that explains how to do that. Can you help is this regard?

  • Hi,

    You can't find the device with nRF Mesh unless you have PB-GATT and proxy featured enabled. It is a bit unclear what your goal is, could you elaborate?

    If you have look at the UART coexistence example, you can see how the UART and Mesh functionality works together. From this example, the phone is writing a hexadecimal ASCII codes equivalent to one of the digits (1, 2, 3, or 4) in the UART RX characteristic to simulate a button press. The " button press" will then send a message through the mesh to turn on/off a LED on the server board.