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.

Parents Reply
  • I noticed there are two different access.h files in NCS v3.1.0:

    • C:\ncs\v3.1.0\zephyr\subsys\bluetooth\mesh\access.h (the source file, ~121 lines, includes functions like bt_mesh_primary_addr())

    • C:\ncs\v3.1.0\zephyr\include\zephyr\bluetooth\mesh\access.h (the header that actually gets pulled in by #include <zephyr/bluetooth/mesh.h>, which is much larger but doesn’t include functions like bt_mesh_primary_addr()).

    When I include Mesh in my project using:

    #include <zephyr/bluetooth/mesh.h>

    it pulls in the access.h from zephyr/include/..., not the one from subsys/....

    So my question is:

    • Do I need to include another header file explicitly to get access to functions like bt_mesh_primary_addr()?

    • Or is there a missing prj.conf setting that controls whether those APIs appear in the generated access.h?

Children
Related