>
> At first I'm sorry for interrupting. Can some one provide me the code to get
> the RSSI value for CC2430 mote? and I'm using tinyos-2.x. Please help me.
> Thanks for your help.
>

As far as I know, you can either get a background RSSI value, or RSSI
values for individual received packets. I assume you mean the latter.

Here is how I do it in one of my apps:

# In your public module:

implementation {
  components CC2420ActiveMessageC as CC2420;
  YourPrivateModuleP.CC2420Packet -> CC2420;
   /* Also wire up your Receive interface etc here */
}

# In your private module:

module PrivateModuleP {
  uses interface CC2420Packet;
}

# Inside your Receive.receive event handler:

 uint8_t raw_rssi = call CC2420Packet.getRssi(bufPtr);
/* And here is how you convert to a human-understandable rssi value */

/* From this post:
http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2006-April/016081.html
*/

/* - First convert from 2's complement */
int16_t rssi = raw_rssi;
if (rssi >= 128) rssi -= 256;
/* - Now subtract the RSSI_OFFSET */
rssi -= 45; /* rssi now contains a human-understandable RSSI in dBm. */
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to