Issues in RSSI PWM values

I am reading RSSI value of xbee S2 from arduino Uno by connecting 6th pin of xbee to PWM pin of Arduino.I am getting the output.But there is a vast difference in the values obtained from XCTU and arduino serial port output. For a value of -40 in xctu, I am getting around -60 in arduino.The variation of RSSI for different distances is also very small when compared with xctu values.

int pin =9;
int  rssiDur;
signed char RSSI;


void setup(){
  Serial.begin(9600); 
  pinMode(pin, INPUT);
    
}

void loop(){
  rssiDur = pulseIn(pin,HIGH, 400) * 12;
  
  
RSSI =(rssiDur + 5928) / 41;
            delay(2000);
            
                       Serial.println(RSSI);
            
}

Please help.

Apparently your magic number scale factors 5928 and 41 are wrong.

I hope you are not trying to read too much into RSSI values, they are a very crude indication of anything useful, unless you have a line-of-sight path between transmitter and receiver and fixed polarization direction for both antennae. A lot of people come along and think "Ah, I can use this to measure distance", then get very disappointed.

aarg:
Apparently your magic number scale factors 5928 and 41 are wrong.
[/This is the formula given in xbee datasheet]

Datasheet? Perhaps you should link to the datasheet in question then.