Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Client side (on the light switch example) to receive broadcast messages

I am estudying and modifying the light switch example.

the example shared in the SDK, this example works as star network. (1 client and 3 (or many) servers) where:

- The client sends (unicast and broadcast) messages to servers

- The server only sends unicast messages (reply) to client.

In this moment I already can to send and receive broadcast messages between the servers, but in this message type, the client side does not treat  the message.

What modification I need to do, to client side "undestand" that him are receiving a broadcast messages?

Parents
  • First off, Bluetooth mesh is not a start network. It is a mesh network with many to many communication capabilities.

    Have you updated the server to send & receive broadcast messages? If so, can you not just make the same modifications to the client example as you did to the server side to receive the broadcast messages?

  • Hi Bjorn

    Have you updated the server to send & receive broadcast messages?

    In the original example (light Switch) the servers already received messages from client, but the server only answer to client. The communication server to server I did it!

    If so, can you not just make the same modifications to the client example as you did to the server side to receive the broadcast messages?

    In the server side I am sending a message with broadcast address 0xCAFE, and in this format all server received the messages. This way, the client side also received the messages, but for some reason this message is not trated

    The problem is that the solution has a list with all the servers provisioned and when I send a broadcast message all servers received (client doesn't receive, because it is not present in this list). I am not sure if this is the real problem.

    My doubt is: How can I send a broadcast message from server side and receive it in the application layer (simple_on_off_client.c)?

    In the device_state_manager.c  there are the follow function that is used when we sent a broadcast messages.

    static bool rx_group_address_get(uint16_t address, nrf_mesh_address_t * p_address)
    {
     dsm_handle_t handle;
     if (address_nonvirtual_subscription_exists(address, &handle))
     {
         p_address->value = address;
         p_address->type = NRF_MESH_ADDRESS_TYPE_GROUP;
         p_address->p_virtual_uuid = NULL;
         return true;
    }
      else
      {
        return false;
      }
    }

    Why in the server side the address_nonvirtual_subscription_exists(address, &handle) function retuns true and in the client side the same function returns false?

Reply
  • Hi Bjorn

    Have you updated the server to send & receive broadcast messages?

    In the original example (light Switch) the servers already received messages from client, but the server only answer to client. The communication server to server I did it!

    If so, can you not just make the same modifications to the client example as you did to the server side to receive the broadcast messages?

    In the server side I am sending a message with broadcast address 0xCAFE, and in this format all server received the messages. This way, the client side also received the messages, but for some reason this message is not trated

    The problem is that the solution has a list with all the servers provisioned and when I send a broadcast message all servers received (client doesn't receive, because it is not present in this list). I am not sure if this is the real problem.

    My doubt is: How can I send a broadcast message from server side and receive it in the application layer (simple_on_off_client.c)?

    In the device_state_manager.c  there are the follow function that is used when we sent a broadcast messages.

    static bool rx_group_address_get(uint16_t address, nrf_mesh_address_t * p_address)
    {
     dsm_handle_t handle;
     if (address_nonvirtual_subscription_exists(address, &handle))
     {
         p_address->value = address;
         p_address->type = NRF_MESH_ADDRESS_TYPE_GROUP;
         p_address->p_virtual_uuid = NULL;
         return true;
    }
      else
      {
        return false;
      }
    }

    Why in the server side the address_nonvirtual_subscription_exists(address, &handle) function retuns true and in the client side the same function returns false?

Children
Related