Answers below: On Fri, Mar 14, 2008 at 3:04 PM, hamsa jega <[EMAIL PROTECTED]> wrote:
> I have done the following in order to obtain the rssi value for an > incoming message in my Basestation. > I wired the interface cc1000RssiP.Rssi[unique(UQ_CC1000_RSSI)]. If you want to read the rssi from incoming packets you don't need that interface. CC1000RssiP is to read the RSSI noise floor. In fact, if you are measuring the noise floor and a packet arrives, it is canceled and restarted, as described in the documentation http://www.tinyos.net/tinyos-2.x/doc/nesdoc/mica2/index.html . > After the call to Rssix.read() I guess the control transfers to readDone > so when it returns the global variable should hold the result and this I > assign to my packet to a value called strength and call send function to > send it via the serial port and read it using Listen. > I constantly get the same value as reading despite moving the motes > around. Is my approach wrong? > Can you guide me to start off in the right direction? Sure! Each incoming message's RSSI is stored in the message_t metadata field. You should use a code like this: //Put this inside your module uint16_t getRssi(message_t *msg){ cc1000_metadata_t *md =(cc1000_metadata_t*) msg->metadata; return md->strength_or_preamble; } Hope it helps. ~Dimas~
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
