<?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>Enhanced ShockBurst (ESB) Payload handling issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77166/enhanced-shockburst-esb-payload-handling-issue</link><description>Hi. 
 
 I&amp;#39;m using nrf52832 with SDK-17, and the ESB example (esb_tx and esb_rx) 
 I&amp;#39;m not much experience in nrf development recently I have a project related to ESB to transmit and receiver data, here is my problem and some questions. 
 
 The payload</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Jul 2021 09:54:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77166/enhanced-shockburst-esb-payload-handling-issue" /><item><title>RE: Enhanced ShockBurst (ESB) Payload handling issue</title><link>https://devzone.nordicsemi.com/thread/319549?ContentTypeID=1</link><pubDate>Mon, 12 Jul 2021 09:54:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73886c85-2d6d-4812-9aca-2d2911f44065</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;It is good to hear you found a solution &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I will consider the case closed then, unless you have more questions?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enhanced ShockBurst (ESB) Payload handling issue</title><link>https://devzone.nordicsemi.com/thread/319424?ContentTypeID=1</link><pubDate>Fri, 09 Jul 2021 14:56:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38555fc7-e2b0-4984-ba1e-6b1ed85eb646</guid><dc:creator>luqman</dc:creator><description>&lt;p&gt;thanks, buddy I got it,&lt;/p&gt;
&lt;p&gt;I make a 4 payload with a different name and it solves&lt;pre class="ui-code" data-mode="text"&gt;static nrf_esb_payload_t        tx_payload = NRF_ESB_CREATE_PAYLOAD(0, 0,3,);

static nrf_esb_payload_t        tx_payload;

static nrf_esb_payload_t        tx_payload1 = NRF_ESB_CREATE_PAYLOAD(0,0,4,);

static nrf_esb_payload_t        tx_payload1;

static nrf_esb_payload_t        tx_payload2 = NRF_ESB_CREATE_PAYLOAD(0, 0,5);

static nrf_esb_payload_t        tx_payload2;

static nrf_esb_payload_t        tx_payload3 = NRF_ESB_CREATE_PAYLOAD(0, 0,6);

static nrf_esb_payload_t        tx_payload3;

static nrf_esb_payload_t        tx_payload4 = NRF_ESB_CREATE_PAYLOAD(0, 0,7);

static nrf_esb_payload_t        tx_payload4;&lt;/pre&gt; the problem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enhanced ShockBurst (ESB) Payload handling issue</title><link>https://devzone.nordicsemi.com/thread/319422?ContentTypeID=1</link><pubDate>Fri, 09 Jul 2021 14:53:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55d1ea5d-d43b-4c9d-83cc-96de69d7a0c0</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
[quote user="luqman"]but if there any example where I send specific data from Tx and read from RX as the same really help me a lot[/quote]
&lt;p&gt;I am sorry, but I don&amp;#39;t understand what you mean by this sentence.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The data you read on the RX side should be exactly the same as the data you upload on the TX side. Otherwise there is something wrong in the code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enhanced ShockBurst (ESB) Payload handling issue</title><link>https://devzone.nordicsemi.com/thread/319115?ContentTypeID=1</link><pubDate>Thu, 08 Jul 2021 10:13:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb06b8b0-ed7b-4383-ba19-903031a723c2</guid><dc:creator>luqman</dc:creator><description>&lt;p&gt;yes I know what is sending by using&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;NRF_LOG_INFO(&amp;quot;Receiving packet: %d&amp;quot;, packet_data);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;i try to implement this but if there any example where I send specific data from Tx and read from RX as the same really help me a lot.. not like full buffer is a shared an example&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enhanced ShockBurst (ESB) Payload handling issue</title><link>https://devzone.nordicsemi.com/thread/319096?ContentTypeID=1</link><pubDate>Thu, 08 Jul 2021 09:04:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f55b50d-0f5e-411f-81a0-e50e0265dc7d</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you checked on the transmitting side that you are sending what you think you are sending?&lt;/p&gt;
&lt;p&gt;It should be possible to use the debugger to check the value of the ESB payload before you send it over the air.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can also use the NRF_LOG_HEXDUMP_INFO() function to print all the ESB payload bytes to the log before you send it, so you can confirm that you are sending what you are supposed to.&amp;nbsp;&lt;/p&gt;
[quote user="luqman"]is there any way I can send a different number from tx which send only the specific index not the whole payload ?[/quote]
&lt;p&gt;You can set the length field in the payload to a lower number if you like, as long as it is at least 1 byte long. So if you only want to send the index that is possible.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;On the RX side you can then read the length field of the payload to see how much data was sent from the transmitter.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enhanced ShockBurst (ESB) Payload handling issue</title><link>https://devzone.nordicsemi.com/thread/318952?ContentTypeID=1</link><pubDate>Wed, 07 Jul 2021 11:02:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca46a68e-f56e-49e7-93c5-0e998e8fdc88</guid><dc:creator>luqman</dc:creator><description>&lt;p&gt;thanks for your answer ...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But there is a problem ... if want want to read the different number at the same time like .&lt;/p&gt;
&lt;p&gt;button1 send ---&amp;gt; 7&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;button2 send ----&amp;gt; 8&lt;/p&gt;
&lt;p&gt;and same as an increment on others.&lt;/p&gt;
&lt;p&gt;when I put check on what number is received on rx_buffer for example&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;if (nrf_esb_read_rx_payload(&amp;amp;rx_payload) == NRF_SUCCESS)&lt;br /&gt;{&lt;/p&gt;
&lt;p&gt;uint8_t packet_data1 = rx_payload.data[4];&lt;br /&gt; uint8_t packet_data2 = rx_payload.data[3];&lt;br /&gt; uint8_t packet_data3 = rx_payload.data[2];&lt;br /&gt; uint8_t packet_data4 = rx_payload.data[1];&lt;br /&gt; uint8_t packet_data5 = rx_payload.data[0];&lt;br /&gt; &lt;br /&gt; //if(packet_type == 7)&lt;br /&gt; //{&lt;br /&gt; // NRF_LOG_INFO(&amp;quot;Receiving packet 7&amp;quot;);&lt;br /&gt; // NRF_LOG_INFO(&amp;quot;Receiving packet: %d&amp;quot;, packet_data);&lt;br /&gt; //}&lt;/p&gt;
&lt;p&gt;if ( packet_data1 == 6)&lt;br /&gt;{&lt;br /&gt;//flag enable &lt;br /&gt; NRF_LOG_INFO(&amp;quot;Receiving packet &amp;quot;);&lt;br /&gt; NRF_LOG_INFO(&amp;quot;Receiving packet: %d&amp;quot;, packet_data1);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;if ( packet_data2 == 7)&lt;br /&gt;{&lt;br /&gt;//flag enable &lt;br /&gt; NRF_LOG_INFO(&amp;quot;Receiving packet &amp;quot;);&lt;br /&gt; NRF_LOG_INFO(&amp;quot;Receiving packet: %d&amp;quot;, packet_data2);&lt;/p&gt;
&lt;p&gt;}&lt;br /&gt;if ( packet_data3 == 8)&lt;br /&gt;{&lt;br /&gt;//flag enable&lt;/p&gt;
&lt;p&gt;NRF_LOG_INFO(&amp;quot;Receiving packet &amp;quot;);&lt;br /&gt; NRF_LOG_INFO(&amp;quot;Receiving packet: %d&amp;quot;, packet_data3);&lt;/p&gt;
&lt;p&gt;}&lt;br /&gt;if ( packet_data4 == 9)&lt;br /&gt;{&lt;br /&gt;//flag enable &lt;br /&gt; NRF_LOG_INFO(&amp;quot;Receiving packet &amp;quot;);&lt;br /&gt; NRF_LOG_INFO(&amp;quot;Receiving packet: %d&amp;quot;, packet_data4);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I make this logic but the indexes not going to change still got the same answer ..&lt;/p&gt;
&lt;p&gt;is there any way I can send a different number from tx which send only the specific index not the whole payload ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enhanced ShockBurst (ESB) Payload handling issue</title><link>https://devzone.nordicsemi.com/thread/318947?ContentTypeID=1</link><pubDate>Wed, 07 Jul 2021 10:18:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c1b020a-a230-4e18-9a69-ba0d5357ec38</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am not quite sure I understand the question.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You don&amp;#39;t want to use the same buffer index on the receiver side as you do on the transmitter side?&lt;/p&gt;
&lt;p&gt;The only way I can see of fixing this is to reorder the bytes in the buffer after you have called&amp;nbsp;nrf_esb_read_rx_payload(&amp;amp;rx_payload), but before you start to process the data.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;An easier way would be to just read out the bytes you are interested in, and store them in temporary variables:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if (nrf_esb_read_rx_payload(&amp;amp;rx_payload) == NRF_SUCCESS)
{
    // Use variable names that makes sense for your application, 
    // these are just example names
    uint8_t packet_type = rx_payload.data[1];
    uint8_t packet_data = rx_payload.data[0];
    
    if(packet_type == 7)
    {
        NRF_LOG_INFO(&amp;quot;Receiving packet 6&amp;quot;);
        NRF_LOG_INFO(&amp;quot;Receiving packet: %d&amp;quot;, packet_data);
    }

    .
    .
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>