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

1 Master Multi Slave Mesh Network

So I have implemented the UART BLE mesh code as mentioned in
devzone.nordicsemi.com/.../send-and-receive-a-string-via-access-layer .

Now I am able to take inputs from the UART port of the client  and send it to the UART port of the Server. But I am unable to do vice versa.

Interestingly, when I change the destination address in the send function from 0xCAFE to 0x0001 which is the provisioner address(in this case the client) the string I send from the server is printed on the debug terminal of the client.But I am unable to find the place where it is received in the client code.

I checked and it does not come into the handle_incoming() function as is the case with the => Client to Server communication.

Can you please help me figure this out?

  • Hi,

    I don't think the client address is 0x0001. As far as I understand the client node has 4 element, one (0x0001) is the provisioner and then 0x0002, 0x0003, 0x0004 are the address of the clients, respectively. 

    You can check this using dsm_local_unicast_addresses_get() function to get the local unicast address range of the node. 

    Note that on the client, the model only handle SIMPLE_ON_OFF_OPCODE_STATUS opcode .

     

  • Dear Hung,

    Thanks for the reply.Yes by changing the address to 0x002 the data is arriving at the client and  the string I am sending from the server is being handled inside the handle_incoming() function.

  • So I have been able to send and receive UART data from the client to server using the UART mesh example above.

    But now consider the case where I have multiple clients (Lets say 2 Clients) and 20 Servers.How do I make sure that a particular server only gets provisioned to a particular client.

    Consider this,I want 10 servers to connect to client 1 and form the first mesh network,similarly I want the remaining 10 servers to connect to client 2 to form a separate mesh network.

    What parameter can I control to make sure that a server will connect to a particular client only and not to any other client?

  • There are multiple ways to do that. You can either configure the first 10 servers to subscribe to a particular group address (0xCAFE for example) then the other 10 servers to subscribe to another group address (e.g 0xCAFF ). Then you set up the client 1 to publish to 0xCAFE and client 2 to publish to 0xCAFF. 

     

    Another option is to use different subnets. You decide a node to be in a subnet when doing provisioning, just add the subnet's network key in addition to the global network key. 

  • I have implemented the above using SDK for Mesh_v1.0.1 & nRF5 SDK_14.2.0.I am facing some issues in the mesh communication.From the forums I have figured out that the latest mesh release is the most stable.

    So now I need to implement the above code using SDK for Mesh_v2.0.1 & nRF5 SDK_15.0.0_a53641a which is the latest release.

    Can you please help me to do that?

Related