Enhanced shockburst and pipes - comment

Discussion about wireless devices

Enhanced shockburst and pipes - comment

Postby kiwironnie » Tue Aug 17, 2010 12:06 am

Having successfully got an nRF24L01+ testbed running, using the very excellent nRF24L01 tutorials, I just want to share some thoughts on enhanced shockburst and pipes, particularly for communicating with more than one node.

When communicating with multiple nodes its efficient to reserve pipe 0 just for receiving acks and use pipe 1 (or any of the other pipes) as the main data channel.

The reason is that the address of pipe 0 of the transmitting node needs to be set to the same address of whatever pipe is receiving the data at the receiving node. The receiving node uses this address to return acks for that pipe to the transmitting node (which is hellishly clever to avoid having to handle a source address). Acks are always handled by pipe 0 of the transmitting node.

If the transmitting mode then wishes to listen for data from other nodes on pipe 0, it would have to set this back to whatever is the node address for pipe 0 that's known to all other nodes. To avoid this extra step it can listen for data on pipe 1 and reserve pipe 0 just for acks. Presumably this is why the default settings for the nRF24L01 are pipe 0 and pipe 1 enabled, although I haven't found this in any documentation so far.
kiwironnie
 
Posts: 13
Joined: Sat Aug 07, 2010 6:40 am

Re: Enhanced shockburst and pipes - comment

Postby brennen » Tue Aug 17, 2010 12:51 pm

Thanks for the comment! This is useful information that, even after writing the tutorials, I hadn't really even totally wrapped my head around. The Nordic documentation isn't always the best at laying things like this out, so this summary should be very helpful to those who are trying to more efficiently use pipes with Enhanced Shockburst.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Re: Enhanced shockburst and pipes - comment

Postby cher18 » Sun Oct 30, 2011 8:04 pm

Hi

Im currently using the nRF24L01+ module but using an Atmega and Winavr as my compiler. On the topic of using Auto ACK, was wondering if after setting the EN_AA register, does the PTX turn into a receiver automatically and PRX a transmitter and will it automatically send an acknowledgement, or will i have to manually program them to change and resend the payload from the PRX to the PTX? Because as soon as i enable the EN_AA register, everything stops working. :(

Thanks
cher18
 
Posts: 1
Joined: Sat Oct 29, 2011 12:22 pm

Re: Enhanced shockburst and pipes - comment

Postby brennen » Mon Oct 31, 2011 12:14 pm

The L01+ will automatically handle the PRX/PTX changes when using auto-ack. If you use my tutorial code, but change only the initialization and necessary #defines in nrf24l01.h, you shouldn't have any trouble getting auto ack and retransmit working.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm


Return to Wireless

Who is online

Users browsing this forum: No registered users and 1 guest

cron