<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Can I access the BLE mesh unicast address in my firmware after provisioning?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123864/can-i-access-the-ble-mesh-unicast-address-in-my-firmware-after-provisioning</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Aug 2025 10:13:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123864/can-i-access-the-ble-mesh-unicast-address-in-my-firmware-after-provisioning" /><item><title>RE: Can I access the BLE mesh unicast address in my firmware after provisioning?</title><link>https://devzone.nordicsemi.com/thread/546877?ContentTypeID=1</link><pubDate>Wed, 27 Aug 2025 10:13:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8055b588-0854-43ac-be49-4c7e135b42b1</guid><dc:creator>Julian1999</dc:creator><description>&lt;p&gt;Sorry, I need it because my network is always set up in a static way, like this:&lt;/p&gt;
&lt;p&gt;Group 1:&lt;/p&gt;
&lt;p&gt;Node 2&lt;/p&gt;
&lt;p&gt;Node 3&lt;/p&gt;
&lt;p&gt;Group 2:&lt;/p&gt;
&lt;p&gt;Node 4&lt;/p&gt;
&lt;p&gt;Node 5&lt;/p&gt;
&lt;p&gt;...and so on.&lt;/p&gt;
&lt;p&gt;If a node knows its own primary unicast address, it can also determine its group partner:&lt;/p&gt;
&lt;p&gt;Even-numbered nodes know their partner is the next node.&lt;/p&gt;
&lt;p&gt;Odd-numbered nodes know their partner is the previous node.&lt;/p&gt;
&lt;p&gt;This way, they can communicate with each other, and when I use my phone app, I can address them through their group address.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I access the BLE mesh unicast address in my firmware after provisioning?</title><link>https://devzone.nordicsemi.com/thread/546814?ContentTypeID=1</link><pubDate>Tue, 26 Aug 2025 19:39:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36960829-fe0c-4b56-9f0d-c3ae5102eef2</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;&lt;span&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/bluetooth/mesh/access.h#L158"&gt;comp-&amp;gt;elem[0]-&amp;gt;rt-&amp;gt;addr&lt;/a&gt; will give the unicast address of the primary element, as suggested if node is provisined. It&amp;#39;s still not clear why you need this. Could you elaborate on your use case?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I access the BLE mesh unicast address in my firmware after provisioning?</title><link>https://devzone.nordicsemi.com/thread/546714?ContentTypeID=1</link><pubDate>Tue, 26 Aug 2025 07:33:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b9ceacb-ede4-406f-ae7e-6d52686b89e2</guid><dc:creator>Julian1999</dc:creator><description>&lt;p data-start="208" data-end="275"&gt;I noticed there are two different &lt;code data-start="242" data-end="252"&gt;access.h&lt;/code&gt; files in NCS v3.1.0:&lt;/p&gt;
&lt;ul data-start="277" data-end="645"&gt;
&lt;li data-start="277" data-end="414"&gt;
&lt;p data-start="279" data-end="414"&gt;&lt;code data-start="279" data-end="332"&gt;C:\ncs\v3.1.0\zephyr\subsys\bluetooth\mesh\access.h&lt;/code&gt; (the source file, ~121 lines, includes functions like &lt;code data-start="387" data-end="411"&gt;bt_mesh_primary_addr()&lt;/code&gt;)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="415" data-end="645"&gt;
&lt;p data-start="417" data-end="645"&gt;&lt;code data-start="417" data-end="478"&gt;C:\ncs\v3.1.0\zephyr\include\zephyr\bluetooth\mesh\access.h&lt;/code&gt; (the header that actually gets pulled in by &lt;code data-start="523" data-end="559"&gt;#include &amp;lt;zephyr/bluetooth/mesh.h&amp;gt;&lt;/code&gt;, which is much larger but doesn&amp;rsquo;t include functions like &lt;code data-start="617" data-end="641"&gt;bt_mesh_primary_addr()&lt;/code&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="647" data-end="689"&gt;When I include Mesh in my project using:&lt;/p&gt;
&lt;div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary"&gt;
&lt;div class="sticky top-9"&gt;
&lt;div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"&gt;
&lt;div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs"&gt;&lt;span class="" data-state="closed"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="overflow-y-auto p-4" dir="ltr"&gt;&lt;code class="whitespace-pre! language-c"&gt;&lt;span&gt;&lt;span class="hljs-meta"&gt;#&lt;span class="hljs-keyword"&gt;include&lt;/span&gt;&lt;/span&gt; &lt;span class="hljs-string"&gt;&amp;lt;zephyr/bluetooth/mesh.h&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p data-start="734" data-end="820"&gt;it pulls in the &lt;code data-start="750" data-end="760"&gt;access.h&lt;/code&gt; from &lt;code data-start="766" data-end="786"&gt;zephyr/include/...&lt;/code&gt;, not the one from &lt;code data-start="805" data-end="817"&gt;subsys/...&lt;/code&gt;.&lt;/p&gt;
&lt;p data-start="822" data-end="839"&gt;So my question is:&lt;/p&gt;
&lt;ul data-start="841" data-end="1094"&gt;
&lt;li data-start="841" data-end="954"&gt;
&lt;p data-start="843" data-end="954"&gt;Do I need to include another header file explicitly to get access to functions like &lt;code data-start="927" data-end="951"&gt;bt_mesh_primary_addr()&lt;/code&gt;?&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="955" data-end="1094"&gt;
&lt;p data-start="957" data-end="1094"&gt;Or is there a missing &lt;code data-start="979" data-end="989"&gt;prj.conf&lt;/code&gt; setting&amp;nbsp;that controls whether those APIs appear in the generated &lt;code data-start="1081" data-end="1091"&gt;access.h&lt;/code&gt;?&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I access the BLE mesh unicast address in my firmware after provisioning?</title><link>https://devzone.nordicsemi.com/thread/546656?ContentTypeID=1</link><pubDate>Mon, 25 Aug 2025 17:27:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9332c67-33cb-49eb-9ac8-2f9e2cbab8d7</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;&lt;span&gt;The bt_mesh_primary_addr()&lt;/span&gt;&amp;nbsp;is at&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/ncs-v3.1.0/subsys/bluetooth/mesh/access.h#L56"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/ncs-v3.1.0/subsys/bluetooth/mesh/access.h#L56&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/ncs-v3.1.0/subsys/bluetooth/mesh/access.c#L1140"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/ncs-v3.1.0/subsys/bluetooth/mesh/access.c#L1140&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I access the BLE mesh unicast address in my firmware after provisioning?</title><link>https://devzone.nordicsemi.com/thread/546571?ContentTypeID=1</link><pubDate>Mon, 25 Aug 2025 08:14:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc00c459-2c7d-44fc-9f53-7154c49a231f</guid><dc:creator>Julian1999</dc:creator><description>&lt;p&gt;Hallo Amanda,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m talking about the primary unicast address.&lt;br /&gt;After looking into the .c files, I found the following function: bt_mesh_primary_addr().&lt;br /&gt;This function gives me the address, but for some reason it&amp;rsquo;s not present in access.h, even though it is in access.c.&lt;br /&gt;Why is this the case?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Julian L.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I access the BLE mesh unicast address in my firmware after provisioning?</title><link>https://devzone.nordicsemi.com/thread/546359?ContentTypeID=1</link><pubDate>Thu, 21 Aug 2025 14:27:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2203d8e3-4f27-46dd-9d09-186c877393ab</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Not sure why you need it. However, you can read out the unicast address of each element from here (after the node is provisioned): &lt;a title="https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/bluetooth/mesh/access.h#l158" href="https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/bluetooth/mesh/access.h#L158" rel="noopener noreferrer" target="_blank"&gt;https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/bluetooth/mesh/access.h#L158&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;There is no unicast address of the node. Each element has its own unicast address. The address of the element with index zero is named the primary address.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>