2
\$\begingroup\$

How do you make XBee send its RSSI value to another XBee? I am working on a project which involves sending the RSSI value of one XBee to another XBee which sends that data to an Arduino. The Arduino processes the RSSI values received from three XBee modules to track its position.

I don't know how to make the XBee send the RSSI value to another XBee.

Also, is there a way to send data from XBee without using Arduino or other low cost microcontrollers?

Thank you.

\$\endgroup\$
  • \$\begingroup\$ Which series XBees are you using? \$\endgroup\$ – Grimtech Jan 23 '14 at 15:23
1
\$\begingroup\$

Send the XBee of interest a DB command using the remote-command API function. Doing so will likely cause it to return the RSSI value of the packet which contained the command. Such an approach may not be 100% reliable, but is probably better than anything else. Since the reported RSSI value will get updated every time the module hears a packet from anyone, the only way to know what the RSSI value was for a particular packet is to query the value between the receipt of the packet in question and the receipt of the next one (from any source).

\$\endgroup\$
3
\$\begingroup\$

You will need a micro controller of some sort to accomplish this task. (My favorite microcontroller when interfacing Arduino with XBee is the Arduino FIO or OSEPP Fio)

You can accomplish this task one of two ways:

Method 1, Read the XBee RSSI pin using Arduino pulseIn()

On XBee and XBee-PRO modules, pin 6 is PWM0 / RSSI Output PWM Output 0 / RX Signal Strength Indicator. When AT Command, P0 on the XBee module is set to 1 (default), pin 6 outputs the RSSI value as timed electrical pulses (PWM, pulse width modulation.)

You can read those pulses using an Arduino's pulseIn function. Those pulses will equate to a number in hex. That hex number can then be translated to decibels (dB) which is the unit of measure for our RSSI value.

Method 2, Read the RSSI value in XBee API mode

XBee can be put into API mode, that is Application Programming Interface mode. In this mode, the Arduino can access to a wider range of XBee data than in AT mode. (There is an Arduino library available to assist with API mode.)

In API mode, there is a specific packet type that the XBee can send to the Arduino which contains the RSSI value. The Arduino would send an api packet to the XBee requesting that packet type, and the XBee would gather the data and respond to the Arduino with the data packet. The Arduino would then parse the packet, and give you the frame ID containing the RSSI value. You could then do whatever processing you want to do with the RSSI value.

You can learn more about using the API mode in the XBee manual, and more about the specific API frames using Digi's api frame utility.

\$\endgroup\$
  • \$\begingroup\$ Grimtech, Can you please explain how someone will need to implement the stages of 'Reading RSSI value from XBee's in API mode. I have the components but cannot seem to carry out the process, also can you relate your answer as if you were using xbee series 1 and arduino pro mini's for a project. For my project I have connected my arduino to an xbee series 1 for transmitter and receiver and need to request info from one and use the RSSI data for location purposes. \$\endgroup\$ – Monsur Harun Mar 25 '14 at 22:02
0
\$\begingroup\$

The RSSI pin is designed in a wired way. Per xbee manual, it is the number of waves RSSI pin output in 200 micro seconds that is proportional to the signal strength. The carrier frequency is 12MHz. So solution is to feed RSSI pin as clock input for timer 1, then use timer 2 to setup a gating period like 200microseconds, then read the counts of timer 1.

@Grimtech : Could you explain your function a little bit? I was searching for a way of reading RSSI the other day, your function came out on the top of the list. But I had a hard time to understand how it works. Thanks.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.