X-bee ATDB command

This is my sender code:

char c;
int i;

void setup()
{
      Serial.begin(9600);
      delay(200);
}

void loop()
{
  Serial.print("Rc");          // this is my flush commend
  delay(1000);
  Serial.print("+++");          // start AT command
  delay(2000);
  Serial.println("ATDB");   // ask the RSSI
  delay(2000);
  Serial.println("ATCN");   // the end of AT command
  delay(2000);
  while(Serial.available()>0){    // print response messages
    i = Serial.read();
    if(i>=48||i==13){
      c=i;
      Serial.print(c);
    }else{
      Serial.print(i);
    }
    Serial.println("");
    delay(100);
  }
}

And my receiver is:

char c;
int i;
void setup()
{
      Serial.begin(9600);
      delay(200);
}

void loop()
{
  while(Serial.available()>0){
    c = Serial.read();
    if(c=='R'){
      c = Serial.read();
      if(c=='c'){
        Serial.flush();
      }
    }
    delay(100);
  }
}

I got the "OK" message for the "+++" command and the "ATCN" command.But, for the "ATDB" command, I got "0" in any distance.
Why my "ATDB" doesn't work?

Thanks.

Please help me~~~
Using X-bee(not X-bee pro), so it doesn’t have API mode.

Umm...
Now the question is: How to restart the X-Bee shield?
I push the restart button, and it response the right RSSI value to me.
So I wonder if any command can restart it?
thanks.

You haven't provided much information. Which series of xbees do you have? Which shield? Which Arduino? How have you configured the xbees?

Sorry.

X-Bee : XB24-B
(Function Set : ZNET 2.5 ROUTER/END DEVICE AT v1247)
shield : ArduinoXBee v1.1
Arduino : Arduino Mega / Arduino Duemilanove