Not able to receive status messages published by onoff Server using message context instead of default publish parameters set by provisioner

Hello,

I am trying to send status messages to a Client model with a specific unicast address on one node. This node's parent element has both generic onoff server and client models implemented. All onoff server and client models across all nodes are configured to publish and subscribe to specific group addresses (0xc000 and 0xc001 respectively). When I try to publish a status message to this client model using the message context (with the destination address as the elements unicast address) instead of using the default publish parameters, it does get received by the access layer but, not by the client model (breakpoint at status handler does not hit).

When I publish a get/set message to the server model in the same element, using the same context instead of the default publish parameters, it gets received by the model (breakpoint at get/set handlers get hit). Am I missing something here? Please suggest.

I am working with NCS 1.9.1 on nRF52480 DK's

  • Hello Andreas,

    You must be referring to the code I had originally posted. I had attached a test code only targeting this issue to my previous comment "3750.sample.zip". With this code and configuration, I had no reset issues and the ctx was initialized as recommended(line 70 in model_handler_light.c)

    regarding the step 2 you had recommended, I do not want the onoff models in the provisioner to publish/subscribe to any group addresses. My idea is to send unicast messages to these models from the server/client nodes. As long as they are assigned the same app_key, I believe they should be able to receive unicast messages directed only to them.

    I am able to send contextual unicast messages from the light_switch to the provisioner. My issue is only with the ligh not being able to send status messages to the provisioner(i.e reaches the access layer but not the model).

    Thank you for your assistance so far. Awaiting your advise.

    Regards,

    Susheel

  • Hi,

    Susheel said:
    You must be referring to the code I had originally posted.

    Yes, thats correct, as my colleague had performed the test which led to the suggestion below.

    I've relayed this information to them and will follow up with a reply as soon as I hear back from them

    Kind regards,
    Andreas

  • Hi again,

    I heard back from the Mesh team and their response was: In model_handler_light.c, when instantiating 
    struct bt_mesh_onoff_status (line 69), it should be cleared before used, otherwise there will be garbage in it, e.g using designated initializers.

    Kind regards,
    Andreas

  • Sorry for the late reply Andreas, this fix worked for my setup. I appreciate your dedicated support.

  • Hi,

    No worries about the response time! Glad to hear that the fix worked for you! Unless you have any additional questions related to this issue, I will be closing this case by the end of the day. Feel free to open new ones and link to this case if you have new issues with the same setup in the future!

    Kind regards,
    Andreas

Related