<?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>Is it possible to implement all 3 zigbee roles in single project?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114194/is-it-possible-to-implement-all-3-zigbee-roles-in-single-project</link><description>As the question explained. I want to know if we can implement all three zigbee roles viz, Edge, Router and Co-Ordinator in a single project and can be able to switch them based on runtime variables (calling different functions based on this variable)</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Aug 2024 08:18:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114194/is-it-possible-to-implement-all-3-zigbee-roles-in-single-project" /><item><title>RE: Is it possible to implement all 3 zigbee roles in single project?</title><link>https://devzone.nordicsemi.com/thread/499688?ContentTypeID=1</link><pubDate>Mon, 26 Aug 2024 08:18:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5d16766-ac21-4a10-9612-312527f0c670</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hi Kalyan, &lt;/p&gt;
[quote user=""]&lt;p&gt;I tried&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_ZIGBEE_ROLE_ROUTER=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_ZIGBEE_ROLE_EDGE=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_ZIGBEE_ROLE_COORDINATOR=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;in prj.conf file but throwing up errors.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;These Kconfig symbols are choices, meaning only one of them can be y-selected at a time. See the source code fore the choice in NCS v2.7.0 &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.7.0/subsys/zigbee/Kconfig#L80-L92"&gt;here&lt;/a&gt;.&lt;/p&gt;
[quote user=""]Is this even possible?[/quote]
&lt;p&gt;You can select the role in runtime if you configure it before the ZBOSS stack starts. This is done in the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/nrf/samples/zigbee/shell/README.html"&gt;Zigbee: Shell sample&lt;/a&gt;, specifically in the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/nrf/samples/zigbee/shell/README.html#testing"&gt;Testing section&lt;/a&gt;. The sample is built with &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.7.0/samples/zigbee/shell/prj.conf#L30"&gt;CONFIG_ZIGBEE_ROLE_ROUTER=y&lt;/a&gt; and the coordinaator role is selected with the &lt;code&gt;bdb role zc&lt;/code&gt; command. You can select the end device role with &lt;code&gt;bdb role zed&lt;/code&gt;. The shell sample does not currently support setting the device role as ZED. See the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/nrf/libraries/zigbee/shell.html#zigbee_shell_command_list"&gt;Zigbee shell command list for all available shell commands&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/v2.7.0/subsys/zigbee/lib/zigbee_shell"&gt;source code&lt;/a&gt; for the Zigbee shell should also be relevant for your case, in particular &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.7.0/subsys/zigbee/lib/zigbee_shell/src/zigbee_shell_cmd_bdb.c"&gt;zigbee_shell_cmd_bdb.c&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>