cancel
Showing results for 
Search instead for 
Did you mean: 

What actually means elementNumber in STSW_BNRG_Mesh code and app. I don't understnd the calculation part node address = BluenrgMesh_GetAddress(); elementNumber = ((dst_peer - nodeAddress)+1);

Anitha
Associate III

0693W000000WulWQAS.pngHi Sir/Madam,

In STblemesh app after configuring the node we can observe node number also element number. what elementNumber  means in the app. Also in the firmware part calculated element number following way. Can you explain why we calculated this way.

node address = BluenrgMesh_GetAddress();

 elementNumber = ((dst_peer - nodeAddress)+1);

Regards,

Anitha.

1 REPLY 1
Winfred LU
ST Employee

Nodes can have multiple, constituent parts, each of which can be independently controlled.These parts are called elements in BLE mesh terminology.

A typical example is that you have a lighting product having 3 LED lights, then this node will have 3 elements.

By default, the addresses of elements are sequentially initialized, each node increasing 1 over the node address (base).

So this line

elementNumber = ((dst_peer - nodeAddress)+1);

calculates which element it is.