Regarding XBee Communication

Hi,
I recently bought two XBee modules, Arduino XBee shields and Arduino UNO Board. One XBee module is coordinator and other one is End node. I am able to establish communication between Coordinator XBee module and End node XBee Module. when i try to send data from end node XBee Module to coordinator XBee Module communication is not working.

char msg = ' '; 

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

}
void loop() {
  while(Serial.available() > 0) {
    msg=Serial.read();
    Serial.print(msg);
  }
  delay(1000);
}

can any one suggest me some solution for it?
Thanks in advance…

can any one suggest me some solution for it?

Without knowing what kind of XBees you have, and how you have configured them? No.

Is that code for the coordinator or the end node?

Which shields?

These are the following configurations of XBee XBee - Coordinator XBee - End Node Product Family XB24-ZB XB24-ZB Function Set Zigbee Coordinator AT Zigbee End Device AT Baud Rate 9600 9600 PAN ID 123 123 DH 13A200 13A200 DL 40cXXXXX 40CXXXXX

The code is for co-ordinator. please find the below code for End node

char msg = ' '; 

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

}
void loop() {
  while(Serial.available() > 0) {
    msg=Serial.read();
    Serial.println(msg);
    if(msg == 'H'){
      Serial.println("ON");
    }else if(msg == 'L'){
      Serial.println("OFF");
    }else{
      Serial.println("Signal error");
    }
  }
  delay(1000);
}

Thanks for your quick reply.....