how to use rssiDur?

Hi, i'm using xbee series 1 and it is connect with my arduino uno using software serial.
there is a transmitter sending data over to the receiver.
I want to get the RSSI value of xbee, i have already connected the xbee pin 6(rssi) to my arduino uno pin 11.

the result that i get for is always 0.
why is that so? can someone help me?
thanks :slight_smile:

rssi_1.ino (432 Bytes)

I know nothing about Xbee but When pulseIn() returns 0 that indicates that the timeout(200 microseconds in your sketch) was reached without the pulse completing. You may need to set a longer timeout value or maybe there's something that needs to be done for the Xbee to send the pulse. It's worth setting a long timeout value just as a test to see if you're getting any pulse at all.

Why do you want RSSI? - it's of very little use in determing range...

It will give you an idea of what the bit error rate should be - that's about all.

regards

Allan

allanhurst:
Why do you want RSSI? - it's of very little use in determing range...

It will give you an idea of what the bit error rate should be - that's about all.

regards

Allan

i used it to determine the distance between two XBee modules, it is part of my project, i can't change it...

I said

Why do you want RSSI? - it's of very little use in determing range...

The signal received will be via two antennas which will not be truly omnidirectional - slight changes in direction can easily alter the signal by 10 times.

Plus there will be many reflections from the environment. Could increase or decrease the signal.

And if there are direct obstructions that introduces another big variable....

you'll get a figure, but it won't mean much

regards

Allan

If you get a 0 from pulseIn() the signal was either solid high or solid low. You can then read the pin to see which is the case.

You can watch this video to see that the RSSI pulse width only changes when a packet is received (about once a second):