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

nRFConnect to a Mesh light server with custom service-characteristics

Hi Nordic, I would like to be able to connect to a Mesh node server from Mesh SDK light control example, add a service with a characteristic and change the characteristic in nRF Connect App.

My goal is to update advertising data from a custom characteristic value on my light control server mesh node. I added advertisement and it works, I see my mesh light server node in nRFConnect.

Now I try to add a characteristic in a custom service, like in service beginner's tuto, but Mesh SDK doesnt use same libraries to init advertising, etc. Is there something I should check different than trying to add nRF BLE library in SES IDE in order to add service like in the service/characteristic tutorial. Am I on the right way trying to do this. Is there something I could miss in the way I try to add a service to the Mesh light server node.

Thanks a lot.

  • Hi,

    I recommend moving the mesh stack repository into the Nordic nRF5 SDK examples folder and include the necessary source files in the Nordic nRF5 SDK project that you want to use.

    Please see this page for more information.

  • Hi, thanks for your answer. That's because I would like to stay in SES at the moment and avoid Keil license to build/link the project, but I appreciate your recommendation I will try this as I have access to a full Keil on another computer. Thank you again.

  • Hi,

    You can import the Keil project from the SDK into SES, and continue to use SES. See this blog post for a guide on how to do that. If there is any specific example in the SDK you want a SES project for, I can upload it here for you.

  • Hi, The app_template with the mesh integrated would be so mush appreciate, then I will have to merge with the main.c file of the server light control mesh SDK exemple to have the Mesh running. About that, I have a question, should I plan to change duty cycle receiving of the mesh core to let some place for the gatt/gap, because in the mesh with advertising it uses the mesh core to advertise (put in the queue), so I'm think it might have some issue around that. What do you thing? Is my question clear enough? Thank you.

  • Hi,

    Regarding the "duty cycle", that seems like a good idea. From the link I first posted:

    Concurrent SoftDevice and mesh activity

    By design, the SoftDevice activity is prioritized over mesh activity. Therefore, you should keep the connection and advertisement intervals used by the SoftDevice as large as possible (i.e. infrequent) when using Bluetooth low energy connections. If scanning, keep the scan duty cycle as low as possible. You should also reduce mesh activity while the SoftDevice is doing fast advertising and continue normal activity after a connection is established.

    I have created a SES project for ble_app_template for SDK 12.3. I used SES version 3.26a. You should only need to unzip, and place the files in the folder SDK_folder\examples\ble_peripheral\ble_app_template\pca10040\s132\arm5_no_packs for it work. It's unfortunately not integrated with mesh, but it should maybe give you a starting point so you can integrate the mesh into the template example.

    Attachment:

    SES_ble_app_template_pca10040_s132_SDK12_3.rar

Related