Hi!

On Fri, 26 Jun 2009, Nahr Elk wrote:

> Hello all!
> I am wondering if there is a bug in the Tinyos cc2420 rssi register
> implementation. Because when I try to sense the background noise I usually
> found -98 values which is normal value as I don't have a 802.11 traffic
> however sometimes I found a value about -173 value?!! abnormal
>
> I am using this interface Read<uint16_t> as NoiseReading;
> and at this event :readDone(error_t result, uint16_t data)
> I set the noise_reading variable to noise_reading= (data-0x7F)&0xFF;
>
> Where is the wrong here?

Even data is returned as uint16_t it is in fact a int8_t. To get the 
proper value you can just cast it to that: (int8_t)data. You also have to 
substract -45 to get the real dBm.

All the best!
Razvan ME
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to