Hi everybody,
I’m stuck here at reading RSSI values from the CC2420 chip. I’m using telosb
motes with tinyos 2.0.2.
I already searched the help and archives for this but unfortunately nothing
really helped me ☹.
Here is what I do to get rssi values:
In TestRssi.h I define:
typedef nx_struct TestRssi_msg {
...
nx_uint16_t RSSI;
...
} TestRssi_msg_t;
In TestRssiAppC.nc I use:
components CC2420ControlC;
TestRssiC.ReadRssi -> CC2420ControlC.ReadRssi;
In TestRssiC.nc I use this interface:
interface Read<uint16_t> as ReadRssi;
This event:
event void ReadRssi.readDone(error_t ok, uint16_t val ){
if (ok == SUCCESS ) {
fillPacket();
local.RSSI = val;
}
}
And call it like this:
if(call ReadRssi.read() == SUCCESS){
rssiIsRead = TRUE;
}
And then I send the message.
Am I doing this correctly or is this completely wrong?
Greets,
Nick
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help