ERROR while trasmitting data using NRF24l01 between arduino mega(as transmitter)

hi all

i am using arduino mega as transmitter and uno as reciever

here is the code i use

Transmitter

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

char msg[20] = "Hello World!";
char rec[27];
const uint64_t pipe[1] = {0xF0F0F0F0E1LL};
RF24 radio(7,52);

void setup()
{
Serial.begin(115200);
radio.begin();
radio.enableAckPayload();
radio.enableDynamicPayloads();
radio.setRetries(5, 15);
radio.openWritingPipe(pipe[0]);

}

void loop()
{
Serial.println("TX MILLS: " + String(millis()));

if(radio.write(msg,sizeof(msg)))
{
Serial.print("TX: ");
Serial.println(msg);
if(radio.isAckPayloadAvailable())
{
radio.read(&rec, 27);
Serial.println("RX: ");
Serial.println(rec);
}
else
{
Serial.println("No ACK recieved...");
}
}
else
{
Serial.println("Cannot Transmit..");
}
delay(1000);
}

Reciever

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

char msg[20] = "Hello awesome";
char rec[27];
const uint64_t pipe[1] = {0xF0F0F0F0E1LL};
RF24 radio(7,52);

void setup()
{
Serial.begin(115200);
radio.begin();
radio.enableAckPayload();
radio.enableDynamicPayloads();
radio.setRetries(15, 15);
radio.openReadingPipe(1, pipe[0]);
radio.startListening();

}

void loop()
{
Serial.println("RX MILLS: " + String(millis()));

if(radio.available())
{

radio.read(&rec, sizeof(rec));
Serial.print("RX: ");
Serial.println(rec);
radio.writeAckPayload(1, msg, sizeof(msg));
Serial.print("TX :");
Serial.println(msg);
}
delay(500);
}

i don't why i am not able to transmit data
it only transmits blank
so i also doesn't know wether the reciever side would work.
if any can help me it would be great it is for a mini project.

rec.ino (685 Bytes)

transmit.ino (800 Bytes)

i don't why i am not able to transmit data
it only transmits blank

What evidence do you have that it is transmitting "blanks"

 Serial.println("TX MILLS: " + String(millis()));

You need to be rapped on the knuckles with a steel ruler for this abomination. Quit being lazy. Use two Serial.print() calls and NO Strings.

if(radio.write(msg,sizeof(msg)))

What is the second argument to this function supposed to be? The size of the array or the amount of data in the array?

  radio.read(&rec, sizeof(rec));

Does this function really want the address of the array?