How to add mesh into nRF5 SDK v14.1/v15 BLE application ?

What do I need to know to add mesh functionality into a normal BLE application ?

Parents
  • This is an update for combining Mesh SDK v2.0.1 and nRF5 SDK v15

     

    In Mesh SDK v2.0.1 it's now easier to be used concurrently with the SDKv15. There is only a few modification needed. 

    To add mesh into your BLE project you would need:

    • Extract a fresh copy of nRF Mesh SDK to \components\mesh

    • Include all the source file from Mesh example you want to clone. 

    • Include all header folders from Mesh example in Project Option -> Common -> Preprocessor -> Include Directories

    • Include Preprocessor Definitions in mesh example ( same setting tab as above).

    • Remove mesh_softdevice_init.c and any call to it in main.c The softdevice is handled by nrf_sdk_ble module already. 
    • Edit main.c to add mesh init functions and defines.
    • Add nrf_mesh_evt_handler to SOC observer list with NRF_SDH_SOC_OBSERVER for example:

      void nrf_mesh_evt_handler(uint32_t sys_evt, void * p_context) {

       nrf_mesh_on_sd_evt(sys_evt);
      

      }

      NRF_SDH_SOC_OBSERVER(m_nrf_mesh_observer, 0, nrf_mesh_evt_handler, NULL);

    • Increase BLE advertising interval. We are seeing Mesh performance affected when advertising interval <100ms. 

     

    Attached here is an example combining ble_app_uart with light switch server. To test this you would need:

    • Extract nRF Mesh SDK into \SDKv15\components\mesh
    • Extract the example into \SDKv15\examples\ble_peripheral
    • Test it using the mesh's light switch provisioner and client in Mesh SDK v2.0.1

     

    ble_app_uart_mesh_SDK2_0_1.zip

     

     

     

     

     

     

  • Hi  Hung Bui,

    ble_app_uart_mesh_SDK2_0_1.zip is working on DK board PCA10040 under SEGGER Embedded studio.

    But when flashing the *exe files to a custom board using nrfjprog or nRFgo studio, the board do not advertise. I checked whether flashing is done normally or not by blinking LED.  

    I questioned this problem on the below url.

    https://devzone.nordicsemi.com/f/nordic-q-a/40805/flashing-ble_app_uart_mesh-to-a-nrf52832-custom-board-it-does-not-advertise

    I have modifed the ble_app_uart_mesh for my applications, flashing with nrfjprog is fine but no advertising !

    Is there some setup issue on segger ?

    Any tips or guide? Anyone have same issue?

Reply Children
No Data