XBee RSSI problems

Hello everyone,

I have been trying to measure continuous RSSI of my 2 Series 2 XBee's network for a few days now. I have done plenty of research, read documentations and tutorials. Problem is, what works in the tutorial doesn't work for me.

Also, please do not tell me on why I should not try to use RSSI.

This is my setup:

XBee Router AT mode -> Wireless -> XBee Coordinator API mode -> Arduino Mega

I can get them to communicate in AT/API mode without any issues. My initial setup was using them in AT mode and issue ATDB command, however the delay was unacceptable for my application.

I am now trying to either extract it from a remote frame from the RSSI pin (pin 6), however I am encountering some issues.

My first issue is that RSSI pin is constantly on. I mean, there is no PWM signal, it's just logic high all the time. I tried measuring it using Arduino, I tried measuring it using my custom built atmega MCU, I tried using an oscilloscope, I tried using a multi-meter. There is no varying signal whatsoever. I checked my settings on both XBee's, P0 is set to PWM (1). The XBee's are associated and communicating continuously.

My second issue is that in the tutorials I looked at people were extracting PWM value of the RSSI pin from the remote frames. I looked at Series 2 frame documentation and there is nothing to do with PWM pins at all, how come?

Any input is greatly appreciated!

I'm not going to tell you not to use RSSI. What I am going to do is ask you WHY you want to use RSSI? It is a piss-poor, rough-order-of-magnitude, indicator of distance.

PaulS:
I'm not going to tell you not to use RSSI. What I am going to do is ask you WHY you want to use RSSI? It is a piss-poor, rough-order-of-magnitude, indicator of distance.

Right, to answer your question. I want to measure distance of a moving object in a big field with no obstructions/interference whatsoever. The accuracy can be +- 1.5m. Even if this doesn't work, I would still like to know how to get RSSI from PWM, or rather, why I get no PWM from my XBee's..

The accuracy can be +- 1.5m.

It won't be. The RSSI value will give to "in the same field", "in the same county", "in the same state", and "in the same country" types of values.

Anyway, we can't see how you have configured the XBees or what code is running on the Arduinos. So, you really can't expect answers.

PaulS:
It won't be. The RSSI value will give to "in the same field", "in the same county", "in the same state", and "in the same country" types of values.

Anyway, we can't see how you have configured the XBees or what code is running on the Arduinos. So, you really can't expect answers.

Okay. The part of this project is to develop a zoning algorithm from low accuracy data, therefore let's just assume that the RSSI is an acceptable factor for distance measurement.

For the sake of simplicity I am running them both at factory defaults in AT mode.

PC -> XBee Explorer -> XBee Router AT -> Wireless -> XBee Coordinator AT -> PC

There is no Arduino involved at this point. The ONLY change I have made is change the PAN ID on both of the units, the rest is at default. I have two serial consoles open, the XBee's echo as supposed to. Both Explorers have their "RSSI" LED on, which doesn't get any dimmer if I move the modules further away (tried up to 20 meters).

According to the documentation, P0 has to be set to 1 (which it is by default) in order for RSSI pin to be PWM. However I am still getting no PWM, just a solid ~3.3V.

Okay, to answer my own question:

It works as intended. I was using dipole swivel antennas for my XBee's which were position close to each other, thus giving a strong signal link. After closer inspection I realized that such strong link resulted in PWM with 100% duty cycle, which appeared as a logic high. By covering one of the antennas with aluminium foil or just disconnecting it entirely I was finally able to see/measure the PWM.

I have, however, decided to use remote at command request frame instead as it's much simpler to implement for the time being.

Hypomania:
Okay, to answer my own question:

It works as intended. I was using dipole swivel antennas for my XBee's which were position close to each other, thus giving a strong signal link.

For even an attempt at measuring RSSI over distance you need to use antennas that are omni-directional, and keep them in the exact same orientation all the time.

srnet:
For even an attempt at measuring RSSI over distance you need to use antennas that are omni-directional, and keep them in the exact same orientation all the time.

Thank you for the suggestion, point taken :slight_smile:

Problem is, what works in the tutorial doesn't work for me.

Why do you believe that the tutorials actually worked?

Plenty of web sites and youtube videos show working perpetual motion machines.