Hi,
Have a look at the application in apps/tests/cc2420/RssiToSerial - this is
basically exactly what you need. It's a simple app which takes batches of
readings from the RSSI register, averages them and sends the results in packets
over serial. There is also a java app (SpecAnalyzer.java) to use on the host
which reads the incoming packets on the host.
Watch out for the format of the RSSI values which it sends you though - I spend
a whole day trying to figure it out, this is what I think is going on:
- The RSSI register of the CC2420 radio contains a signed 8 bit value in 2's
complement form, but the int you get back is interpreted as one's complement,
so a value of -53 (for example) would be 11001011 in the register, but just
reading the int value it shows as 203 (interpreted as one's complement)
- Also the CC2420ControlP module is used to read the value - look at
tos/chips/cc2420/control/CC2420ControlP.nc:
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);
}
Note the addition of 0x7f and masking of 0x00ff before it returns the value.
- Also note that you need to take into account the -45 offset as specified in
the CC2420 datasheet to get a true dBm value.
So you need to do a bit of extra work to get the 'right' dBm value. I have
found that typical dBm values of background noise are usually somewhere in the
-90s.
Hope that helps!
James
-----Original Message-----
Date: Thu, 15 Dec 2016 18:20:47 -0700 (MST)
From: desword <[email protected]>
Subject: [Tinyos-help] how to sample the channel power when no node is
transmitting?
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
how to sample the channel power when no node is transmitting?
the example in tinyos tutorial only the sampling under the transmission power.
as shown in http://tinyos.stanford.edu/tinyos-wiki/index.php/Rssi_Demo
However, as the application that is mentioned in above website:
*"Another usage of RSSI is to sample the channel power when no node is
transmitting to estimate the background noise, also known as noise floor."*
So, how to sample the noise floor using TinyOS with TelosB?
Thanks!
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
End of Tinyos-help Digest, Vol 164, Issue 6
*******************************************
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help