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

How to add UART into MESH by following the example given?

Hi, 

As if we follow the steps given in the link for the update for combining Mesh SDK v2.0.1 and nRF5 SDK v15 posted by Hung Bui, I found out several problems related to the steps:

1.For the first step:

In nRF Mesh SDK file, we couldn't find 'mesh' file in the components. Do we need to create a new file or any other solutions?

2. For the second step:

How to include the source file from Mesh example?

3.For step sixth step:

How to edit main.c to add mesh init functions and defines? Any example?

 

Also, as if i want to test whether i did it successfully, what should I do?

Parents
  • Hi,

    The main idea in the answer Hung Bui posted was to add mesh to a BLE project (i.e. adding the mesh sdk to the nrf5 sdk v15).

    1) You will need to create a new folder under nRF5_SDK_15.0.0_a53641a\components\, call that folder mesh & add the mesh sdk v2.0.1 files under the mesh folder.

    2) I think it is best for you to open up the ble_app_uart Segger Embedded Studio (SES) peripheral example from sdk 15, open up a light switch example (e.g. server example) from mesh sdk v2.0.1 & download the zip file that Hung provides in his answer (ble_app_uart_mesh_SDK2_0_1.zip). Then, if you compare the uart example with the mesh light switch server example, you notice that a lot of source files are missing from the uart example that are there in the ble_app_uart_mesh_SDK2_0_1 example. 

    To explain it simply, you will need to add the following folders with the included source files to the ble_app_uart example: access, bearer, Configuration Model, Health Model, Mesh stack, Mesh_application, Mesh_Core, Provisioning, SimpleOnOffModel, uECC.

    3) Like in step 2 above, take a look at the zip file that Hung provided & compare & contrast the uart example main file with the mesh light switch example main file & the merged uart_mesh_light_switch example.

    4) To test the example, follow the guidelines Hung uses: light switch provisioner and client in Mesh SDK v2.0.1 & test like you would test the ble_app_uart example.

  • Hi,

    If I want to add the missing source file into the answer provided, how should I do? Do I need to put them into Preprocessor definition? The figure below shows the interface that refers to preprocessor definition. 

    I tried to drag the sources file directly into the project items but the software doesn't detect the source files.

    Any other way to solve this? 

  • Could you please update your image to be bigger. I cannot read what it is saying. I would recommend taking a look at these youtube videos provided to get started with Segger Embedded Studios. You will need to include the header files in the preprocessor user include directories in SES. The source files (i.e. .c files) can be included in the folders by right clicking on the folder you want to include the source files in & pressing Add Existing File.

  • Hi Bjorn. 

    Thanks for your reply in advance.

    However, after I have tried to add all the source files by using "add existing file" and include the header files in the preprocessor, I encountered problem as shown in the figure below.

    May I know how to solve the problems, which are "stray '\' in program" and "in expansion of macro 'C' "?

    Even though I didn't make any modification on the code, but there is still error. Note that I am using this example (ble_app_uart_mesh_SDK2_0_1.zip).

Reply
  • Hi Bjorn. 

    Thanks for your reply in advance.

    However, after I have tried to add all the source files by using "add existing file" and include the header files in the preprocessor, I encountered problem as shown in the figure below.

    May I know how to solve the problems, which are "stray '\' in program" and "in expansion of macro 'C' "?

    Even though I didn't make any modification on the code, but there is still error. Note that I am using this example (ble_app_uart_mesh_SDK2_0_1.zip).

Children
  • Hi Farhanah,

    Did you follow the steps provided here in Hung Bui's updated answer?

    I followed the steps provided after the comment "Attached here is an example combining ble_app_uart with light switch server. ":

    Just extract a new mesh sdk v2.0.1 into sdk15/components/mesh/. You will need to create a mesh folder. Then it should look similar to this:

    Add the example folder under ble_peripheral like shown:

    If you get a compile error regaring the _putchar function, take a look at the answer posted here. I tested this & the example compiled correctly without any issues.

    Kind Regards,

    Bjørn

Related