2 arduino nodes with nRF24L01+ transceivers. Using maniacbug's RF24 library. Using pipes 0 and 1.
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 too.
But when I set Auto-ACK 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 (arduino):
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);
}
}