<?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>Zigbee code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74492/zigbee-code</link><description>Hi, 
 I would like to write a code where I send a packet from a nRF5340 DK to another nRF5340 DK by using Zigbee. 
 I would like to also be able to use printk and see the printout in PuTTY so that I can see the time I send the packet and and receive the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 May 2021 12:01:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74492/zigbee-code" /><item><title>RE: Zigbee code</title><link>https://devzone.nordicsemi.com/thread/309774?ContentTypeID=1</link><pubDate>Fri, 14 May 2021 12:01:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c021137-bcab-4c8f-91ec-0fc2c3c33a17</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sorry for the delayed response.&lt;/p&gt;
&lt;p&gt;There are multiple clusters that are able to send that, but is it some specific type of data or simply to send a message that is the size of 10 bytes? You can find a list over different ZCL attribute data types in our SDK&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__zb__zcl__common__attrs.html?cp=7_3_5_1_1_1_0_0_29#gad511c15105fdaaa77480162bc730505f"&gt;here&lt;/a&gt;. However, to send a ZCL command or read a ZCL attribute, you will have to use a specific cluster. You can also check out&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group___z_b___z_c_l___c_o_m_m_a_n_d_s.html"&gt;ZCL commands shared by all clusters&lt;/a&gt;. There you will find information about command sending and parsing, read/write requests and more.&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: Zigbee code</title><link>https://devzone.nordicsemi.com/thread/307304?ContentTypeID=1</link><pubDate>Wed, 28 Apr 2021 15:39:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7da4eb0-b385-41d8-8475-443cea42a97d</guid><dc:creator>mihsa</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you again for the quick reply.&lt;/p&gt;
&lt;p&gt;I forgot to mention this before but I had another question.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you asked about if there were any specific kind if packet I wanted to send, the answer is that I want to send 10 bytes data, do you have any suggestions on how i can do that?&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;Mihsa&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee code</title><link>https://devzone.nordicsemi.com/thread/307255?ContentTypeID=1</link><pubDate>Wed, 28 Apr 2021 12:33:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:465bf7d9-cc70-4882-a471-b9799ab92158</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The Time cluster in Zigbee provides a basic interface to a real-time clock. We do not have any samples using this cluster in NCS, but we do have support for it, and the API can be found&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/zboss/3.5.0.0/group___z_b___z_c_l___t_i_m_e.html"&gt;here&lt;/a&gt;. You can also read about it in the ZCL specification.&lt;/p&gt;
&lt;p&gt;We do not have any official samples for simply RTC in NCS, but there is an unofficial sample&amp;nbsp;&lt;a href="https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/nrfx/rtc"&gt;here&lt;/a&gt;. This sample is for the nRF9160, but it is also relevant for nRF5340. Please be aware that NCS is based on Zephyr, which is a RTOS using threads. Thus, using the RTC driver directly is not recommended. You can read more about this in&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/71977/how-to-use-of-rtc-to-wake-up-from-sleep"&gt;this case&lt;/a&gt;&amp;nbsp;about nRF5340 and RTC.&lt;/p&gt;
&lt;p&gt;As for libraries, the nrfx drivers are not documented in NCS yet, but you can find&amp;nbsp;the RTC driver on infocenter&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/drivers_nrfx_v2.4.0/group__nrf__rtc.html"&gt;here&lt;/a&gt;. We are working on bringing the nrfx documentation from infocenter into NCS. You can find the nrfx drivers on github&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/nrfx"&gt;here&lt;/a&gt;, and in the SDK they are located in&amp;nbsp;&amp;lt;ncs_directory&amp;gt;/modules/hal/nordic/nrfx/drivers.&lt;/p&gt;
&lt;p&gt;You also have Zephyr&amp;#39;s&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/zephyr/reference/peripherals/counter.html#counter-api"&gt;Counter library&lt;/a&gt;.&amp;nbsp;Zephyr does not have its own RTC library, as all RTC peripherals are currently implemented through the Counter library, with device-specific API for counters with real-time support, such as our nrfx drivers above.&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: Zigbee code</title><link>https://devzone.nordicsemi.com/thread/307158?ContentTypeID=1</link><pubDate>Wed, 28 Apr 2021 08:03:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c3aab5c-3651-4622-b331-d93b6f31f9e9</guid><dc:creator>mihsa</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for the reply,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is there any example code or library that can show me how to code real-time clock(RTC)? Or is there code and functions for that in ZCL?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Mihsa&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee code</title><link>https://devzone.nordicsemi.com/thread/307152?ContentTypeID=1</link><pubDate>Wed, 28 Apr 2021 07:33:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7185a6a8-1f31-4369-bb49-386ebb8abdbc</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you want to create your own application, I recommend using one of the samples in NCS as a starting point and remove, add, and change things as you need in&amp;nbsp;that sample. Both the light bulb and the light switch are good starting points.&lt;/p&gt;
&lt;p&gt;Are there any specific type of packets you want to send, or do you just want to send a packet using Zigbee? Zigbee uses something called Clusters, which are libraries that define attributes, commands, behaviors etc. of that specific library.&amp;nbsp;If there is something specific, you should therefore use whatever cluster library fits your goal. If you just want to send a packet and it does not matter what kind of packet, then you can use the samples in NCS as they are, as they send packets when they do Zigbee things, such as the light switch sending a Zigbee packet when it sends an ON or OFF command to the light bulb. If you want to read about the different clusters in our SDK, you can check them out in our&amp;nbsp;documentation for the Zigbee stack&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/zboss/3.5.0.0/group___z_b___z_c_l___c_l_u_s_t_e_r_s.html"&gt;here&lt;/a&gt;. You can also check out the Zigbee Cluster Library specification by the Zigbee Alliance.&lt;/p&gt;
&lt;p&gt;If you want to print something in PuTTY, I recommend using the&amp;nbsp;Logging API&amp;nbsp;in Zephyr. There is also logging for the Zigbee stack as well. Both of these are enabled with the CONFIG_LOG option. You also have Zigbee endpoint logger library, which provides an endpoint handler for parsing and logging incoming ZCL (Zigbee Cluster library) frames with all their fields. There are multiple resources available regarding this, so I will link them here, and I recommend looking at them to figure out what you want to use.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/zephyr/reference/logging/index.html#logging-api"&gt;Logging API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/nrf/ug_zigbee_configuring.html#custom-logging-per-module"&gt;Custom logging per module in Zigbee&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/nrf/ug_zigbee_configuring_libraries.html#configuring-zigbee-endpoint-logger"&gt;Configuring Zigbee endpoint logger&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/nrf/include/zigbee/zigbee_logger_eprxzcl.html#lib-zigbee-logger-endpoint"&gt;Zigbee endpoint logger&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/nrf/gs_testing.html"&gt;Testing a sample application&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Another tool you can use if you want to analyze network traffic more, in addition to prints or logs, is the&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;.&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>