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

nRF24L01+ Configuration vs Reliable Link...

I've been browsing the forum for a bit now, tried some things but still no success... so here's my problem...

My goal is to setup a simple bi-directional wireless link between two devices… using a PIC24F and the nRF24L01+ chip as the hardware. I should say that the RF side is actually a module which has an extra PA + LNA attached (+ SMA/duck antenna). There is no fancy networking. I just want one PTX and one PRX using the “ACK + Payload” system with a fixed packet length of 4 bytes. I thought this would be easy, but to this point I haven't got any reliable communications between my two radios, I think that I have seen one packet about every 60s (if lucky). It could be hardware or software related… and I’m not using any library (probably a mistake there). I tried using the steps in the datasheet (different addresses – I’m using AA:AA:AA:AA:AA ) without success. I'm a little confused about the configuration and how to setup the “ACK + Payload”

My initialisation values below are printed out from UART (in hex) below…

INIT PRX, CMD: 20 DATA: 7F, CMD: 22 DATA: 1, CMD: 21 DATA: 1, CMD: 31 DATA: 4, CMD: 2A DATA: AA AA AA AA AA, CMD: 23 DATA: 3, CMD: 24 DATA: 34, CMD: 25 DATA: 78, CMD: 26 DATA: 26, CMD: 3C DATA: 1, CMD: 3D DATA: 6, CMD: 27 DATA: 70, FLUSH_TX, FLUSH_RX, INIT PRX COMPLETE,

INIT PTX, CMD: 20 DATA: 7E, CMD: 22 DATA: 1, CMD: 21 DATA: 1, CMD: 31 DATA: 4, CMD: 2A DATA: AA AA AA AA AA, CMD: 30 DATA: AA AA AA AA AA, CMD: 23 DATA: 3, CMD: 24 DATA: 34, CMD: 25 DATA: 78, CMD: 26 DATA: 26, CMD: 3C DATA: 1, CMD: 3D DATA: 6, CMD: 27 DATA: 70, FLUSH_TX, FLUSH_RX, INIT PTX COMPLETE,

Firstly, can someone please identify if there is anything wrong with these (above) values?

When I go through a process of elimination, I can see that there are certain registers (that can be written) which are common i.e. SETUP_AW, SETUP_RETR, RF_CH, RF_SETUP… also the RX_ADDR_P0, EN_AA and EN_RXADDR are the same too. Because I have been trying so many ways I’m second guessing myself so… could someone please suggest (explicitly) a working configuration for PTX and PRX… specifically the registers: EN_AA, EN_RXADDR, RX_ADDR_P0, TX_ADDR, RX_PW_P0, DYNPD and FEATURE.

Regarding the hardware… outside the RF module, it is running from 3.3V, there is 20uF ceramic and 0.1uF ceramic on the supply rail… I have setup the module for the highest RF output and am typically seeing about 50mA (for both, which seems low?) when I’m sending about 1 packet per second. They are powered from (the same) 12V battery. The two units are side by side on my desk about 30cm apart.

Any suggestions here too would also be muchly appreciated!! Thanks in advance!!

P.S. your forum re-formatted my text to remove the carriage return... I added some commas for the UART dump??

  • ebay supplier (china I presume)

    YJ-15008+PA is the part.. or at least what is written on the PCB

  • Hi Sammy,

    If it's from ebay, there is more chance that it's a counterfeit. It may works in some case and in some case it wouldn't. We recommend you to get the module from our distributor. Please find the list of the distributor on our website in the footer.

  • So I bought more units from'Seeed Studio' and am having the same problem... I've put my serial port dump of the setup sequence below.... I think (other than a hardware issue, this is the most likely cause of my problems...)

    INIT PTX
    CMD: 20 DATA: 7E
    CMD: 21 DATA: 1
    CMD: 22 DATA: 1
    CMD: 23 DATA: 3
    CMD: 24 DATA: 34
    CMD: 25 DATA: C
    CMD: 26 DATA: 24
    CMD: 2A DATA: 1 2 3 4 5
    CMD: 30 DATA: 1 2 3 4 5
    CMD: 31 DATA: 4
    CMD: 3C DATA: 1
    CMD: 3D DATA: 6
    CMD: 27 DATA: 70
    CMD: FLUSH_TX
    CMD: FLUSH_RX
    INIT PTX COMPLETE
    STATUS: E
      TX FIFO EMPTY
      RX FIFO EMPTY
    STATUS: E
      TX FIFO EMPTY
      RX FIFO EMPTY
    STATUS: E
      TX FIFO EMPTY
      RX FIFO EMPTY
    STATUS: E
      TX FIFO EMPTY
      RX FIFO EMPTY
    PTX TX DATA: 0 85 254 140
    STATUS: 1E
      MAX RT INT!
      TX FIFO EMPTY
      RX FIFO EMPTY
    STATUS: E
      TX FIFO EMPTY
      RX FIFO EMPTY
    STATUS: E
      TX FIFO EMPTY
      RX FIFO EMPTY
    STATUS: E
      TX FIFO EMPTY
      RX FIFO EMPTY
    PTX TX DATA: 1 85 254 140
    STATUS: 1E
      MAX RT INT!
      TX FIFO EMPTY
      RX FIFO EMPTY
    STATUS: E
      TX FIFO EMPTY
      RX FIFO EMPTY
    STATUS: E
      TX FIFO EMPTY
      RX FIFO EMPTY
    STATUS: E
      TX FIFO EMPTY
      RX FIFO EMPTY
    PTX TX DATA: 2 85 254 140
    ================================
    INIT PRX
    CMD: 20 DATA: 7F
    CMD: 21 DATA: 1
    CMD: 22 DATA: 1
    CMD: 23 DATA: 3
    CMD: 24 DATA: 34
    CMD: 25 DATA: C
    CMD: 26 DATA: 24
    CMD: 2A DATA: 1 2 3 4 5
    CMD: 31 DATA: 4
    CMD: 3C DATA: 1
    CMD: 3D DATA: 6
    CMD: 27 DATA: 70
    CMD: FLUSH_TX
    CMD: FLUSH_RX
    INIT PRX COMPLETE
    STATUS: E
      TX FIFO EMPTY
      RX FIFO EMPTY
    STATUS: E
      TX FIFO EMPTY
      RX FIFO EMPTY
    STATUS: E
      TX FIFO EMPTY
      RX FIFO EMPTY
    STATUS: E
      TX FIFO EMPTY
      RX FIFO EMPTY
    
  • @Sammy: I don't know how to read your log, please explain in easier to understand way. How unreliable it was ? How did you test ?

  • Your forum re-formats my cut and paste =( you should really fix that!!

Related