Doorbell ZigBee Project - Not Working- Help

Hello, everyone.

I'm getting myself educated with ZigBee, so I'm reading the Faludi's Book. But I'm not getting the DoorBell Project to work.

First of all, I'm using two Arduinos Due with this ZigBee Shield

Regarding the modules:

Product Family: XB24C

Function Set: ZigBee TH REG

Firmware Version: 405F

They're set up as stated in Faludi's Book. The Coordinator is configured with CE = 1 and AP = 0. The router is in factory mode. I've used XCTU to get them updated and I've used CoolTerm to address the modules as well as set the same ID for both of them.

The first chat example in the book I've done well, but the I'm struggling to get the second one to work.

Here it is the Button program:

int BUTTON = 8;
int LED = 11;

void setup() {

void loop(){
  //send a capital D over the serial port if the button is pressed
  if (digitalRead(BUTTON) == LOW){    
    delay(10); // prevents overwhelming the serial port  } 
  // if a capital K is received back, light the feedback LED  
  if (Serial.available() > 0 ) {    
    if ( == 'K') {      
      digitalWrite(LED, HIGH);    
    // when the button is released, turn off the LED    
    if (digitalRead(BUTTON) == HIGH) {      
      digitalWrite(LED, LOW);    

Here it is the Bell program:

int BELL = 9;

void setup(){

pinMode(BELL, OUTPUT);  

void loop() {  
  // look for a capital D over the serial port and ring the bell if found  
  if (Serial.available() > 0){
    if ( == 'D'){      
      //ring the bell briefly
      digitalWrite(BELL, HIGH);      
      digitalWrite(BELL, LOW);    

The codes seem to be working fine as I've tested them with the Monitor Serial and it worked well. But, when the button is pressed the modules feel like they're not talking to each other, because nothing happens. I've reset and re-configured them to make sure everything was set up properly. I also comeback to the first example in the book and the modules are talking to each other just fine, so I don't know what's the problem. I really want to get this project done as I'm looking foward to getting more knowledge regarding the ZigBee possibilities.

I really appreciate your attention and help. Thank you very much!

Please post the code for the example that worked.

The example that worked I was not using Arduino, it was just a simple chat between the 2 ZigBee modules

The way I did it you can find right here