Send string with Bluetooth Mesh and NRF Connect SDK V1.9.0

Hi all!

I'm new to mesh bluetooth technology and I'm stuck with some bugs. 

I am using the development boards nrf52dk and my goal is to create a network of about 6 nodes and send a string (maximum 60 characters) to all of them.

I'm currently using the NRFConnect v1.9.0 SDK and I've been relying on the provided examples of "mesh chat", "Light control" and documentation related to creating custom mesh models.
With these 3 sources I modified the Light control example and I made to compile it and run.

However, after doing the provisioning process (through nordic mesh app) and trying to send a string I get the following warning and errors:

"<wrn> bt_mesh_transport: No matching TX context for ack<ESC>"
"<err> bt_mesh_transport: No multi-segment message contexts available<ESC>"
"<err> bt_mesh_access: Failed to publish (err -16)<ESC>"

Someone can please tell me what the problem could be? (Besides I'm a newbie :P)
Is there any other example that I should base myself on?

Thanks in advance to anyone who can help me.

Parents
  • Hi,

    Since you wanna send strings, the Mesh chat example would be the best one to use as a reference. 

    Can you provide the full logs and call stack? 

  • Hi Mttrinh,

    First, I apologize for the late response and thank you in advance for your help.

    After reading your answer I created a new version of my code based only on the "mesh chat" example.
    So I simplified some of the functionality of the chat example, being only interested in the functionality of sending messages to all nodes (at the same time) and receiving messages.

    My goal is to send a string (maximum 60 characters) to all nodes on the network after an event occurs, such as pressing a button.

    As in the previous approach I can compile the code and run it in the DK. However, after performing the provisioning process, I still receive some warnings as you can see from the logs.
    I'm doing something wrong in the provisioning process in the NRF Mesh app?

    Do you think generating an interrupt by pressing the button to send the message to all nodes on the network is a good idea? Or it may generate problems in the mesh network's operability?

    Thank you once again.

    Best Regards,
    ISilva

    My app logs:

    proj.conf file:


  • Hi,

    ISilva said:
    I'm doing something wrong in the provisioning process in the NRF Mesh app?

    Can you describe steb-by-step how you are doing the provisioning? Are you configuring device after you done provisioning? When do you get these warnings?

    ISilva said:
    Do you think generating an interrupt by pressing the button to send the message to all nodes on the network is a good idea? Or it may generate problems in the mesh network's operability?

    Typo: It shouldn't cause any problems. Our examples from the SDK are already doing this.

  • Hi!

    Thanks for answering my question.

    As I said before my “code base” is the chat example. In the future, the objective is to connect a “custom specific sensor” to all nodes and send the information from this sensor (among other informations) via string. For now, the goal is just to configure the entire mesh network and push a button on one node and the string will be sent to all other nodes.

    So, from this example I removed the shell functions and replaced it with a simple "printk" just to check that everything is working fine, I also comment out some "bt_mesh_chat_cli_handlers" that I won't need:


    Now answering your questions:

    Can you describe step-by-step how you are doing the provisioning?

    1. After building the code, I program all the nodes (I'm currently using only 3);
    2. Next, I use the “nrf mesh app” on my smartphone to configure the network and do the provisioning process;
    3. I start by creating a new group and then add all the non-provisioned nodes;
    4. For the OOB type, I select the option “No OOB” and then I receive a popup message informing that the configuration is complete;
    5. Next, in the node elements, I choose the supplier module and bind an “appKey” (key1, I use the same for all 3 nodes);
    6. Now, I configure the publish settings: the address with the group address created earlier, the publication period is set to an interval of 10 seconds, and I disable the publication relay (the Retransmission count and interval fields are disabled);
    7. To finish the node configuration, I subscribe to the group created earlier;
    8. Repeat this process once for each node.

     

    Are you configuring device after you done provisioning?

    Yes, I do this after point 4 I mentioned earlier

     

    When do you get these warnings?

    I got these warnings a few seconds after setting up the mesh network, even without pressing any buttons on the development board.


    Thanks again

  • Hi.

    Looking at the provisioning process, it looks like everything is done correcly. Not exactly sure why you get these warnings, are you unable to publish after you get those warnings?

    I would suggest you try with an unmodified version of the "mesh chat" example and see that everything works fine then make small implementation/changes and check that everything is working fine until you see the same issue. This way at least you know where and what is causing these warnings. 

  • Hi! Thanks for answering my questions once again. I will follow your advice. Then I'll let you know how it went.

    One last question, I know that there is an example that indicates how to execute the provisioning process, but what about configuring each node to which group it can publish or subscribe?

    For my project it would be necessary to perform these actions without having to use the nrf mesh app on the smartphone.

    Thanks.

Reply
  • Hi! Thanks for answering my questions once again. I will follow your advice. Then I'll let you know how it went.

    One last question, I know that there is an example that indicates how to execute the provisioning process, but what about configuring each node to which group it can publish or subscribe?

    For my project it would be necessary to perform these actions without having to use the nrf mesh app on the smartphone.

    Thanks.

Children
  • Hi,

    I assume you are referring tot the example found in the zephyr folder. Unfortunately, we don't have any samples that show how you can configure the publish/subscription address for node but have a look at this for the APIs to do so.

  • Hi!
    Sorry again for the late reply.

    I can now perform the exchange of messages based on the chat example. It was a problem with the way I was declaring the button of the dev kit and there was also a problem with the string that a wanted to send.

    My problem now is figuring out how I can subscribe to a group or an address without using the nrf mesh app.

    As soon as i succeed i will let you know.

    Thanks.