Hi.
We are in trouble trying to get RSSI from CC2420. We use the Intercept
interface provided by InterceptBase to intercept incoming packets and
perhaps we are not pointing to the RSSI field. We use the UDP-based
Shell to display RSSI and other parameters.
Here is the code we are using:
uint16_t datarssi;
// this should intercept packets
event bool RssiMsgIntercept.forward(message_t *msg, void *payload,
uint8_t len) {
datarssi = getRssi(msg);
return TRUE;
}
// this should get the RSSI
uint16_t getRssi(message_t *msg){
return (uint16_t) call CC2420Packet.getRssi(msg);
}
// and this should print it in a UDP-based Shell:
event char *ShellRSSI.eval(int argc, char **argv) {
char *ret = call ShellRSSI.getBuffer(15);
snprintf(ret, 50, "%i\n", datarssi);
return ret;
}
We do not get errors while compiling but RSSI reported is "0". It
seems that getRssi(msg) has never been executed. Can you see any error
in our code?
The Shell is working fine:
ie. Initializing datarssi = 14 it prints 14 correctly.
Thanks in advance
Davide
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help