setChannel(1) on the transmitter/receiver breaks communication

The code of my transmitter looks like the following:

 Serial.begin(115200);

    if (!radio.begin()) {
        while (1);
    }

    
    radio.setPALevel(RF24_PA_HIGH); 
    radio.setDataRate(RF24_250KBPS); 
    radio.setRetries(100, 20); 
    radio.startListening();

    Serial.println("ok");

If i add radio.setChannel(1) on both receiver and transmitter, the transmission does not work anymore - it tries to send messages without success.

The code looks like the following on both receiver and trasnmitter:

Serial.begin(115200);

if (!radio.begin()) {
    while (1);
}

radio.setChannel(1)


radio.setPALevel(RF24_PA_HIGH); 
radio.setDataRate(RF24_250KBPS); 
radio.setRetries(100, 20); 
radio.startListening();

Serial.println("ok");

Have you managed to achieve communication on any other channel number?

I’ve tested multiple numbers, also high numbers like 124, nothing worked :frowning:

What kind of radios are you using? I'm going to guess the PA+LNA versions with antennas?

Have you tried at a higher data rate like RF24_2MBPS and lower PALevel like RF24_PA_MIN ?

You are using an invalid retry value, the max is 15. Try a balanced number like setRetries(5,5).

I'm using the nRF24L01+, in this settings https://www.youtube.com/shorts/Dy5WsPUHh50 (without the big/long antenna)

I've tried with lower data rate (250kbps).

Why should i try with higher data rate? I mean, shouldn't channel work with any data rate? In the docs I don't find anything suggesting that the channel depends on the data rate.

Same for PALevel.

I develop and maintain the RF24 library. I suspect power supply issues. I am concerned also if there are any bugs in the library. That is why I ask.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.