I started reading about this value (RSSI) that came out from pin 6 of an Xbee and decided to try getting this value to put a Dbm meter in my labview communication console between 2 xbee.
All my code related to RSSI value from the Xbee is :
int rssival;
int strengh = 52; //Pin connected to pin 6 of XBee
......
rssival = pulseIn(strengh, LOW, 200);
......
TxBuffer[14] = rssival;
....
I made some range test and I received these value:
In the same room : 0
10 meters to 100m : 1 to 20
Not working: 70
Now the question is how to convert these numbers to Dbm????? If those are correct value I should get...
All my code related to RSSI value from the Xbee is :
Not likely. For instance, strength is not defined anywhere in that snippet.
Why you are using pulseIn on that pin then remains a mystery. How RSSI relates to the time that it takes that pin to go from LOW to HIGH and back to LOW is also a mystery. As is how you think that time relates to Dbm (whatever that is).
All my code related to RSSI value from the Xbee is :
Not likely. For instance, strength is not defined anywhere in that snippet.
Why you are using pulseIn on that pin then remains a mystery. How RSSI relates to the time that it takes that pin to go from LOW to HIGH and back to LOW is also a mystery. As is how you think that time relates to Dbm (whatever that is).
RSSI pin out of the Xbee is a PWM signal. When I am in the same room, its a 100% PWM. THan it varie from 100 to 80% when I go from 10 to 100 m. So I used pulse in to determine the PWM signal.....
the number indicated by the pulse in is actually reflecting dB. If you radios are right next to each other, it will report 0 which is -0dB. The radios will work fine at -100 dB, the manual says a 1% packet loss. The number reported by pulsein is not a percentage, so it will exceed 100. Make sure you use an exponential average on the number.