<?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 throughtput test</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35412/zigbee-throughtput-test</link><description>Hi, 
 
 I would like to test the ZigBee throughput like the examples (&amp;quot;ATT_MTU Throughput Example&amp;quot; for BLE and &amp;quot;Thread Throughput Measurement Application&amp;quot;). 
 I&amp;#39;m not familiar with ZigBee (I read about it but I&amp;#39;m still learning). I started from the example</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Jun 2018 13:45:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35412/zigbee-throughtput-test" /><item><title>RE: ZigBee throughtput test</title><link>https://devzone.nordicsemi.com/thread/137117?ContentTypeID=1</link><pubDate>Thu, 21 Jun 2018 13:45:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:518be63e-5acb-48d2-9b18-7bf2a3b4446c</guid><dc:creator>Nicolas Kauffmann</dc:creator><description>&lt;p&gt;Ok perfect. Thanks !&lt;/p&gt;
&lt;p&gt;Nicolas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ZigBee throughtput test</title><link>https://devzone.nordicsemi.com/thread/137060?ContentTypeID=1</link><pubDate>Thu, 21 Jun 2018 11:00:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fcd62a6-2734-4017-83ef-5cbe4812467e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When you are talking about 250 kbps, I suppose you are referring to the on-air datarate of the 802.15.4 radio? This is the datarate on the PHY layer, specified in 802.15.4 specifications. You will noe be able to achievable this throughput in application.&lt;/p&gt;
&lt;p&gt;This is mainly because of protocol architecture and limitations, i.e.:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A payload with data is only a part of 802.15.4 frame, a big portion of the frame is consumed by different headers e.g. MAC header, NWK header, etc.&lt;/li&gt;
&lt;li&gt;Before another packet is sent the source node has to wait for an ACK frame from the destination node to get a confirmation that current frame reached the destination.&lt;/li&gt;
&lt;li&gt;802.15.4 specification implies that two consecutive packets cannot be sent without waiting IFS (Inter-frame spacing) time – this is to give the other side time to process packets.&lt;/li&gt;
&lt;li&gt;CSMA-CA procedure delays sending a packet if channel is busy due to another radio activity.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We do not have throughput measurements for Zigbee yet, but for Thread a point to point throughput in a typical condition is about 80 kbps. Zigbee should have similar numbers.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ZigBee throughtput test</title><link>https://devzone.nordicsemi.com/thread/136907?ContentTypeID=1</link><pubDate>Wed, 20 Jun 2018 12:40:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28bda670-7130-47bc-ae9d-4451026b16d9</guid><dc:creator>Nicolas Kauffmann</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you !&lt;/p&gt;
&lt;p&gt;It works but I have a few more questions if you don&amp;#39;t mind :&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve read that a ZigBee packet is 127 bytes (payload) (up to 133 bytes (with headers)).&lt;/p&gt;
&lt;p&gt;When I send at 50ms during one second (20 frames), it gives me:&lt;/p&gt;
&lt;p&gt;133 * 8 = 1064 bits&lt;/p&gt;
&lt;p&gt;1064 * 20 (frames) = 21280 bits -&amp;gt; 21kbps&lt;/p&gt;
&lt;p&gt;Am I correct ?&lt;/p&gt;
&lt;p&gt;If I want to reach (approximatively) the 250 kbps announced by Nordic, I can decrease the period but if it&amp;#39;s too low I have memory buffer problem, ZB_GET_OUT_BUF_DELAYED returns RET_ERROR indefinitely.&lt;/p&gt;
&lt;p&gt;Does this throughput (250kbps) is reachable only at lower layer as you suggested earlier ?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Nicolas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ZigBee throughtput test</title><link>https://devzone.nordicsemi.com/thread/136613?ContentTypeID=1</link><pubDate>Mon, 18 Jun 2018 17:42:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72aa0a97-4099-4247-866d-39742c84414e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I got some help with this from one of our Zigbee developers. We have created an example that you can use for testing throughput.&lt;/p&gt;
&lt;p&gt;There is at least one issue in your code, you should not use &amp;quot;&lt;code&gt;ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT&lt;/code&gt;&amp;quot;. Groupcast is actually a broadcast and is limited. There is a special table to keep track of broadcast messages, because those packets are just retransmitted by every node couple of times. All nodes try to keep track of which messages they&amp;#39;ve already transmitted, so they do not cause a broadcast storm.&lt;/p&gt;
&lt;p&gt;A couple of things you should consider when measuring throughput:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You should not use broadcast transmission to measure throughput (groupcast).&lt;/li&gt;
&lt;li&gt;It is worth having a second device that will accept those &amp;quot;custom&amp;quot; commands to avoid traffic containing error messages.&lt;/li&gt;
&lt;li&gt;Going from light sample example with coordinator may be easier (there is an explicit place where you read light bulb&amp;#39;s address). Although to avoid going through coordinator to the second node it is worth powering it off after the commissioning and reset all devices.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The&amp;nbsp;attached file contains an example based on the light_switch example in the SDK for Thread and Zigbee v1.0.0. It have been tested with 50ms intervals and there seems to be pretty traffic without crashes at this rate. Please check the patch file for diff towards original example.&amp;nbsp;&lt;br /&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-db8bae9ff7b542cfa9efde5bbe23707e/light_5F00_switch_5F00_throughput.zip"&gt;devzone.nordicsemi.com/.../light_5F00_switch_5F00_throughput.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-db8bae9ff7b542cfa9efde5bbe23707e/diff.patch"&gt;devzone.nordicsemi.com/.../diff.patch&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ZigBee throughtput test</title><link>https://devzone.nordicsemi.com/thread/136405?ContentTypeID=1</link><pubDate>Fri, 15 Jun 2018 14:57:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d42ebf1e-a09e-4332-a128-d6fdbf6bc7b6</guid><dc:creator>Nicolas Kauffmann</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is my function to send a frame:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static zb_void_t send_frame(zb_uint8_t param)
{
    static zb_uint8_t cmd_id = 0;
    zb_uint16_t group_id = DEFAULT_GROUP_ID;
    zb_buf_t * p_buf = ZB_BUF_FROM_REF(param);

    zb_uint32_t data = 0xAAAABBBB;

    cmd_id = !cmd_id;

    /* initialize a ZCL packet */
    zb_uint8_t * _ptr = zb_zcl_start_command_header(p_buf, ZB_ZCL_CONSTRUCT_FRAME_CONTROL(ZB_ZCL_FRAME_TYPE_CLUSTER_SPECIFIC,  
                               ZB_ZCL_NOT_MANUFACTURER_SPECIFIC,                                                               
                               ZB_ZCL_FRAME_DIRECTION_TO_SRV, ZB_ZCL_DISABLE_DEFAULT_RESPONSE), 0, cmd_id, NULL);   

    /* fill in the packet data */
    ZB_ZCL_PACKET_PUT_DATA32(_ptr, &amp;amp;data);

    /* finalize and send the packet */
    zb_ret_t zb_ret = zb_zcl_finish_and_send_packet(p_buf, _ptr,(zb_addr_u*) &amp;amp;group_id, ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT, 0, LIGHT_SWITCH_ENDPOINT, ZB_AF_HA_PROFILE_ID, ZB_ZCL_CLUSTER_ID_ON_OFF, NULL); 
    if (zb_ret != RET_OK)
    {
        NRF_LOG_ERROR(&amp;quot;zb_ret = %d&amp;quot;, zb_ret);
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I call &amp;quot;&lt;em&gt;ZB_GET_OUT_BUF_DELAYED&lt;/em&gt;&amp;quot; with app_timer and yes I&amp;#39;ve seen that there is a memory pool of buffers so I checked the return but I don&amp;#39;t get any error even though I send every ms.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I changed what you said which is in the macro function ZB_ZCL_SEND_COMMAND_SHORT_WITHOUT_ACK but I don&amp;#39;t see any call to this function (maybe used in the library ?). And unfortunately, the result doesn&amp;#39;t change.&lt;/p&gt;
&lt;p&gt;I&amp;#39;d like to measure the throughput on ZCL layer but if I could measure it on APS first, it would be nice.&lt;/p&gt;
&lt;p&gt;I enabled all the logs and I don&amp;#39;t know if it can help but here is what I get when it blocks:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app: frame_received = 14 param = 11
&amp;lt;info&amp;gt; zboss:  93 C2 D6 C4 00 80 DE AD|........
&amp;lt;info&amp;gt; zboss:  12 02 F3 0C 35 00 1A 08|....5...
&amp;lt;info&amp;gt; zboss:  60 01 06 00 00 00 01 00|`.......
&amp;lt;info&amp;gt; zboss:  00 00 DE AD 12 02 F3 0C|........
&amp;lt;info&amp;gt; zboss:  36 00 1A 08 76 01 06 00|6...v...
&amp;lt;info&amp;gt; zboss:  00 00 01 00 00 00 DE AD|........
&amp;lt;info&amp;gt; zboss:  47 01 13 0D 37 00 00 00|G...7...
&amp;lt;info&amp;gt; zboss:  10 3D 61 88 F5 0D 91 38|.=a....8
&amp;lt;info&amp;gt; zboss:  AA 11 BA 08 12 FD FF 11|........
&amp;lt;info&amp;gt; zboss:  BA 1E 19 16 B6 A7 E8 69|.......i
&amp;lt;info&amp;gt; zboss:  1B 05 69 28 19 00 00 00|..i(....
&amp;lt;info&amp;gt; zboss:  16 B6 A7 E8 69 1B 05 69|....i..i
&amp;lt;info&amp;gt; zboss:  00 45 98 6E 6E 1C 84 CF|.E.nn...
&amp;lt;info&amp;gt; zboss:  68 C8 9A 31 80 7F 60 58|h..1..`X
&amp;lt;info&amp;gt; zboss:  BC DD CF 56 1D E0 FA DE|...V....
&amp;lt;info&amp;gt; zboss:  AD 0F 81 13 0D 37 00 00|.....7..
&amp;lt;info&amp;gt; zboss:  00 10 05 02 00 F5 00 80|........
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and when it&amp;#39;s OK:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;OK
&amp;lt;info&amp;gt; app: frame_received = 18 param = 5
&amp;lt;info&amp;gt; zboss:  00 80 DE AD 12 02 DC 21|.......!
&amp;lt;info&amp;gt; zboss:  3D 00 1A 08 60 01 06 00|=...`...
&amp;lt;info&amp;gt; zboss:  00 00 01 00 00 00 DE AD|........
&amp;lt;info&amp;gt; zboss:  12 02 DC 21 3E 00 1A 08|...!&amp;gt;...
&amp;lt;info&amp;gt; zboss:  76 01 06 00 00 00 01 00|v.......&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Nicolas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ZigBee throughtput test</title><link>https://devzone.nordicsemi.com/thread/136342?ContentTypeID=1</link><pubDate>Fri, 15 Jun 2018 11:49:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e10ac9d-7e8f-4583-ab73-0bd83364d4a0</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Your method seems fine, we are looking into implementing something similar ourself. One thing you should do (if not done already) is to disable&amp;nbsp;&amp;quot;ZCL Default Response&amp;quot;. Are you checking if you are&amp;nbsp;recieving &amp;quot;RET_OK&amp;quot; status while calling &amp;quot;&lt;em&gt;ZB_GET_OUT_BUF_DELAYED&lt;/em&gt;&amp;quot;? The amount of buffers is limited, but checking the status should give you an idea when to stop feeding stack with frames.&lt;/p&gt;
&lt;p&gt;There is also a question on the definition of throughput, would like to measure on MAC, NWK, APS, ZCL layer? This will affect results due to increasing amount of ACKs and retransmissions.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In order to measure throughput without APS ACKs, you have to modify &amp;quot;include/zcl/zb_zcl_commands.h&amp;quot; header:&lt;br /&gt; @lines 264-266 you find:&lt;br /&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/*ZB_SCHEDULE_CALLBACK(zb_apsde_data_request, ZB_REF_FROM_BUF(buffer));*/                   \
/* NK: Randomize delay for better performance (for example, parallel work of 2 devices). */ \
ZB_SCHEDULE_ALARM(zb_apsde_data_request, ZB_REF_FROM_BUF(buffer), ZB_RANDOM_VALUE(3));      \ &lt;/pre&gt;&lt;br /&gt; &lt;br /&gt; If you swap commented line with the used one, you should be able to flood network with APS frames:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;ZB_SCHEDULE_CALLBACK(zb_apsde_data_request, ZB_REF_FROM_BUF(buffer));                        \
/* NK: Randomize delay for better performance (for example, parallel work of 2 devices).  */ \
/* ZB_SCHEDULE_ALARM(zb_apsde_data_request, ZB_REF_FROM_BUF(buffer), ZB_RANDOM_VALUE(3)); */ \&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This will not test on ZCL, but directly on APS.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>