XBee S2C Rssi value is always zero

Hi, I have seen a lot of posts on this but I have been stuck on this problem for quite a while. I use two XBee series 2 module to get RSSI value. I am programming them using XCTU software. I use the PWM 6 pin on Xbee and PulseIn function to detect the RSSI value, but for some reason I always get zero value on serial monitor.

XBee 1 config: Acts as the sender
Product Family - XB24C
Function Set - Zigbee TH Reg
Firmware - 4061(latest)
Mode - AT
Pin D3 set to ADC which basically sends data at I/O sampling rate of
100 ms

XBee 2 config: Acts as the receiver
Product Family - XB24C
Function Set - Zigbee TH Reg
Firmware - 4061(latest)
Mode - API mode 2 and 1 both tested

XBee 2 receives data packet and according to the code below uses the PulseIn function in arduino to detect the rssi value from pin 6 on XBee which is transferred to PWM 10 pin of arduino mega. XBee is connected to Mega via Arduino XBee shield. The TX and RX pins of XBee connected to Serial port 3 of Mega.


  This is a sketch for RSSI-Measurements. The sketch reads the incoming RSSI Value and turns on a LED if the Signal is strong enough.
  Please note that the used Value (40) depends on your project environement.

  I am using an Arduino MEGA!
  Connect your Xbee RX to Arduino RX!
  Connect your Xbee TX to Arduino TX!
  And don't forget the power supply!
  RSSI Pin on Xbee -> 6

  Author: Cédric Portmann (cedric.portmann@gmail.com.)
  Copyright (C) 2013 Cédric Portmann

int digitalPin = 10;  // the RSSI pin 6 of Xbee is connected to this PWM Pin. (Digital Pin 10)
int rssiDur;  // Variable for RSSI
int led = 13;  // LED connected to Pin 13

void setup()
  pinMode(led, OUTPUT);
  pinMode(digitalPin, INPUT);

  Serial.begin(9600);   // this is the connection for your Arduino to your PC/MAC
  Serial3.begin(9600);   // this is the connection of your Xbee to your Arduino MEGA!!


void loop()

  if (Serial3.available() >= 21) {   // This isn't important. You can do here whatever you want.

    if (Serial3.read() == 0x7E) { // Reads the start byte
      for (int i = 1; i < 19; i++) {
        byte discardByte = Serial3.read();

        rssiDur = pulseIn(digitalPin, LOW, 200); // get's the RSSI Value
        Serial.println(rssiDur);  //for debbuging and first setup.

        if (rssiDur < 40 && rssiDur != 0) { //turns Led on if RSSI is less then 40
          digitalWrite(led, HIGH);
        if (rssiDur > 40 && rssiDur != 0) { //turns Led off if RSSI is bigger then 40
          digitalWrite(led, LOW);



One more thing I would like to mention is that the videos for the same are shown on a different XBee module, videos are quite old (before 2015) and hence the firmware is also quite old. I tried the legacy firmwares too but no luck. If there is another way to get the signal strength received or the distance measurements between two XBees, I would love to know that. Kindly let me know if any more information is required, I am pretty new to this forum. Than you for your assistance in advance.

Welcome to the forum!

For informed help, please read and follow the directions in How to get the best out of this forum

You can configure the pin 6 to show RSSI value of the last received message for a short time OR all time.
Do the two XBees communicate with each other via XCTU? I mean, is the configuration correct?
Measure the RSSI voltage with a multimeter between Pin 6 and Pin 10 on the receiver side while the message is received.
Are XBee and Arduino on the same GND?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.