<?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>NRF52840 Zigbee CLI example but in code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80667/nrf52840-zigbee-cli-example-but-in-code</link><description>Hello, 
 
 I am trying to configure a Zigbee coordinator as done in the CLI example (for example &amp;#39;bdb role zc&amp;#39; and &amp;#39;bdb start&amp;#39;) to get data from the multi sensor example, but instead of doing this over the CLI, I am trying to achieve this in the code</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Nov 2021 10:30:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80667/nrf52840-zigbee-cli-example-but-in-code" /><item><title>RE: NRF52840 Zigbee CLI example but in code</title><link>https://devzone.nordicsemi.com/thread/338527?ContentTypeID=1</link><pubDate>Thu, 11 Nov 2021 10:30:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae1574fc-d7c3-44b9-a9df-057d62792708</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Sebastiaan,&lt;/p&gt;
&lt;p&gt;The response&amp;nbsp;should contain a list of available interfaces, but there are no interfaces in your response, so the tool does not see your device. If you are using a DK for the sniffer you must use the nRF USB, not the USB connecter J2, as seen in&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/nrf802154_sniffer.html?cp=8_3_4_4_0_2#nrf802154_sniffer_connect"&gt;Connecting the sniffer to the host&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 Zigbee CLI example but in code</title><link>https://devzone.nordicsemi.com/thread/338157?ContentTypeID=1</link><pubDate>Tue, 09 Nov 2021 12:19:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03e711ae-0c24-41e6-a153-be02992f2b73</guid><dc:creator>Sebastiaan</dc:creator><description>&lt;p&gt;Hello Marte,&lt;/p&gt;
&lt;p&gt;I am trying the link you suggested. What I&amp;#39;ve done so far:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Flashed the third NRF52 development kit with the &amp;#39;nrf802154_sniffer.hex&amp;#39; file.&lt;/li&gt;
&lt;li&gt;Copied the nrf802154_sniffer.py into the Global Extcap path of WireShark (/Applications/Wireshark.app/Contents/MacOS/extcap)&lt;/li&gt;
&lt;li&gt;Verified that the file can be ran and that the output is the same as the tutorial&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The response of running the python file is:&lt;/p&gt;
&lt;p&gt;extcap {version=0.7.2}{help=github.com/.../nRF-Sniffer-for-802.15.4}{display=nRF Sniffer for 802.15.4}&lt;br /&gt;control {number=6}{type=button}{role=logger}{display=Log}{tooltip=Show capture log}&lt;/p&gt;
&lt;p&gt;However, when I boot WireShark, the NRF extcap is not detected. Any idea what could be the cause?&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Sebastiaan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 Zigbee CLI example but in code</title><link>https://devzone.nordicsemi.com/thread/335793?ContentTypeID=1</link><pubDate>Mon, 25 Oct 2021 14:14:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2cac8ca-1c0d-4240-8bdb-31bf24191a44</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Sebastiaan,&lt;/p&gt;
&lt;p&gt;Then there is something else wrong with the command. Getting a sniffer log would be very helpful for figuring out what might be causing it.&lt;/p&gt;
&lt;p&gt;I am sorry about that. The guide under&amp;nbsp;&lt;strong&gt;nRF Tools&amp;nbsp;&lt;/strong&gt;in the documentation has guides for installing on macOS as well:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_sniffer_802154/UG/sniffer_802154/intro_802154.html"&gt;nRF Sniffer for 802.15.4&lt;/a&gt;. For installing the plugin in Wireshark you can&amp;nbsp;check out&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_sniffer_802154/UG/sniffer_802154/installing_sniffer_802154_plugin.html"&gt;Installing the nRF Sniffer capture plugin in Wireshark&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 Zigbee CLI example but in code</title><link>https://devzone.nordicsemi.com/thread/335497?ContentTypeID=1</link><pubDate>Fri, 22 Oct 2021 12:58:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd27e171-6420-4f94-8554-68b86f10eefb</guid><dc:creator>Sebastiaan</dc:creator><description>&lt;p&gt;Hi Marte,&lt;/p&gt;
&lt;p&gt;Thank you for clarifying the byte-order. However, with the correct endianness, the bind still fails.&lt;/p&gt;
&lt;p&gt;I do have a third NRF52840DK which I can configure as a nRF sniffer. I looked at the installation guide, added the files to /extcap (Python file and .bat file), configured the preferences but I cannot find the extcap option for the nrf sniffer in WireShark itself. I am currently on a macOS Big Sur (M1). However, the installation guide is quite unclear for mac users.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Sebastiaan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 Zigbee CLI example but in code</title><link>https://devzone.nordicsemi.com/thread/335469?ContentTypeID=1</link><pubDate>Fri, 22 Oct 2021 11:32:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0b67c0c-4ddc-40ba-bdea-b64c45c0aa3a</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Sebastiaan,&lt;/p&gt;
&lt;p&gt;The second byte order, starting with 0x6C and ending with 0xF4, is the correct one. The nRF 802.15.4 radio driver use little-endian for addresses, so the address should start with the least-significant byte.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you still get &amp;quot;Uninplemented signal (signal 21, status 0)&amp;quot; after using little-endian? If so, could you get a sniffer log of the behavior and upload it here as a pcap file? Please make sure to start the sniffer before starting the network so the sniffer has the network key. You can use&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/nrf802154_sniffer.html"&gt;nRF Sniffer for 802.15.4&lt;/a&gt;&amp;nbsp;to get a sniffer log if you have an additional nRF52840 DK or Dongle.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 Zigbee CLI example but in code</title><link>https://devzone.nordicsemi.com/thread/335418?ContentTypeID=1</link><pubDate>Fri, 22 Oct 2021 08:31:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c013d56-c03b-4564-accc-3dfdcf1f8cea</guid><dc:creator>Sebastiaan</dc:creator><description>&lt;p&gt;Hi Marte,&lt;/p&gt;
&lt;p&gt;thanks for the explanation!&lt;/p&gt;
&lt;p&gt;I have a few questions:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;regarding your comment &amp;quot;Additionally, source endpoint and source address should be that of the multi sensor, and not of the coordinator.&amp;quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I think I implemented it correctly unless I misunderstood this comment?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt; regarding the byte order of the 64-bit addresses in the memory:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;My initial thought (hardcoding) was that if my address was &amp;quot;&lt;span&gt;0xf4ce36f7a5db776c&amp;quot;, that&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;p_req-&amp;gt;src_address[0] = 0xF4;
...
p_req-&amp;gt;src_address[7] = 0x6C;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;However, I see now that with the function below:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;zb_ieee_addr_t ieee_addr;
zb_osif_get_ieee_eui64(ieee_addr);&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The byte order is&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;p_req-&amp;gt;src_address[0] = 0x6C;
...
p_req-&amp;gt;src_address[7] = 0xF4;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Which one is the correct implementation?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks a lot for your help so far&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sebastiaan&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 Zigbee CLI example but in code</title><link>https://devzone.nordicsemi.com/thread/335129?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 13:51:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62dd1345-21a8-40bd-976c-af50f08bab0e</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Sebastiaan,&lt;/p&gt;
&lt;p&gt;You should use&amp;nbsp;ZB_BIND_DST_ADDR_MODE_64_BIT_EXTENDED as destination address mode for the bind request. Additionally, source endpoint and source address should be that of the multi sensor, and not of the coordinator.&lt;/p&gt;
&lt;p&gt;You should not hardcode in the short address of the device, as this address is not static and will change if the network data on the device is erased. This is what you should use the match descriptor for, as the match descriptor will give you the short address and endpoint of the device. Please see the light switch example to see how to use the match descriptor request for this.&lt;/p&gt;
&lt;p&gt;Hardcoding the long addresses will work in this case, as they will not changed, but it is not recommended. A device can get it&amp;#39;s own long address with the function&amp;nbsp;zb_osif_get_ieee_eui64():&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;zb_ieee_addr_t ieee_addr;
zb_osif_get_ieee_eui64(ieee_addr);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Getting another device&amp;#39;s long address is a bit more work, but if you have the short address, which you should have from the match descriptor request in this case, you can get it by sending a an&amp;nbsp;IEEE_addr_req with&amp;nbsp;zb_zdo_ieee_addr_req(). In the case of the light switch example where the light bulb short address is&amp;nbsp;m_device_ctx.bulb_params.short_addr you can get the long address with the following code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief A callback called on EUI64 address response.
 *
 * @param[in] bufid Reference number to ZBOSS memory buffer.
 */
static zb_void_t zb_resolve_ieee_addr_cb(zb_bufid_t bufid)
{
    zb_zdo_ieee_addr_resp_t * p_resp = (zb_zdo_ieee_addr_resp_t *)zb_buf_begin(bufid);
    zb_char_t addr_buf[2 * 8 + 1];    /* 8 bytes (2 characters) plus one byte for null-terminator. */

    if (p_resp-&amp;gt;status == ZB_ZDP_STATUS_SUCCESS)
    {
        ZB_LETOH64(m_device_ctx.bulb_params.nwk_addr.addr_long, p_resp-&amp;gt;ieee_addr_remote_dev);
        UNUSED_RETURN_VALUE(ieee_addr_to_str(addr_buf, sizeof(addr_buf), m_device_ctx.bulb_params.nwk_addr.addr_long));
        NRF_LOG_INFO(&amp;quot;Received EUI64 address for device 0x%04x -&amp;gt; %s.&amp;quot;, m_device_ctx.bulb_params.short_addr, NRF_LOG_PUSH(addr_buf));

    }
    else
    {
        NRF_LOG_WARNING(&amp;quot;Unable to resolve EUI64 source address. Status: %d\r\n&amp;quot;,
                        p_resp-&amp;gt;status);
    }

    zb_buf_free(bufid);
}


/**@brief Resolve EUI64 by sending IEEE address request.
 *
 * @param[in] bufid     Reference number to ZBOSS memory buffer.
 * @param[in] nwk_addr  Network address to be resolved.
 */
static zb_void_t zb_resolve_ieee_addr()
{
    zb_zdo_ieee_addr_req_param_t * p_req = NULL;
    zb_uint8_t                     tsn = 0;
    zb_bufid_t                     bufid;
    bufid = zb_buf_get_out();

    // Create new IEEE address request and fill with default values.
    p_req = ZB_BUF_GET_PARAM(bufid, zb_zdo_ieee_addr_req_param_t);
    p_req-&amp;gt;start_index  = 0;
    p_req-&amp;gt;request_type = 0;
    p_req-&amp;gt;nwk_addr     = m_device_ctx.bulb_params.short_addr;
    p_req-&amp;gt;dst_addr     = p_req-&amp;gt;nwk_addr;
    tsn = zb_zdo_ieee_addr_req(bufid, zb_resolve_ieee_addr_cb);
    if (tsn == ZB_ZDO_INVALID_TSN)
    {
        NRF_LOG_WARNING(&amp;quot;Failed to send IEEE address request for address: 0x%04x&amp;quot;, m_device_ctx.bulb_params.short_addr);
        zb_buf_free(bufid);
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Note that here I have added&amp;nbsp;zb_addr_u nwk_addr to&amp;nbsp;light_switch_sensor_params_t and is using that to store the long address of the light bulb.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 Zigbee CLI example but in code</title><link>https://devzone.nordicsemi.com/thread/334856?ContentTypeID=1</link><pubDate>Tue, 19 Oct 2021 12:07:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcb06dd5-c9b7-4921-b144-d396e042e854</guid><dc:creator>Sebastiaan</dc:creator><description>&lt;p&gt;Hi Marte,&lt;/p&gt;
&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;I am currently implementing it as you suggested.&lt;/p&gt;
&lt;p&gt;First, I send a match description with two in clusters (0x0402 and 0x0403). This is then linked to a callback function which checks if there is a match (length &amp;gt; 0).&lt;/p&gt;
&lt;p&gt;In this callback function, I am currently trying to bind to the cluster with hardcoded values. For the simulated pressure and temperature sensor, the long address is &amp;quot;0xf4ce36f7a5db776c&amp;quot; and for the coordinator it is &amp;quot;0xf4ce36bccb118deb&amp;quot;.&lt;/p&gt;
&lt;p&gt;I am hardcoding the bind request as following:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;zb_zdo_bind_req_param_t * p_req;
zb_bufid_t                buffer_test;
zb_ret_t                  zb_err_code;
zb_bool_t                 bind;
buffer_test = zb_buf_get_out();

p_req = ZB_BUF_GET_PARAM(buffer_test, zb_zdo_bind_req_param_t);

// Set temp/pressure sensor addr
p_req-&amp;gt;src_address[0] = 0xF4;
p_req-&amp;gt;src_address[1] = 0xCE;
p_req-&amp;gt;src_address[2] = 0x36;
p_req-&amp;gt;src_address[3] = 0xF7;
p_req-&amp;gt;src_address[4] = 0xA5;
p_req-&amp;gt;src_address[5] = 0xDB;
p_req-&amp;gt;src_address[6] = 0x77;
p_req-&amp;gt;src_address[7] = 0x6C;

p_req-&amp;gt;src_endp = 10;

// Set coordinator addr
p_req-&amp;gt;dst_address.addr_long[0] = 0xF4;
p_req-&amp;gt;dst_address.addr_long[1] = 0xCE;
p_req-&amp;gt;dst_address.addr_long[2] = 0x36;
p_req-&amp;gt;dst_address.addr_long[3] = 0xBC;
p_req-&amp;gt;dst_address.addr_long[4] = 0xCB;
p_req-&amp;gt;dst_address.addr_long[5] = 0x11;
p_req-&amp;gt;dst_address.addr_long[6] = 0x8D;
p_req-&amp;gt;dst_address.addr_long[7] = 0xEB;

p_req-&amp;gt;dst_endp = 64;
p_req-&amp;gt;cluster_id = 0x0402;
p_req-&amp;gt;req_dst_addr = 0xECA1;
p_req-&amp;gt;dst_addr_mode = ZB_APS_ADDR_MODE_16_ENDP_PRESENT;

zb_zdo_bind_req(buffer_test, zb_bind_callback);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;However, when the bind function is executed, it hangs on the line and the callback function is not called. I see on the coordinator debug that it states &amp;quot;Uninplemented signal (signal 21, status 0)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any idea how to progress?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 Zigbee CLI example but in code</title><link>https://devzone.nordicsemi.com/thread/334330?ContentTypeID=1</link><pubDate>Fri, 15 Oct 2021 11:44:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e77e91ea-b38b-497d-9485-f4d9c0ae134a</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Sebastiaan,&lt;/p&gt;
&lt;p&gt;You will find the implementation of all of these commands in the CLI library files. If you search for a command in the files, e.g. &amp;#39;zdo match_desc&amp;#39;, you should be able to find the relevant code, as the commands are in the comment description of the respective functions.&lt;/p&gt;
&lt;p&gt;To scan for devices with the temperature and pressure clusters in the network you send a match descriptor request with those two clusters, using &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__zdo__disc.html?cp=8_3_5_1_2_2_42#ga0d31f0e0c17f783f700af04c74b7fee2"&gt;zb_zdo_match_desc_req()&lt;/a&gt;. There is an example of how to use this in the documentation of the function. It is also used in the light switch example to find light bulbs, so you can look there as well. You must create a buffer with the parameters of zb_zdo_match_desc_param_t (see &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/structzb__zdo__match__desc__param__s.html"&gt;zb_zdo_match_desc_param_s&lt;/a&gt; for a description of the parameters),&amp;nbsp;as you can see is done in the examples I mentioned. The command should be broadcasted, so nwk_addr og addr_of_interest should be either ZB_NWK_BROADCAST_ALL_DEVICES or ZB_NWK_BROADCAST_RX_ON_WHEN_IDLE. You can find the available cluster IDs in &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__zb__zcl__common__types.html?cp=8_3_5_1_1_1_0_20#gac30c5e06ead6e5db312176e4b4c766c8"&gt;zb_zcl_cluster_id_e&lt;/a&gt;. Use the callback function of the match descriptor request to get the response, so that you get the address and endpoint of the&amp;nbsp; temperature/pressure device, as in the light switch example (find_light_bulb_cb).&lt;/p&gt;
&lt;p&gt;To bind the endpoints, send a bind request using &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__zdo__bind.html?cp=8_3_5_1_2_3_29#ga403cbc689175cec5196544d784d5b067"&gt;zb_zdo_bind_req()&lt;/a&gt;. An example of how to use this is in the documentation of the function. Create a buffer for zb_zdo_bind_req_param_t (see &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/structzb__zdo__bind__req__param__s.html"&gt;zb_zdo_bind_req_param_s&lt;/a&gt;). Use ZB_APS_ADDR_MODE_16_ENDP_PRESENT as address mode, as you have the 16-bit short address of the device from the match descriptor request.&lt;/p&gt;
&lt;p&gt;The &amp;#39;zcl subscribe&amp;#39; command configures attribute reporting. For this I would recommend looking at how this is implemented in the CLI library, which you can find in the file zigbee_cli_cmd_attr_report.c. You should also check out &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__cfg__reporting__cmd.html"&gt;Configure reporting command sending and parsing&lt;/a&gt; and &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__report__attr__cmd.html"&gt;Report attribute command parsing&lt;/a&gt; in our documentation.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 Zigbee CLI example but in code</title><link>https://devzone.nordicsemi.com/thread/334298?ContentTypeID=1</link><pubDate>Fri, 15 Oct 2021 09:49:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9cfe7085-51b0-4084-852e-c93fe6086178</guid><dc:creator>Sebastiaan</dc:creator><description>&lt;p&gt;Hello Marte, thanks for your reply!&lt;/p&gt;
&lt;p&gt;I am just trying to execute the CLI logic but in code&lt;/p&gt;
&lt;p&gt;So I want to have a coordinator that scans the devices in the network (from the multi sensor example the temperature and pressure sensors).&lt;/p&gt;
&lt;p&gt;I want to then bind and subscribe on those as done in the CLI example. Finally, I would like to print out the values received.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Sebastiaan&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 Zigbee CLI example but in code</title><link>https://devzone.nordicsemi.com/thread/334117?ContentTypeID=1</link><pubDate>Thu, 14 Oct 2021 11:30:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f2cf590-e8ee-42aa-a781-e139df2efa75</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Sebastiaan,&lt;/p&gt;
&lt;p&gt;Could you please specify what functionality you want?&lt;/p&gt;
&lt;p&gt;You can find the implementation of CLI commands in the files located in&amp;nbsp;&amp;lt;SDK_ROOT&amp;gt;/components/zigbee/cli. The commands you mention can be found in&amp;nbsp;zigbee_cli_cmd_bdb.c, for example the function cmd_zb_start() for the &amp;#39;bdb&amp;nbsp;start&amp;#39; command. You will see in the functions that the CLI library does a lot of additional things and checks which are not needed&amp;nbsp;if you are to use the Zigbee functionality directly.&lt;/p&gt;
&lt;p&gt;If you want to implement coordinator functionality you can look at the Zigbee Light Coordinator from the Light Control example, which can be found in&amp;nbsp;&lt;span&gt;&amp;lt;SDK_ROOT&amp;gt;/&lt;/span&gt;examples/zigbee/light_control/light_coordinator. This is a simple coordinator with no additional functionality other than being a Zigbee coordinator.&lt;/p&gt;
&lt;p&gt;To set the coordinator role use the following:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;zb_set_network_coordinator_role&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;IEEE_CHANNEL_MASK&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For the coordinator you must also set maximum children. This can for example be set to 10:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;zb_set_max_children&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;MAX_CHILDREN&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To start the stack (&amp;#39;bdb start&amp;#39;) you must use one of the zboss start functions, either&amp;nbsp;zboss_start() or&amp;nbsp;zboss_start_no_autostart(), depending on whether you want to initialize the radio and start commissioning, or if you want to delay commissioning.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>