<?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>NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96433/nrf52---esb---receiving-duplicate-packets</link><description>We are having some issues with ESB, it seems the automatic ACKs are not working properly and we get spammed with a lot of duplicates. 
 We believe the issue is because we start some function immediately when NRF_ESB_EVENT_RX_RECEIVED is triggered and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Feb 2023 09:52:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96433/nrf52---esb---receiving-duplicate-packets" /><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409784?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 09:52:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b7e21d6-034a-4a00-a755-d4f13928a107</guid><dc:creator>nordicfreak</dc:creator><description>&lt;p&gt;Great, thank you for the help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409783?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 09:48:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73da0db6-3b0d-4aae-9644-c6669e1efb97</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Sorry, that is not possible. If you have specific questions I can answer them, but in terms of software development you will need to use the example as starting point and develop you own project. Personally I would have considered using the first 1-2bytes as a header for the application, e.g. information about what packet this was in a sequence of x packets etc. But I don&amp;#39;t have any example or guidance on how this can be done in specific no.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409768?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 08:58:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a3a5874-8c8e-4e4a-a75e-6f5967b3153c</guid><dc:creator>nordicfreak</dc:creator><description>&lt;p&gt;This will be tricky if I need to send a 300 bytes reply fragmented in multiple acks.&lt;/p&gt;
&lt;p&gt;Can someone from your team write a proof of concept maybe? I am sure it will benefit the whole community.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409764?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 08:50:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6d180d7-0fb4-43bc-b708-f079fff82de8</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I opened the example project I previously linked for Gazell, I can see that the project supports bidirectional data (see that the host call&amp;nbsp;nrf_gzll_add_packet_to_tx_fifo() to add data to ACK).&lt;/p&gt;
&lt;p&gt;I can find frmo nrf_gzll_constants.h that the max payload length is 32bytes as I suspected:&lt;br /&gt;#define NRF_GZLL_CONST_MAX_PAYLOAD_LENGTH&amp;nbsp; &amp;nbsp; 32&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;///&amp;lt; Maximum allowed payload length in bytes.&lt;/p&gt;
&lt;p&gt;So this means that if you want to send 300bytes either way, then you need to fragment the data into 32byte chunks.&lt;/p&gt;
&lt;p&gt;Gazell was never meant for dynamic switching between host and device no.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409739?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 07:09:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b55b2bcd-683b-456d-b044-5adb7615d50c</guid><dc:creator>nordicfreak</dc:creator><description>&lt;p&gt;Can you please provide some sample code for Gazell RX and TX, for sending 300 byte payload?&lt;/p&gt;
&lt;p&gt;How about bi-directional, can I change between host and device fast enough? Any other tips?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409697?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 18:52:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46db6b8a-8801-4af0-82a7-507a2498ef8f</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;32byte payload either way should be supported as-is I believe, do not believe larger is possible no.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409679?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 16:17:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28733b43-7325-4a9d-bf3f-9cf1bcefd7f4</guid><dc:creator>nordicfreak</dc:creator><description>&lt;p&gt;As far as i remember, Gazell has a pretty small max payload size. Is there any code available demonstrating bidirectional communication using parge payloads?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409677?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 16:13:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04660216-c7fc-48bb-949a-56178b8c80fe</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Gazell:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/gzll_02_user_guide.html"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/gzll_02_user_guide.html&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/gzll_examples_device_and_host.html"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/gzll_examples_device_and_host.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;PTX is called device, and PRX is called host in Gazell.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409587?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 12:42:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8d807bf-b393-4e16-a21b-fecf5757fb43</guid><dc:creator>nordicfreak</dc:creator><description>&lt;p&gt;Are there any protocols already written that will ensure packets arrive in the other side or do I have to write it from scratch?&lt;/p&gt;
&lt;p&gt;i can barely find anything about esb online to be honest.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409562?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 11:48:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45d06d09-e1ba-4cba-b11b-a3c450d54561</guid><dc:creator>Kenneth</dc:creator><description>[quote user="nordicfreak"]disabling the radio too soon after tx?[/quote]
&lt;p&gt;In normal radio communication in the 2.4GHz it&amp;#39;s pretty common with packet loss due to interference from nearby wifi or other bt devices. So if you have 1ms delay, you are&amp;nbsp;likley only have enough time to send 1ack, and if that one is lost then the peer will retransmit again. I suspect that when you are exiting rx mode/disabling esb that the ESB library no longer remember what the latest packet received was, so once you enter rx mode again, it will treat the received packet as a new packet, hence fowarding it to the application.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409547?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 11:07:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3df1d384-3ae7-4294-bfd2-ec03861c7337</guid><dc:creator>nordicfreak</dc:creator><description>&lt;p&gt;As you can see in my tx function, I am blocking until&amp;nbsp; NRF_ESB_EVENT_TX_SUCCESS or&amp;nbsp;NRF_ESB_EVENT_TX_FAILED received.&lt;br /&gt;&lt;br /&gt;This should take care of that right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409546?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 11:04:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5eb85f9-e5b3-40bc-b65c-7f2853b33b66</guid><dc:creator>nordicfreak</dc:creator><description>&lt;p&gt;What do you think is the reason for the duplicates? disabling the radio too soon after tx?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409545?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 11:03:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58913e87-3105-444b-8542-d09715198866</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;But I see your point, if you send data so infrequently it may make more sense to follow your approach, but have in mind that having a radio in continous rx will draw current. But if you follow your approach you must live with handling duplicates in rx.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409544?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 11:00:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0421c68f-efe5-4c4c-a2ed-4e18918bfa42</guid><dc:creator>Kenneth</dc:creator><description>[quote user="nordicfreak"]What if data is unexpected? Should I send every 1ms some empty packet from the TX until RX has data available?[/quote]
&lt;p&gt;It depends on your latency requirements really.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409542?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 10:55:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d59a0107-af57-4838-acca-11a5501147e5</guid><dc:creator>nordicfreak</dc:creator><description>&lt;p&gt;What if data is unexpected? Should I send every 1ms some empty packet from the TX until RX has data available?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409541?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 10:54:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53ff58f7-c7f1-4574-9389-652def510ed9</guid><dc:creator>Kenneth</dc:creator><description>[quote user="nordicfreak"]Is this not a good approach?[/quote]
&lt;p&gt;No, if the PTX expect data, it can just send 1byte 0xFF dummy data to fetch the data from the PTX. This is also much better in terms of current consumption.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409538?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 10:29:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0bd1dde-a90e-4a50-876e-75c758144f7f</guid><dc:creator>nordicfreak</dc:creator><description>&lt;p&gt;Yes, this I understand. However, the RX might send some data after a few minutes so appending to ack would not be feasible, that&amp;#39;s why I keep both sides in RX mode and when they want to send I switch to TX.&lt;br /&gt;&lt;br /&gt;Is this not a good approach?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409537?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 10:27:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fec782e-4428-4efa-99d7-08326d757fda</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;If the PRX want to send data to the PTX, then it don&amp;#39;t disable esb or switch to tx, it simply call&amp;nbsp;nrf_esb_write_payload() while in rx mode, then the packet will be appended to the next ack going from the PRX to the PTX. So there should be no need to disable esb or switch mode of operation to use&amp;nbsp;nrf_esb_write_payload().&lt;/p&gt;
&lt;p&gt;If you look at the&amp;nbsp;\examples\proprietary_rf\esb_low_power_prx you can see what I mean.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409212?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2023 15:56:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55fe4fcf-33d7-4a8b-8d4c-225ef691968e</guid><dc:creator>nordicfreak</dc:creator><description>&lt;p&gt;even when switching to tx mode?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409211?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2023 15:55:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cffddf12-15b0-4848-9f0b-e794638a43d6</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Try to remove that, keep rx allways on. Or at least remove the ESB disable/enable part. When you disable/enable ESB you like also remove the info&amp;nbsp;of the last received packet info, thereby it think it is a new packet.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409201?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2023 14:45:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:636478dd-cd26-4cd4-afa0-3c19ca7abc3d</guid><dc:creator>nordicfreak</dc:creator><description>&lt;p&gt;Check line 100 in RX code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409181?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2023 13:54:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8b257e6-265d-4684-ae9a-ccf7bb977c6f</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;And you are not starting and stopping rx here at any time? e.g.&amp;nbsp;nrf_esb_start_rx()/nrf_esb_stop_rx().&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409172?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2023 13:24:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3d84643-bf49-4cff-bdc9-e531ef9137dd</guid><dc:creator>nordicfreak</dc:creator><description>&lt;p&gt;&lt;span&gt;Is the TX also an nRF52840-DK? - Yes&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Acks sometimes are received sometimes not.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is nRF5 SDKv17.1? - yes&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409171?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2023 13:23:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b53d5d67-560d-4c48-bd2e-74dfc1433379</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;That should be good.&amp;nbsp;This is nRF5 SDKv17.1?&lt;/p&gt;
&lt;p&gt;Do I understand it correctly it&amp;#39;s allways duplicates and that the ack is never received? It&amp;#39;s not quite clear to me whether there is intermittently ack&amp;#39;s or not.&lt;/p&gt;
&lt;p&gt;Is the TX also an nRF52840-DK?&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 - ESB - Receiving duplicate packets</title><link>https://devzone.nordicsemi.com/thread/409168?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2023 13:20:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:039b33f3-7d9a-4ff6-a9ff-1aa515245f6a</guid><dc:creator>nordicfreak</dc:creator><description>&lt;p&gt;PCA10056 - 3.0.0 2022.34&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>