[solved] NRF24L01+ acting weirdly

Hello guys i am experimenting with the nrf24l01+ module. The connection is a bit like follows:

1st atmega8:
---| |
---| m8 |
inputs ---| |
to ---| |
1st atmega8 ---| |
---| |-|1st |
---| |-|nrf24l01+|

2nd atmega8:
---| |
---| m8 |
2nd atmega8 ---| |
to ---| |
leds ---| |
---| |-|2nd |
---| |-|nrf24l01+|
(Both contain the remaining interfacing for the m8; both the m8 are running at 3.3v through a ams1117 regulator, same power going to their radios; both radios have 10uf connected to their power pins; both regulators being powered by 5v 2A adapters, with capacitors on both input and output side)

Now what i am trying to do is blink the led corresponding to the input which goes 0(internally pulled up). So i wrote the sketches and made the circuit one by one. First, trying to get the inputs from the 1st m8, i read the data incoming with raspberry pi and arduino- that was successful without any problems. After that i did the 2nd circuit and wrote sketch for it and that is where the weirdness began:
When i tested it with raspberry pi by sending the data with raspberry pi it was successfully working without any problems. But when i tested it along with the 1st transmitter circuit, the radio appears to get locked in the 2nd rx circuit which is really weird. Sometimes the 1st transmission came and after that the radio appeared to be locked up(not the atmega8, i checked by adding external switch to the rx circuit and changing leds). With the condition being unchanged(1st transmission came then circuit didn't change), i tested first by raspberry pi to check if tx was sending data properly which it was, then tried sending data from raspberry pi to the rx radio and it wasn't receiving anything(checked from ack). Now, after that i reset the rx circuit and tried sending data by raspberry pi, then stopped sending, then started sending again and all the data was received successfully, all acks were received by the pi.
This is what has stumped me why does the nrf24l01+ keeps getting locked when getting data from 1st tx circuit and works normally when used with raspberry pi -_- (if there was a medium/channel/data type problem then both shouldnt be working; if there was a problem in the program then again both shouldnt be working)

The initialization of the radio should give the details about the talking medium(using tmrh20's rf24 library)
The initialization code for tx:

#include <nRF24L01.h>
#include <RF24.h>
#include <SPI.h>
const uint64_t pipes[2] = {0xCDEF123456,0x65ee04452e};
void setup()
{ radio.begin();
 radio.setChannel(108);
 radio.setPALevel(RF24_PA_MAX);
 radio.setDataRate(RF24_250KBPS);
 radio.setAutoAck(1);
 radio.setRetries(5,15);
 radio.setCRCLength(RF24_CRC_16);
 radio.enableDynamicPayloads(); 
 radio.openWritingPipe(pipes[0]);
 radio.openReadingPipe(1,pipes[1]);
 radio.stopListening();
 DDRD=0x00; PORTD=0xff;
}

At rx side:

#include <nRF24L01.h>
#include <RF24.h>
#include <SPI.h>
const uint64_t pipes[2] = {0xCDEF123456,0x65ee04452e};
void setup()
{ radio.begin();
 radio.setChannel(108);
 radio.setPALevel(RF24_PA_MAX);
 radio.setDataRate(RF24_250KBPS);
 radio.setAutoAck(1);
 radio.setRetries(5,15);
 radio.setCRCLength(RF24_CRC_16);
 radio.enableDynamicPayloads(); 
 radio.openWritingPipe(pipes[1]);
 radio.openReadingPipe(1,pipes[0]);
 radio.startListening();
 DDRD=0xff; PORTD=0xf7;
}

(Same tx rx options working on raspberry pi too)

Please someone help me with this i am really confused. Thank you for your time!

I tested if there was a radio failure since the library ceases operation if failure is detected and even then there was no failure detected.
failure detection code:

 if (radio.failureDetected)
 {radio.begin();                       // Attempt to re-configure the radio with defaults
  radio.failureDetected = 0;           // Reset the detection value
  radio.openWritingPipe(pipes[1]); // Re-configure pipe addresses
  radio.openReadingPipe(1,pipes[0]);
  digitalWrite(rel,~digitalRead(rel));
  delay(50);
 }

(uncommented the failure detection in rf24_config first, rel is pin for another led to show status)

Since i was testing alternate transmission from raspberry pi only, i just now tested to see if the receiver is getting transmission from arduino too, and alas the receiver isn't getting data from arduino either. So the only thing working is transmission from raspberry pi here, both the transmission from the solo atmega8 and the arduino aren't getting to the receiver, whereas both the transmissions from the solo atmega8 and arduino are being intercepted without any problem by the raspberry pi.

Then i tested the connection making the transmitting atmega8 as a receiver, and transmitted data from raspberry pi whose ack it sent back nicely, then i tested same thing again with arduino as transmitter and damn, there were no acks coming in.

So i guess what i found was the atmega8s are unable to receive the data from another atmega using the nrf24l01+ radio, but the arduino and raspberry pi are both able to receive and transmit data.

Is there a bug in the rf24 library which might be causing this?

(few days ago i tested link between atmega8a and atmega32a with m8 as rx, and the link was working without any problem)

Nevermind, found the fault; i was sending two packets, but only needed one of them so i tried to parse only that packet without reading the other size packet. That resulted in the FIFO buffer not being cleared that's why the radio appeared to be locked up. One line solution, i cleared the buffer and bam no problem reading data anymore.

iamnotgoogle:
Nevermind, found the fault; i was sending two packets, but only needed one of them so i tried to parse only that packet without reading the other size packet. That resulted in the FIFO buffer not being cleared that's why the radio appeared to be locked up.

If you had posted all of your code (like it is described in "How to post a programming question"),
there would have been a chance to help you.