This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can I get some clarification regarding pipes and addresses?

Hi,

I've asked a few questions previously regarding programming of the nRF24L01/+ for simple data interchange between two devices, and my questions were answered -- many thanks.

However I still don't seem to be able to get a PTX and a PRX device to 'talk' to each other, and I think it may be because I'm not doing the right thing regarding setting up the pipes and addresses. I've read through the relevant pages in the nRF24L01+ data sheet, but I must be 'thick' because I can't get things straight. I've also looked through the code in the RF24 library (for Arduinos), but to be honest I can't see how the functions work in that library -- or how the 'Getting Started.ino' example works, especially for PTX mode.

At present I'm setting 'Radio 0' to receive using pipe 0, and leaving its TX_ADDR at &H30E7E7E7E7E7, while 'Radio 1' is set to receive on pipe 1 with its address set to &H30C2C2C2C2C2 -- is that wrong? Then when either radio is set to PTX mode or PRX mode, I simply clear or set the PRX bit in the chip's CONFIG register -- with the CE line pulsed high for 20us in PTX mode, after loading the transmit data into the fifo.

There must be something wrong with the above, but I can't see what it is. I guess I'm also confused about the ACK packet which seems to be sent by the PRX device -- this is sent ahead of the returned payload, is it not?

I hope you can make sense of the above, and provide some clarification please.

Thanks, Jim

  • Hi, I probably should have noted that I am not using 'Enhanced Shockburst', because I want my 'radios' to be compatible with others using the nRF24L01 -- not just the nRF24L01+. I guess I don't know if 'regular' Shockburst does any auto acknowledgment anyway -- does it? Perhaps I still need to send an ACK 'manually'... Sorry about my muddle. JimR

  • Also, the problem I have with the Getting Started RF24 program is that it doesn't seem to be sending the data for transmission to the chip's TX FIFO -- yet transmission still takes place! JimR

  • Hi JimR,

    Why would you have the receiver pipe address different with the transmitter TX address ? How would they talk to each other if the addresses are different ?

    I suggest you follow the instruction at appendix 1 in the nRF24L01 datasheet.

  • Hi Hung Bui,

    Thank you for that comment, although it really wasn't very helpful at all. For a start, you suggested that I follow the instruction at 'Appendix 1' in the datasheet, whereas my copy of the datasheet has three appendices, labelled A, B and C. So there's a puzzle straight away, although even if I assume that you mean appendix B, this still doesn't talk about actual addresses -- only address widths! Your other questions also don't make clear whether you mean that the transmitting device needs to use the same pipe address as the receiver, or what. Frankly, it's a bit confusing. JimR

  • Hi again Hung Bui, I have tried to read the explanation in appendix A of the nRF24L01 datasheet, and frankly I still find it confusing. But I have tried configuring Radio 0 with its TX_ADDR address pipe set to C2C2C2C2C2 and its RX_ADDR_P0 pipe address set to E7E7E7E7E7, and then Radio 1 is configured with its TX_ADDR pipe set to E7E7E7E7E7 and its RX_ADDR_P1 address set to C2C2C2C2C2. So each radio's receive address is set to the transmit address of the other, with the idea that Radio 0 transmits to Radio 1 via pipe 0, and Radio 1 transmits to Radio 0 via pipe 1. BUT THEY STILL DON'T COMMUNICATE -- so what is wrong? All I can think of at present is that they might have to use the same pipe for communication each way -- but that seems crazy. JimR

Related