#include "contiki.h" #include "net/rime.h" #include "net/netstack.h" #include "dev/leds.h" #include "dev/cc2420.h" #include "dev/cc2420_const.h" #include "dev/spi.h" #include static struct collect_conn tc; PROCESS(example_collect_process, "RSSI"); AUTOSTART_PROCESSES(&example_collect_process); static void recv(const rimeaddr_t *originator, uint8_t seqno, uint8_t hops) { static signed char rss; static signed char rss_val; static signed char rss_offset; printf("Sink got message from %d.%d, seqno %d, hops %d: len %d '%s'\n",originator->u8[0], originator->u8[1],seqno, hops,packetbuf_datalen(), (char *)packetbuf_dataptr()); rss_val = cc2420_last_rssi; rss_offset=-45; rss=rss_val + rss_offset; printf("RSSI of Last Packet Received is %d\n",rss); } static const struct collect_callbacks callbacks = { recv }; PROCESS_THREAD...