2

Test case:

2 arduino nodes with nRF24L01+ transceivers. Using maniacbug's RF24 library. Using pipes 0 and 1. (Auto-ACK is ON for all pipes by default)

When I set Auto-ACK ON for all pipes rf24.setAutoAck(true): it works. When I set Auto-ACK OFF for all pipes rf24.setAutoAck(false): it works.

But when Auto-ACK is ON for pipe1 and OFF for pipe0 (I want pipe0 for broadcasting) rf24.setAutoAck(0,false):it stop working (no packet is received or sent). Same thing with Auto-ACK ON for pipe0 and OFF for pipe1

Couldn't find anything about it on the datasheet neither other forums nor here. Is there something I'm missing?

Test sketches:

Node 1

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

RF24 rf24(9,8);

uint64_t pipe0 = 12312312LL;
uint64_t pipe1 = 11111111LL;

int data[2];    

void setup()
{
    Serial.begin(115200);
    data[0] = 123;
    data[1] = 456;

    rf24.begin();
    rf24.setChannel(109);
    rf24.setPayloadSize(2);
    rf24.setDataRate(RF24_2MBPS);
    rf24.openReadingPipe(0,pipe0);
    rf24.openReadingPipe(1,pipe1);
    rf24.openWritingPipe(22222222LL);
    rf24.setAutoAck(0,false);
}

void loop()
{
    delay(1000);
    Serial.print("ACK: ");
    Serial.println(rf24.write(data,sizeof(data)));
}

Node 2:

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

RF24 rf24(9,8);

uint64_t pipe0 = 12312312LL;
uint64_t pipe1 = 22222222LL;

int data[2];    

void setup()
{
    Serial.begin(115200);

    rf24.begin();
    rf24.setChannel(109);
    rf24.setPayloadSize(2);
    rf24.setDataRate(RF24_2MBPS);
    rf24.openReadingPipe(0,pipe0);
    rf24.openReadingPipe(1,pipe1);
    rf24.setAutoAck(0,false);   
    rf24.startListening();
}

void loop()
{
    if(rf24.available())
    {
        Serial.println("Got somethin");
        int incoming;
        rf24.read((byte *) &incoming,2);
        Serial.println(incoming);
    }
}
Gerard
  • 31
  • 1
  • 3
  • 1
    same problem here, hours wasted so far... –  Mar 05 '15 at 17:28
  • 1
    Workaround: enable|disable auto-ack on all pipes just before sending on the pipe you want, reestablishing previous state afterwards – Gerard Apr 20 '15 at 16:45
  • 1
    You could try using the new for of RF24 maintained by TMRh20 and submit an issue if it is caused by the library. – Avamander Aug 17 '15 at 23:01

0 Answers0