Can I access the BLE mesh unicast address in my firmware after provisioning?

Hello all,

I’ve already looked in the following files:

C:\ncs\v3.1.0\zephyr\include\zephyr\bluetooth\mesh\access.h
C:\ncs\v3.1.0\zephyr\include\zephyr\bluetooth\mesh\main.h

But I can’t find where to get the BLE Mesh unicast address of the node I’m testing.
The node is already provisioned into a mesh network and is working.

Could anyone point me to a variable, struct, or function in the Zephyr 3.1.0 APIs that provides the node’s BLE Mesh unicast address? I’d be really grateful.

  • Sorry, I need it because my network is always set up in a static way, like this:

    Group 1:

    Node 2

    Node 3

    Group 2:

    Node 4

    Node 5

    ...and so on.

    If a node knows its own primary unicast address, it can also determine its group partner:

    Even-numbered nodes know their partner is the next node.

    Odd-numbered nodes know their partner is the previous node.

    This way, they can communicate with each other, and when I use my phone app, I can address them through their group address.

Related