Skip to main content
Anitha
Associate III
May 5, 2020
Question

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);

  • May 5, 2020
  • 1 reply
  • 578 views

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.

    This topic has been closed for replies.

    1 reply

    Winfred LU
    ST Employee
    May 11, 2020

    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.