<?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>Changing the content of nRF ESB payload</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47378/changing-the-content-of-nrf-esb-payload</link><description>Hello, 
 After decided and tried porting nrf_esb from the example code to my project, now I am stuck with changing the content of the payload. 
 I changed the payload using: 
 
 And here&amp;#39;s my handler: 
 
 Every time a &amp;quot;send packet command&amp;quot; is fired, it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 May 2019 11:59:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47378/changing-the-content-of-nrf-esb-payload" /><item><title>RE: Changing the content of nRF ESB payload</title><link>https://devzone.nordicsemi.com/thread/188544?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 11:59:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d24ffd57-436b-47ed-a7ed-312950effda6</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Winz&lt;/p&gt;
&lt;p&gt;What does the printf retarget to?&lt;/p&gt;
&lt;p&gt;If you are using the UART interface it could be that you are spending too much time pushing bytes to the UART interface, and that&amp;nbsp;you are stuck in the interrupt for too long.&amp;nbsp;&lt;br /&gt;An alternative solution to this should be to set a flag in the ESB event, rather than run this code, and check the flag in your main loop. Then you can run the code from there in thread context, where it should not affect other parts of the system, and hopefully you can use printf without any issues.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The error codes you are referring to are defined in nrf_error.h&lt;/p&gt;
&lt;p&gt;4 corresponds to&amp;nbsp;NRF_ERROR_NO_MEM, which most likely means the internal buffers are full, and 9 corresponds to&amp;nbsp;NRF_ERROR_INVALID_LENGTH.&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: Changing the content of nRF ESB payload</title><link>https://devzone.nordicsemi.com/thread/188119?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 07:42:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ed28077-6bfe-43a6-a9f8-224f087b77e7</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Hi Torbj&amp;oslash;rn,&lt;/p&gt;
&lt;p&gt;I found a workaround for this: either I don&amp;#39;t print it (possible problem with printf? I can&amp;#39;t use NRF_LOG in my application, so I use printf) &lt;strong&gt;OR &lt;/strong&gt;flush, stop, then start the rx. Is it how it supposed to be processed?&lt;/p&gt;
&lt;p&gt;*EDIT* Not really, the old data still resides in the Rx buffer..&lt;/p&gt;
&lt;p&gt;Also, I would like to ask another question: upon writing payload using `nrf_esb_write_payload`, I sometimes receive NRF_SUCCESS on the return, but some other numbers like 4 and 9. May I know if it&amp;#39;s documented somewhere?&lt;/p&gt;
&lt;p&gt;Thank you,&lt;br /&gt;Winz&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing the content of nRF ESB payload</title><link>https://devzone.nordicsemi.com/thread/188114?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 07:36:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2c49b63-8b38-48f4-a5b1-12efd0ce7bd6</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Hi Torbj&amp;oslash;rn,&lt;/p&gt;
&lt;p&gt;Sure, it&amp;#39;s on its way to your private message&lt;/p&gt;
&lt;p&gt;Thank you,&lt;br /&gt;Winz&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing the content of nRF ESB payload</title><link>https://devzone.nordicsemi.com/thread/188109?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 07:30:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba8cb1dd-befd-4f3c-b600-018d618bee90</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Winz&lt;/p&gt;
&lt;p&gt;If this problem persists we can continue the discussion in this case, to avoid cluttering the other one too much.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you attach your main.c file, so I can have a look at the rest of the code also?&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>