<?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>Accessing nRF51 Radio packet data outwith payload</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4405/accessing-nrf51-radio-packet-data-outwith-payload</link><description>Hello, 
 We are developing a system using a receiver nRF unit, and multiple transmitter nRF units. The transmitters use the proprietary radio protocol (not bluetooth LE) to broadcast data periodically, which the receiver listens to. 
 We are using the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 05 Feb 2015 05:36:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4405/accessing-nrf51-radio-packet-data-outwith-payload" /><item><title>RE: Accessing nRF51 Radio packet data outwith payload</title><link>https://devzone.nordicsemi.com/thread/15653?ContentTypeID=1</link><pubDate>Thu, 05 Feb 2015 05:36:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ceed2e87-8de7-4f05-b6a5-eeda5d05c9d1</guid><dc:creator>Brajesh</dc:creator><description>&lt;p&gt;Hi All&lt;/p&gt;
&lt;p&gt;As mentioned by Blake, I&amp;#39;m a bit confused, whether shall i use BLE or Radio protocol for my small data transfer. Which one is more power efficient ?&lt;/p&gt;
&lt;p&gt;Thanks .&lt;/p&gt;
&lt;p&gt;Brajesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing nRF51 Radio packet data outwith payload</title><link>https://devzone.nordicsemi.com/thread/15652?ContentTypeID=1</link><pubDate>Wed, 12 Nov 2014 15:10:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f306eca-7827-4983-ace6-7ce1907273ad</guid><dc:creator>Blake</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thank you for the response. As I understand, the structure of the address fields are split into &lt;code&gt;BASEn&lt;/code&gt; and &lt;code&gt;PREFIXn&lt;/code&gt; to facilitate backwards compatibiltiy with an older nordic radio device. I also understand that since the nRF51822 is not hardware limited, I &lt;em&gt;can&lt;/em&gt; have unique values such that &lt;code&gt;BASE0 != BASE1&lt;/code&gt;, since the shared values are only necessary for the nRF24L01P.&lt;/p&gt;
&lt;p&gt;Further, I understand that both the receiver and transmitters need to have equivalent BASE and PREFIX values such that &lt;code&gt;rx::BASE0 == tx::BASE0&lt;/code&gt;. Lastly, &lt;em&gt;if I want to have auto-ack working&lt;/em&gt;, I need each tx, &lt;code&gt;tx-n&lt;/code&gt; to have its tx address, &lt;code&gt;tx-n::NRF_RADIO-&amp;gt;TXADDRESS&lt;/code&gt; to equal the value of the base/prefix I want to use, i.e. to use &lt;code&gt;BASE0 | PREFIX0&lt;/code&gt;, I need to set &lt;code&gt;tx-0::NRF_RADIO-&amp;gt;TXADDRESS = 0&lt;/code&gt;. I also need the rx&amp;#39; receive addresses to reference &lt;em&gt;all&lt;/em&gt; &lt;code&gt;tx-n::NRF_RADIO-&amp;gt;TXADDRESS&lt;/code&gt; values.&lt;/p&gt;
&lt;p&gt;Please correct me if any of these statements are wrong.&lt;/p&gt;
&lt;p&gt;Next, I have a couple questions related to these:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How can I enable auto-ACK?&lt;/li&gt;
&lt;li&gt;What happens if a tx fails to receive an ACK? Does it automatically re-transmit?&lt;/li&gt;
&lt;li&gt;How can I make &lt;code&gt;rx::NRF_RADIO-&amp;gt;RXADDRESSES&lt;/code&gt; accept pipes from, for example, all of &lt;code&gt;BASEn | PREFIXn&lt;/code&gt; for n on [0..4]?&lt;/li&gt;
&lt;li&gt;When rx receives a packet and automatically ACKs it, how can I programmatically check which n from [0..4] was received?&lt;/li&gt;
&lt;li&gt;I understand that having a larger payload size (&lt;code&gt;PACKET_PAYLOAD_MAXZIZE&lt;/code&gt;) will increase the likelihood of failed transmission, and also increase power consumption. Where in the specification can I find approximate likelihood and consumption values for different &lt;code&gt;PACKET_PAYLOAD_MAXSIZE&lt;/code&gt; values?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks again,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing nRF51 Radio packet data outwith payload</title><link>https://devzone.nordicsemi.com/thread/15651?ContentTypeID=1</link><pubDate>Wed, 12 Nov 2014 12:50:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:deabb2dc-e03a-4862-a982-e1f33c912544</guid><dc:creator>Asbj&amp;#248;rn</dc:creator><description>&lt;p&gt;Lets see if we are able to summarize this and answer your questions.&lt;/p&gt;
&lt;p&gt;If I start with the addressing PREFIX and BASE. For my own part it is easier to understand these two by looking at the Enhanced Shockburst engine Nordic has in their legacy products. There&amp;#39;s a good reason for having both PREFIX and BASE. &lt;a href="https://www.nordicsemi.com/eng/content/download/2726/34069/file/nRF24L01P_Product_Specification_1_0.pdf"&gt;So please have a look in chapter 7, and specifically chapter 7.6 of the nRF24L01+ product specification.&lt;/a&gt; As you see there, there&amp;#39;s a feature called Multiceiver that&amp;#39;s able to listen for multiple address matches (pipes) at the same time. These addresses are arranged so that for pipe0 all five bytes of the address if unique compare to pipe1-pipe5. Pipe1 to pipe5 however share the 4 MSB and have unique LSB. So PREFIX on the nRF51 is to be able to have the unique LSB on the pipes for backwards compatibility and BASE would be the shared 4 MSB in pipe1 to pipe5. On the nRF24L01+ this was all done by a HW implemented state machine, but for the nRF51 this is done in SW and hence more flexible. So for your setup, lets say you have one PTX (primary transmitter) sending to one specific PRX (primary receiver) these two units will have to match the PTX TX address to the PRX RX address, both BASE and PREFIX would have to be the same. Then if you have auto-ACK, the PRX will use the address on the receive pipe for transmitting the ACK back and hence the PTX will have to listen for the ACK coming in on the same address as used for the TX it just sent.&lt;/p&gt;
&lt;p&gt;If you scale this up and have one PRX configured with two pipes, so that it is listening for two different addresses RX_ADDRESS0 (made from BASE0 and PREFIX0) and RX_ADDRESS1 (made from BASE1 and PREFIX1), the two PTX can be configured to communicate with the PRX through their own separate addresses. The PRX will then send the ACK to the specific PTX that it received from.&lt;/p&gt;
&lt;p&gt;The addresses are configured by you by writing to the BASE0, BASE1, PREFIX0 and PREFIX1 and the selecting the pipe/TXADDRESS/RXADDRESSES. Once you have configure a pipe to use a specific RXADDRESS and set it to use auto-ACK, it will handle the transmission of the ACK on it&amp;#39;s own.&lt;/p&gt;
&lt;p&gt;With regard to the S0, Length and S1 these are field used to be backwards compatible as well and or define your own packet structure. &lt;a href="https://www.nordicsemi.com/eng/content/download/2726/34069/file/nRF24L01P_Product_Specification_1_0.pdf"&gt;Also here you might have some benefit from reading the history from nRF24L01+. Please see chapter 7.3 and specifically 7.3.3.&lt;/a&gt; You&amp;#39;ll see that the S0, Length and S1 can be used to have the same structure as the &amp;quot;Packet control field&amp;quot; in Enhanced Shockburst. So these fields will be updated when you write to the nrf_esb_add_packet_to_tx_fifo() with the needed S0, Length and S1 size and content.&lt;/p&gt;
&lt;p&gt;This became a long answer, but hopefully it gave you some more context. Basically these fields are based on the fact that we want to be backwards compatible and it might be easier to understand them by reading the Enhanced Shockburst example in the nRF24L01+ product specification. Please let us know if you still have further questions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;edit to answer questions in comments:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;1. How can I enable auto-ACK?&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You do this by using the Enhanced
Shockburst library in the nRF51 SDK.
Please see documentation here
&lt;a href="https://devzone.nordicsemi.com/documentation/nrf51/6.1.0/s110/html/a00852.html"&gt;devzone.nordicsemi.com/.../a00852.html&lt;/a&gt;
and specifically the function named:
nrf_esb_enable_dyn_ack().&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;2. What happens if a tx fails to receive an ACK? Does it automatically re-transmit?&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you have enabled auto-ACK and are using the nrf_esb_add_packet_to_tx_fifo() to send the payload the re-transmit will be handled as you have configured it through the nrf_esb_set_retransmit_delay and nrf_esb_set_max_number_of_tx_attempts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;3. How can I make rx::NRF_RADIO-&amp;gt;RXADDRESSES accept pipes from, for example, all of BASEn | PREFIXn for n on [0..4]?&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;See the functions related to this one: nrf_esb_set_base_address_0 there are functions for BASEn, PREFIXn and setting which pipes to use.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;4. When rx receives a packet and automatically ACKs it, how can I programmatically check which n from [0..4] was received?&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;nrf_esb_fetch_packet_from_rx_fifo will give you the pipe number the specific payload was receive on.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;5. •	I understand that having a larger payload size (PACKET_PAYLOAD_MAXZIZE) will increase the likelihood of failed transmission, and also increase power consumption. Where in the specification can I find approximate likelihood and consumption values for different PACKET_PAYLOAD_MAXSIZE values?&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We don’t have an overview over this as there are parameters outside our control that would affect this as well. You could have good and bad designs making it easier/worse to send packages, antenna design and placement, environment and noise would all affect this experiment. It would be a lot of assumption doing such a test that wouldn’t be realistic for any other setup and could in worst case give customers false expectations due to ideal scenario.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>