<?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>Send / receive a fix length proprietary packet in nRF51822 QFAAG0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34575/send-receive-a-fix-length-proprietary-packet-in-nrf51822-qfaag0</link><description>Hi, 
 
 As well know, the max packet length is 252 byte in nRF51822 proprietary protocol. 
 Would you please tell me how to send / receive 252 byte packet? Where can I found the example file? 
 
 Thank you, 
 Chianglin</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 May 2018 12:24:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34575/send-receive-a-fix-length-proprietary-packet-in-nrf51822-qfaag0" /><item><title>RE: Send / receive a fix length proprietary packet in nRF51822 QFAAG0</title><link>https://devzone.nordicsemi.com/thread/132759?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 12:24:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:419dc877-2935-405a-a691-8901a8f0b5e6</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;You would have to change the&amp;nbsp;NRF_ESB_MAX_PAYLOAD_LENGTH define in nrf_esb.h to support 252 byte payload. By using the standard esb_ptx and esb_prx examples in the SDK you should be able to make this modification, and take advantage of the larger packet size.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please be aware that the&amp;nbsp;NRF_ESB_CREATE_PAYLOAD macro doesn&amp;#39;t work for payloads this large, so you would have to fill the struct manually:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;nrf_esb_payload_t tx_payload = {0};&lt;/code&gt;&lt;br /&gt;&lt;code&gt;tx_payload.data[0] = x;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;tx_payload.data[1] = y;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;.&lt;/code&gt;&lt;br /&gt;&lt;code&gt;.&lt;/code&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>