<?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>Problem about proprietary protocol and ack</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36954/problem-about-proprietary-protocol-and-ack</link><description>Hi, 
 
 In my develop environment , there have many proprietary device. One device is working on PTX mode, and the other devices is working in PRX mode. 
 If the PTX device send a broadcast proprietary packet (need ACK), all of PRX devices may send ACK</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Aug 2018 12:29:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36954/problem-about-proprietary-protocol-and-ack" /><item><title>RE: Problem about proprietary protocol and ack</title><link>https://devzone.nordicsemi.com/thread/143023?ContentTypeID=1</link><pubDate>Mon, 06 Aug 2018 12:29:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56221f74-0f62-4663-bdb7-782f2002cddf</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Chianglin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To clear TX buffer you can call nrf_esb_flush_tx()&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Maybe it&amp;#39;s not clear in the documentation on infocenter (but it&amp;#39;s clearer in the datasheet of nRF24 series, I would suggest to have a look at those), but noack bit will be used on the PRX to check if it should send the ACK packet back or not when the selective_auto_ack is set (Please have a look at the on_radio_disabled_rx() function where we have this check:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;if ((m_config_local.selective_auto_ack == false) || ((m_rx_payload_buffer[1] &amp;amp; 0x01) == 1))&lt;/p&gt;
&lt;p&gt;This is the check if it should send ACK or not. This also requires you to use NRF_ESB_PROTOCOL_ESB_DPL instead of&amp;nbsp;NRF_ESB_PROTOCOL_ESB (always ACK, as far as I understand)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem about proprietary protocol and ack</title><link>https://devzone.nordicsemi.com/thread/142917?ContentTypeID=1</link><pubDate>Sun, 05 Aug 2018 14:45:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74fff61d-a02d-4256-bfc9-c4851feac734</guid><dc:creator>chianglin</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;Continue the previous question.&amp;nbsp; Node-A is working in PTX and Node-B,is working in PRX.&lt;/p&gt;
&lt;p&gt;If Node B&amp;#39;s TX FIFO have one packet (name packet-A), and Node-A send a packet to Node-B.&amp;nbsp; Node-B will send ACK packet (the content is packet-A) no meter Node-A&amp;#39;s &amp;quot;noack&amp;quot; flag is turn-on or turn-off.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Would you please tell me how to solve this problem?&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Chianglin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem about proprietary protocol and ack</title><link>https://devzone.nordicsemi.com/thread/142916?ContentTypeID=1</link><pubDate>Sun, 05 Aug 2018 13:41:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf2e4e8a-df8f-4b29-be91-0f4bc81d517a</guid><dc:creator>chianglin</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;When PTX (name Node-A) broadcast a packet without ACK, all of the three PRX (name Node B, C, D) will receive this packet.&lt;/p&gt;
&lt;p&gt;By your recommend, node-B, C, D should be delay a random time before switch to PTX and send a packet back to node-A.&lt;/p&gt;
&lt;p&gt;If&amp;nbsp; node B &amp;#39;s PTX buffer already have a packet (name packet-A), and it need to send a new packet (name packet-B) to Node-A, how can I drop packet-A when I execute &amp;quot;nrf_esb_write_payload()&amp;quot; function?&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Chianglin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem about proprietary protocol and ack</title><link>https://devzone.nordicsemi.com/thread/142914?ContentTypeID=1</link><pubDate>Sun, 05 Aug 2018 01:05:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75807e94-c98c-4392-84a0-53a65cdd91ae</guid><dc:creator>chianglin</dc:creator><description>&lt;p&gt;Thank you very much.&lt;/p&gt;
&lt;p&gt;I will study your method.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem about proprietary protocol and ack</title><link>https://devzone.nordicsemi.com/thread/142759?ContentTypeID=1</link><pubDate>Fri, 03 Aug 2018 09:21:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad19c9d0-b547-45d4-9148-b7042622fbdd</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;No, the PTX wouldn&amp;#39;t receive 3 ACKs. As I mentioned several times, PTX stops receiving ACK after the first ACK it receives.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We don&amp;#39;t make the ESB for this use case. PRXs will immediately retransmit and 3 ACK packets will most probably collide. You would need to add the random delay on your own.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That&amp;#39;s why I suggest don&amp;#39;t do the normal ACK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What you do is to configure all 4 devices as PRX, all listen to address 3. When a node (we call it NODE A) want to transmit it switch itself to PTX mode, send a NOACK packet, and then switch back to PRX mode again. Other nodes (B, C, D) when receiving that packet (and check if it&amp;#39;s for him) will switch to PTX and send another NOACK response packet , this NOACK contain the ACK and the ID of the PRX.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot;NODE A&amp;quot; now in PRX mode, and can receive those response packets and can detect which PRX send the response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This way it&amp;#39;s much easier to implement as you don&amp;#39;t have to modify the ESB protocol to receive ACK from multiple nodes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem about proprietary protocol and ack</title><link>https://devzone.nordicsemi.com/thread/142707?ContentTypeID=1</link><pubDate>Fri, 03 Aug 2018 00:06:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a40ac66-dcb7-4e8f-8397-c3022eeb8880</guid><dc:creator>chianglin</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;&amp;nbsp;Hung,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for you detail explain.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If I configure all PRX to have same address, say number 3. And one PTX has address configure to 3 and send a packet out.&amp;nbsp; All of three PRX will ACK this packet, is it right?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If the PTX silt had enable ACK receive and the three ACK packet&amp;nbsp;do not&amp;nbsp;collided, the PTX will receive three ACK packet, is it correct?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;About the &amp;quot;random delay&amp;quot;, does it implement in PRX site?&amp;nbsp; Would you please tell me how can I implement this function?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Chianglin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem about proprietary protocol and ack</title><link>https://devzone.nordicsemi.com/thread/142570?ContentTypeID=1</link><pubDate>Thu, 02 Aug 2018 10:20:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62683c01-e36d-4a77-866b-557fbaffd883</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Chianglin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Let me explain you how it work with ESB (I assume you use ESB)&lt;/p&gt;
&lt;p&gt;- A PRX device would have 8 pipes to receive data, each pipe has an address. It could be 2 or 3 bytes address, but let&amp;#39;s think of&amp;nbsp;them as address number 1 2 3 ...8.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Each PTX device would have a TX address, and a RX address to receive ACK from, they are the same number. So if a PTX send a packet to address 2 on TX, it will expect to hear ACK that has address 2 on RX.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And the address the PTX send to match with the address on the PRX, in this case number 2.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In your case you have 3PRX and 3 PTX. It depends on how you configure it. If you configure all PRX to have same address, say number 3. And all three PTXs has address configure to 3. Then whenever a PTX send a packet, all three PRX will receive and send a ACK back. But it&amp;#39;s where the problem is, if all of them receive and send at the same time, there will be collision and the PTXs wouldn&amp;#39;t receive anything because messages are collided. Even if message was not&amp;nbsp; collided by somehow you implement a random delay (as suggested) the PTX wouldn&amp;#39;t listen after it gets the first ACK. So no, a PTX can&amp;#39;t receive ACK from multiple PRX. You need to switch it to PRX to receive.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also another note is that PTX will not listen if it&amp;#39;s not expecting ACK. So when a PTX not sending data, it will not receive anything.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem about proprietary protocol and ack</title><link>https://devzone.nordicsemi.com/thread/142477?ContentTypeID=1</link><pubDate>Thu, 02 Aug 2018 00:05:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e04140f0-b5c9-4b1d-8455-6c9b81d4cb94</guid><dc:creator>chianglin</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry, I have to explain the detail condition about previous question 2:&lt;/p&gt;
&lt;p&gt;For example, there have 6 proprietary devices, 3 devices are working in TX mode (continue send PTX packet) and 3 device are working in RX mode (run in PRX mode).&lt;/p&gt;
&lt;p&gt;a. Do these 3 PRX had received all of the 3 PTX packet and send ACK back to each PTX device?.&lt;/p&gt;
&lt;p&gt;b. After each TX device transmits a PTX Packet, it will receive an ACK packet from &amp;quot;different RX devices&amp;quot;?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Chianglin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem about proprietary protocol and ack</title><link>https://devzone.nordicsemi.com/thread/142464?ContentTypeID=1</link><pubDate>Wed, 01 Aug 2018 15:44:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5565f40-81f4-4f69-9b30-5200856fa624</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have to correct my self, in last reply, the first sentence please read as &amp;quot;PTX will switch back to TX right after the first ACK received&amp;quot;&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;You can use a&amp;nbsp;SHORT&amp;nbsp; to join END event and DISABLE task to disable TX after you sent and a short to join DISABLED event to RXEN task to start RX.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. You are talking about 1 TX talking to 1 RX and there are several pair of them ? The ACK packet is sent to the same address as it received. Note that there isn&amp;#39;t a TX address and a RX address, they are the same on each pair.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A PRX can have different address, but a PTX has only one address, it&amp;#39;s the address it sends data to and receive ACK from.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3. No. And as mentioned in 2, If there are multiple PTX sending to one address on PRX they all have the same address. But it&amp;#39;s possible to disable a pipe, meaning you don&amp;#39;t listen on that address anymore.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem about proprietary protocol and ack</title><link>https://devzone.nordicsemi.com/thread/142268?ContentTypeID=1</link><pubDate>Wed, 01 Aug 2018 00:03:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c4c9d8f-463c-44a8-ae9f-205f28e728f6</guid><dc:creator>chianglin</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for your answer.&lt;/p&gt;
&lt;p&gt;I still have following questions:&lt;/p&gt;
&lt;p&gt;1. Would you please give me the bast and most quickly method&amp;nbsp;to switch between PTX and PRX?&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp; if I have multiple TX and multiple RX node in the same position and all of the TX node send broadcast packet.&amp;nbsp; Does all of the RX node will receive these broadcast packet and send ACK packet back to TX node (if use require ACK packet)?.&amp;nbsp; Does RX node know the address of TX node by analyze the content of received TX packet?&lt;/p&gt;
&lt;p&gt;3. Does the RX node can create a black-list of TX node?&amp;nbsp; I means: If the address of TX node is add into the black list of RX node, then RX will not receive any packet of this TX-node.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Chianglin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem about proprietary protocol and ack</title><link>https://devzone.nordicsemi.com/thread/142218?ContentTypeID=1</link><pubDate>Tue, 31 Jul 2018 14:37:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c4bffb7-aee1-4c2d-9686-e23e7fe5fc3a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Chianglin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you have multiple RX and one TX , I would suggest not to use require ACK packet.&amp;nbsp;The PTX will switch of RX right after the first ACK packet received.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My suggestion is to send it as a NO_ACK packet, but then switch to PRX mode and listen.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;On the normal PRXs when it receives a packet from the PTX, after giving a certain delay will switch to TX mode and send a (NOACK) packet back to acknowledge. In your packet you can add an ID of the PRX in the payload so that the PTX would know from where the packet comes from.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>