1.
i don't know what values the register and the getRssi returns. they may be
different 'cos getRssi is already converted, or not. check following:
http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/msg19120.html

and,

event void RssiResource.granted() {
   uint16_t data = 0;
   call CSN.clr();
   call RSSI.read(&data);
   call CSN.set();
   call RssiResource.release();
   data += 0x7f;
   data &= 0x00ff;
   signal ReadRssi.readDone(SUCCESS, data);
}

in
http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x/tos/chips/cc2420/control/CC2420ControlP.nc?content-type=text%2Fplain


2.
after u clarify that both are of the same type, make sure WHICH rssi u r
checking: that of received packets (register in the received mote) or sent
packets (in ack field, sent by another mote).

3.
if, say, u r checking rssi of received pakts, then check the getRssi and the
register values one after the other and compare.


rgds






On Thu, Aug 5, 2010 at 11:45 PM, Peng Du <eddy....@gmail.com> wrote:

> Thanks very much again.
>
> Now I am having another question: are the values acquired by reading RSSI_VAL
> register supposed to be the same as those retrieved using 
> CC2420Packet.getRssi()?
> Because when I compare a same application with the two methods, the RSSI I
> get are actually different.
>
> On 5 August 2010 06:00, C L <mlomai...@googlemail.com> wrote:
>
>> yes, it's not a must. i used this technique in my early days in TOS 'cos i
>> didn't know otherwise :) but, i find it tidy to have easily identifiable
>> files in your program folder when referencing it after few months. i guess u
>> can wire it straight away in ur main configuration file, and adding some
>> clear comments would do it, too.
>>
>>
>>
>>
>> On Wed, Aug 4, 2010 at 1:05 PM, Peng Du <eddy....@gmail.com> wrote:
>>
>>> Thanks very much for your reply.
>>>
>>> I am curious that why it is necessary to create my own configuration
>>> file? Can't I simply call the ReadRssi from CC2420ControlC?
>>>
>>>
>>>
>>> On 4 August 2010 10:58, C L <mlomai...@googlemail.com> wrote:
>>>
>>>> i posted the following just 10 mins ago. i think it answers ur question
>>>> as it isn't based on a per packet basis.
>>>>
>>>>
>>>> http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/msg34467.html
>>>>
>>>
>>>
>>
>
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to