raspdroid
Posts: 1619
Joined: Thu Nov 06, 2014 9:15 am
Location: Gran Canaria :: España

[Resuelto] Cómo obtener RSSI de tu XBee usando Raspberry Pi

Thu Feb 05, 2015 8:35 am

Hola,

¿Alguna idea de como obtener el RSSI de un XBee a través de la Raspberry Pi?

Como hacen aquí con la Arduino.

https://www.youtube.com/watch?v=1Bz95LL5tZ4

Mi duda es que no estoy usando serial sino USB (con el XBee USB Explorer de Sparkfun), y supongo que no es necesario de añadir un cable del pin6 del XBee a la Raspberry Pi, sino que con el usb explorer es suficiente, ¿o no?

Saludos

PD: Este es el código con el que he probado (con el usb explorer):

Code: Select all

localXBee.setIOConfiguration(IOLine.DIO10_PWM0,  IOMode.SPECIAL_FUNCTIONALITY);
localXBee.setPWMDutyCycle(IOLine.DIO10_PWM0, 90);
Pero me dice algo así: nullAT command response: null , Cuando ejecuta la segunda línea.

Luego para intentar obtener el valor hago algo así:

Code: Select all

double value = localXBee.getPWMDutyCycle(IOLine.DIO10_PWM0);
LOG.info("RSSI Value: " + value);
Pero viene a decir lo mismo que arriba que la respuesta vale null.

raspdroid
Posts: 1619
Joined: Thu Nov 06, 2014 9:15 am
Location: Gran Canaria :: España

Re: [Resuelto] Cómo obtener RSSI de tu XBee usando Raspberry

Fri Feb 06, 2015 1:58 pm

Por si le sirve a alguien en un futuro , esto es lo que me ha dicho un desarrollador de Digi:
There is not an specific way to read the RSSI value of a module, but you can do it by reading the 'DB' parameter. The 'DB' parameter stores the RSSI value of the last received packet from any source. This means that, if you want to measure the RSSI value of your local device against a remote device you should perform the following:

Send any packet to the remote device you want to measure its RSSI value.
Read the value of the 'DB' parameter of that remote device. This will give you the signal quality of the remote device against your local device.
Read the value of the 'DB' parameter of your local device. This will give you the signal quality of your local device against the remote device.
You can also use the Range Test feature of the XCTU which basically does the same but in a loop and displaying measures in a chart.

Return to “Español”