<?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>how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27050/how-to-set-nrf24-ptx-with-ack-payload</link><description>Hi，Nordic
now, nRF52 as PRX, nRX24 as PTX. 
 App process 
 
 
 PTX send data via ESB, PRX can receive 
 But nRF24 can not receive event HAL_NRF_TX_DS, why? 
 
 
 Then nRF52 send payload, but nRF24 can not receive 
 
 
 If nRF52 as PTX, nRF24</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Dec 2016 11:46:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27050/how-to-set-nrf24-ptx-with-ack-payload" /><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106266?ContentTypeID=1</link><pubDate>Mon, 19 Dec 2016 11:46:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6afa0eae-9c01-4ce1-a009-0ff721a1984e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Chaw, I tested, and put the ACK payload data out on LEDs (P1) as you can see in the code. It works fine on my setup here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106265?ContentTypeID=1</link><pubDate>Mon, 19 Dec 2016 00:28:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08a52a22-32d5-4cf0-9ef9-e868b3a35d9e</guid><dc:creator>Chaw</dc:creator><description>&lt;p&gt;Thanks.
My project nRF5(PRX) also receive TX Success event every time, but are you sure the ACK payload are be received by nRF24 (PTX)?
maybe you can put ACK payload data to usb endpoint once nRF24 receive, so that you can ACK payload are be received or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106263?ContentTypeID=1</link><pubDate>Fri, 16 Dec 2016 08:58:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a87f78e1-6732-449c-8798-c9b354477ac3</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Chaw,&lt;/p&gt;
&lt;p&gt;I did test it. nRF5 queue an ACK payload every time there is a TX Success event.&lt;/p&gt;
&lt;p&gt;But you need to make sure the nrf_esb_NOACK_Fix.c is used, not the original one.
I just updated the project setting to use that file. Please try again.&lt;/p&gt;
&lt;p&gt;If it doesn&amp;#39;t work please let me know if the nRF5 receive a packet or not&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106264?ContentTypeID=1</link><pubDate>Fri, 16 Dec 2016 01:30:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b85a5b90-a33f-4650-a4c8-8e7a42a9a7b8</guid><dc:creator>Chaw</dc:creator><description>&lt;p&gt;Hi，did you check your upload sample?&lt;/p&gt;
&lt;p&gt;I found your demo, nRF5 only send once ACK, but nRF24 still can not receive.&lt;/p&gt;
&lt;p&gt;Are you sure your demo is OK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106261?ContentTypeID=1</link><pubDate>Thu, 15 Dec 2016 14:22:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51bbc0eb-9f7d-4f43-b1d1-32c3dc6047cb</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Chaw, I updated the answer with the example that worked here. It&amp;#39;s for nRF5 and nRF24LE1 but should be the same for nRF24LU1P&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106260?ContentTypeID=1</link><pubDate>Thu, 15 Dec 2016 09:20:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb8832d7-bf25-45f8-898f-da3539207c2e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi again Chaw,
You can have a look at the prx_ack_payload (and prt_ack_payload) example in nRF5 SDK v10.0 to know how to configure with ack payload. (the library a little bit different but the principle are the same).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106259?ContentTypeID=1</link><pubDate>Thu, 15 Dec 2016 09:00:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de6a1666-8a58-458a-89fb-acb575e1639e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Chaw, please make sure you use the nrf_esb_NOACK_Fix.c.
Also, why did you set &amp;quot;tx_payload.noack = true;&amp;quot; ?  noack= true mean no ack. Then you should not expect to have ack payload back.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106262?ContentTypeID=1</link><pubDate>Thu, 15 Dec 2016 01:38:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a341ce9-f2eb-4dc3-8824-06c51d1cb147</guid><dc:creator>Chaw</dc:creator><description>&lt;p&gt;sorry, my upload project has some problem.
nRF24 as PTX, nRF52 as PRX. It&amp;#39;s right.
My app step is this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;PTX(nRF24) send data to PRX(nRF52), PRX(nRF52) can receive data, it&amp;#39;s OK&lt;/li&gt;
&lt;li&gt;Then PRX(nRF52) send ACK payload to PTX(nRF24), it&amp;#39;s not OK.
after step 1, I change nRF24 from PTX mode to PRX mode, you said, I do not need, I will try. But it still do not work.
Maybe when PRX(nRF52) send ACK payload, I use wrong method, now I use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;tx_payload.noack = true;
nrf_esb_write_payload(&amp;amp;tx_payload);&lt;/p&gt;
&lt;p&gt;from PRX(nRF52), I see TX success log, but same time, PTX(nRF24) do not receive this ACK.&lt;/p&gt;
&lt;p&gt;Could you check?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106258?ContentTypeID=1</link><pubDate>Wed, 14 Dec 2016 15:07:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbdb9e14-7ceb-4874-9df9-b30602483849</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Chaw: thanks, but could you let me know exactly in which mode do you have the issue ?
What I can see in the code is that the NRF52 is in PRX mode, this is the mode you said works fine:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;1. nRF24 as PTX, nRF52 as PRX
2. nRF24 send data to nRF52, it work well.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Why should I look at the code  ?&lt;/p&gt;
&lt;p&gt;Please be aware, you don&amp;#39;t have to switch the PTX to PRX mode to be able to receive ack payload !
You simply enable ACK payload in the configuration and you should be able to receive ack payload. Please check out the Figure 11 in nRF24LU1P Product Spec you can find the mode switching is done automatically, you only have to wait for the TX_DS and RX_DR IRQ return when there is Ack payload return.&lt;/p&gt;
&lt;p&gt;Note that you need to prepare data in the TX buffer on the PRX side so that the PRX can send something back in the ack payload. I don&amp;#39;t see that in your code in the application, which data you are expecting from the NRF5 to send back to the nRF24 ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106256?ContentTypeID=1</link><pubDate>Wed, 14 Dec 2016 10:04:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1236e035-6a84-4be5-af4c-0fe186079f48</guid><dc:creator>Chaw</dc:creator><description>&lt;p&gt;Hi，I have upload full project, nRF52 and nRF24&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106257?ContentTypeID=1</link><pubDate>Tue, 13 Dec 2016 11:07:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1ddab8b-1515-4570-a48f-9b6369e95626</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Chaw,&lt;/p&gt;
&lt;p&gt;Are you sure it&amp;#39;s correct, in your code it&amp;#39;s nRF52 works as PRX.&lt;/p&gt;
&lt;p&gt;Also please upload the full project.&lt;/p&gt;
&lt;p&gt;Have you made sure you use NRF_ESB_LEGACY_CONFIG instead of NRF_ESB_DEFAULT_CONFIG in esb_init() ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106255?ContentTypeID=1</link><pubDate>Tue, 13 Dec 2016 00:37:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8dd4c86-5c33-4279-9aab-e8a729d23596</guid><dc:creator>Chaw</dc:creator><description>&lt;p&gt;nRF52 configuration:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = esb_init();
APP_ERROR_CHECK(err_code);
err_code = nrf_esb_start_rx();
APP_ERROR_CHECK(err_code);

void nrf_esb_event_handler(nrf_esb_evt_t const * p_event)
{
    case NRF_ESB_EVENT_RX_RECEIVED:
NRF_LOG_DEBUG(&amp;quot;RX RECEIVED EVENT\r\n&amp;quot;);
    if (nrf_esb_read_rx_payload(&amp;amp;rx_payload) == NRF_SUCCESS)
    {
      tx_payload.noack = false;
      if (nrf_esb_write_payload(&amp;amp;tx_payload) == NRF_SUCCESS)
      {}
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;nRF24 Configuration:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static void rf_config(void)
{
    hal_nrf_get_clear_irq_flags();
    hal_nrf_flush_rx();
    hal_nrf_flush_tx();

    hal_nrf_enable_ack_payload(true);
    hal_nrf_enable_dynamic_payload(true);
    hal_nrf_setup_dynamic_payload(0xff);

   hal_nrf_set_power_mode(HAL_NRF_PWR_UP);
   hal_nrf_set_operation_mode(HAL_NRF_PTX);
   CE_LOW();
}

static void rf_send_buffer()
{
  CE_LOW();
  hal_nrf_set_operation_mode(HAL_NRF_PTX);
  transmitted = false;
  hal_nrf_write_tx_payload(usb_out_buf, 32);
  CE_PULSE();
  radio_busy = true;
  while(radio_busy);
}

static void rf_receive_ms(uint16_t time_ms)
{
  packet_received = false;
  hal_nrf_set_operation_mode(HAL_NRF_PRX);
  CE_HIGH();
  while(time_ms--)
  {
    if (packet_received)
      break;
    delay_ms(1);
  }
  CE_LOW();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;on main()&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   while(true)
   {
     rf_send_buffer();
     if (transmitted)
     {
       rf_receive_ms(10);
     }
   }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Plz help me check.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106253?ContentTypeID=1</link><pubDate>Mon, 12 Dec 2016 11:53:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5365fecf-2754-426f-acb9-dc118fa122f2</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Chaw: If you actually don&amp;#39;t receive data on nRF24 then it&amp;#39;s not the bug with NO_ACK bit. We need to see how you configured on both side. Please base on the example in the SDK to add your configuration and send us your projects (both sides).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106254?ContentTypeID=1</link><pubDate>Mon, 12 Dec 2016 02:52:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d6c24dd-b95a-4d21-b28f-ba9318ec0369</guid><dc:creator>Chaw</dc:creator><description>&lt;p&gt;Hi, it doesn&amp;#39;t work. same to without modification.&lt;/p&gt;
&lt;p&gt;my app is this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;nRF24 as PTX, nRF52 as PRX&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;nRF24 send data to nRF52,  it work well.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;nRF24 change to PRX mode, nRF52 send data to nRF24 (via nrf_esb_write_payload)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;this time, nRF52 nrf_esb_write_payload return success, can not receive TX Successful or TX Failed event.&lt;/p&gt;
&lt;p&gt;nRF24 can not receive data from nRF52.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106252?ContentTypeID=1</link><pubDate>Fri, 09 Dec 2016 10:19:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9ff49b0-c265-4579-b62e-9b7e13f55c1d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Chaw,&lt;/p&gt;
&lt;p&gt;We are suspecting it was the bug with the inverted NO_ACK bit on the nRF5 ESB library.&lt;/p&gt;
&lt;p&gt;Could you try this workaround file to replace the original one and let me know if it fixed. Two modification been made on line 482 and 694.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf_5F00_esb_5F00_NOACK_5F00_Fix.c"&gt;nrf_esb_NOACK_Fix.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[update] Here is an example of using nRF24LU1 as PTX and nRF52 as PRX with ACK payload.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ptx-_2D00_-Copy.zip"&gt;ptx - Copy.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/esb_5F00_prx-_2D00_-NoAckFix-_2D00_-Legacy.zip"&gt;esb_prx - NoAckFix - Legacy.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106251?ContentTypeID=1</link><pubDate>Fri, 09 Dec 2016 09:52:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbbdb683-2e5c-46d4-b6f1-b4a51f8028b9</guid><dc:creator>Chaw</dc:creator><description>&lt;p&gt;Hi, I have tried your example in SDK, it work well, nRF24 with nRF52
But your example is that nRF52 as PRX, nRF24 as PTX, and no need ack
Now I need nRF52 can send ack payload, so after nRF52 receive, nRF52 write payload
on nRF24, when send OK, I change nRF24 to PRX mode, but it do not work.
About my app, could you give me suggestion?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set nRF24 PTX with ack payload</title><link>https://devzone.nordicsemi.com/thread/106250?ContentTypeID=1</link><pubDate>Thu, 08 Dec 2016 15:34:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1bb97d19-0588-44ef-b555-a96a85fe5f54</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Chaw: we need to see how you configure the nRF24 and the NRF52.
Have you tried our example in the SDK ? There is some note on compatibility between them.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>