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

Parents
  • Hi,

    This seems a bit odd. 

    What example are you basing your project on? Can you give more details on what you have done so far? What modifications have you done? 

    Are you getting any error codes? It is received by the access layer so I assume it is being sent successfully from the server.

    message context (with the destination address as the elements unicast address) instead of using the default publish parameters

    Can you elaborate on this?

  • I have added generic onoff server and client models to provisioner example to be able to communicate with light and light switch examples. I will have many light (publish and subscribed to 0xc000 and 0xc001 respectively) and light switches (publish and subscribed to 0xc001 and 0xc000 respectively) in the network. 

    I want to send a message from either light or light switch specifically to the provisioner node if I want to remotely un-provision them. To do this from one of the light nodes(onoff server), I am sending a status message using 

    bt_mesh_onoff_srv_pub(&srv, &ctx, &status);
    ctx.addr= PROVISIONER_ADDRESS;
    ctx.app_idx= 0;
    ctx.send_rel=true;
    ctx.send_ttl= BT_MESH_TTL_DEFAULT;
    status.present_on_off = false;// use false to send remote reset request message
    context details mentioned above. I am able to see this message reach the access layer in the provisioner example by enabling the access layer debug option in the proj conf. No error codes.
    When I send the message using NULL instead of the ctx, I reaches the model and gets the status to the status_handler in the provisioner's client model.
    When I use bt_mesh_onoff_cli_set_unack(&client, &ctx, &set); using the same context settings from one of the light switches, the message reaches the model layer in the provisioner and the corresponding set_handler is called.
    I am not sure whats going on here..
Reply
  • I have added generic onoff server and client models to provisioner example to be able to communicate with light and light switch examples. I will have many light (publish and subscribed to 0xc000 and 0xc001 respectively) and light switches (publish and subscribed to 0xc001 and 0xc000 respectively) in the network. 

    I want to send a message from either light or light switch specifically to the provisioner node if I want to remotely un-provision them. To do this from one of the light nodes(onoff server), I am sending a status message using 

    bt_mesh_onoff_srv_pub(&srv, &ctx, &status);
    ctx.addr= PROVISIONER_ADDRESS;
    ctx.app_idx= 0;
    ctx.send_rel=true;
    ctx.send_ttl= BT_MESH_TTL_DEFAULT;
    status.present_on_off = false;// use false to send remote reset request message
    context details mentioned above. I am able to see this message reach the access layer in the provisioner example by enabling the access layer debug option in the proj conf. No error codes.
    When I send the message using NULL instead of the ctx, I reaches the model and gets the status to the status_handler in the provisioner's client model.
    When I use bt_mesh_onoff_cli_set_unack(&client, &ctx, &set); using the same context settings from one of the light switches, the message reaches the model layer in the provisioner and the corresponding set_handler is called.
    I am not sure whats going on here..
Children
No Data
Related