Rssi Demo

From TinyOS Wiki
Revision as of 06:16, 11 April 2008 by D1ma5ad (talk | contribs) (Demo Application)
Jump to: navigation, search

This lesson is to give an example on how to get Rssi readings from incoming packets. It consists of two applications:

  • a simple application that periodically sends messages over the radio, and
  • a modified version of BaseStation that includes the Rssi data on the payload of messages received over the radio before forwarding them over to the serial link.

It will also be shown how to get RSSI noise floor readings, to estimate the channel background noise when no node is transmitting.

Currently, this demo works only for motes that use CC1000 or CC2420 radio transceivers, but it should contain enough information for porting it to other chips that provide RSSI in a similar manner.


Introduction

RSSI is an acronym for Received Signal Strength Indication. It is a measure of the signal power on the radio link, usually in the units of dBm, while a message is being received. It can be used for estimating node connectivity and node distance (although the relation between distance and RSSI is noisy and not straightforward), among other things. 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.

According to TinyOS' HAA <ref name="tep2">

 TEP 2: Hardware Abstraction Architecture

</ref> the RSSI data is not provided by the standard platform independent Hardware Interface Layer (represented interfaces Packet and AMPacket, as explained in TEP 116 <ref name="tep116">

 TEP 116: Packet Protocols

</ref> ). RSSI must be accessed by a platform-specific HAL interface, as in the case of the CC2420 or by a specific field of the message_t struct as defined in the platform_message.h <ref name="tep111">

 TEP 111: message_t

</ref> like in the case of the CC1000.

The RSSI values given by TinyOS are usually not in dBm units, and should be converted by the platform-specific relation to get meaningful data out of it.

Demo Application

Since RSSI is very platform-specific it will now be shown a hands-on demo to explain how to get RSSI readings from incoming packets. This demo is located in $TOSROOT/apps/tutorials/RssiDemo<\code> .

Intercept Base

InterceptBase is a modified version of the BaseStation component that provides the Intercept interface to allow the user application to inspect and modify radio and serial messages before they are forwarded to the other link, and to decide whether they shall be forwarded or not.

Sending Mote

SendingMote is the application to be put in the mote that sends the message whose RSSI will be read by the base. It contains a simple logic to periodically send a RssiMsg, as defined bellow:

 typedef nx_struct RssiMsg{
   nx_uint16_t rssi;
 } RssiMsg;

The RssiMsg is sent empty, it is the base that will include the RSSI value in the message.

Rssi Base

TODO

Noise Floor Reading

TODO

References

<references/>