[Tinyos-help] Calculating RSSI in dBm locally on a mica2 mote

Sean Casey scasey at cs.uml.edu
Thu Aug 3 21:17:35 PDT 2006


Hello,

I'm working with mica2 motes and I would like to know if it's possible 
to calculate the rssi value in dBm on the mote locally.  I had been 
sending the rssi value to the UART and then calculating the dBm value 
with a java program, but now I would like to calculate it locally on the 
mote, and store it in flash.  I've attempted this and I'm not getting a 
value in the right range. This is what I've been using:

/* Calculate the RSSI Value */
V_RSSI = 3.0 * (RSSI_VAL/1024);
RSSI_dBM = (int8_t) ((-50.0 * V_RSSI) - 45.5);


Where V_RSSI and RSSI_VAL are of type double.  Using this I'm getting a 
value of around 200, which is much higher than the range I'd expect.  
Does anyone know what data types I could use to locally compute this?

Thanks for any replies.

- Sean




More information about the Tinyos-help mailing list