CC2420 Layer Descriptions

From TinyOS Wiki
Jump to: navigation, search

ActiveMessageP

This is the highest layer in the stack, responsible for filling in details in the packet header and providing information about the packet to the application level [2]_. Because the CC2420 radio chip itself uses 802.15.4 headers in hardware [1]_, it is not possible for the layer to rearrange header bytes.

UniqueSend

This layer generates a unique Data Sequence Number (DSN) byte for the packet header. This byte is incremented once per outgoing packet, starting with a pseudo-randomly generated number. A receiver can detect duplicate packets by comparing the source and DSN byte of a received packet with previous packets. DSN is defined in the 802.15.4 specification.

PacketLink

This layer provides automatic retransmission functionality and is responsible for retrying a packet transmission if no acknowledgement was heard from the receiver. PacketLink is activated on a per-message basis, meaning the outgoing packet will not use PacketLink unless it is configured ahead of time to do so. PacketLink is most reliable when software acknowledgements are enabled as opposed to hardware auto acknowledgements.

DefaultLpl

This layers provides a default asynchronous low power listening implementation. Supporting it is PowerCycleP, which is responsible for turning the radio on and off and performing receive checks. Each receive check only keeps the radio on long enough to take a physical energy reading on the channel. After energy is detected during a receive check, PowerCycleP hands off responsibility to DefaultLplP to perform some transaction and turn the radio off when convenient. Packetized wake-up transmissions are generated on a per-message basis, not globally, and the layer will continuously retransmit the full outbound packet until either a response from the receiver is heard or the transmit time expires.

Other low power communication implementations have been experimented with, including a BMAC type method in which a transmitter node transmits a continuously modulated wake-up transmission. A continuously modulated signal allows a receiver's energy check to be incredibly small, which saves lots of power in networks that spend most of their time listening. This method was never stable enough to make public, only due to time constraints in development.

UniqueReceive

This layer maintains a history of the source address and DSN byte of the past few packets it has received, and helps filter out duplicate received packets.

TinyosNetwork

This layer allows the TinyOS 2.x radio stack to interoperate with other non-TinyOS networks. Proposed 6LowPAN specifications include a network identifier byte after the standard 802.15.4 header [5]_. Interoperability frames are now the default. This dispatch layer provides functionality for setting the TinyOS network byte on outgoing packets and filtering non-TinyOS incoming packets.

CSMA

This layer is responsible for defining 802.15.4 FCF byte information in the outbound packet, providing default backoff times when the radio detects a channel in use, and defining the power-up/power-down procedure for the radio.

Unfortunately, the actual CSMA implementation is integrated with the code in CC2420TransmitP. Volunteers are needed to redo this architecture and allow the CC2420TransmitP layer to asynchronously attempt a packet transmission. This would let the CSMA layer truly perform backoffs, and allow researchers to build other types of channel sharing mechanisms (i.e. TDMA). The CC1100/CC2500 radio stack is a good architecture example, separating the CSMA behavior from the transmission functionality.

TransmitP/ReceiveP

These layers are responsible for interacting directly with the radio through the SPI bus, interrupts, and GPIO lines. Again, the TransmitP layer is actually responsible for performing the CSMA functionality right now.


CC2420 Layer Diagram

+--------------------------------------------------+
|               Application Layer                  |
|                                                  |
+-----------------------+--------------------------+
 
 +----------------------+-------------------------+
 |             Active Message Layer               |
 +----------------------+-------------------------+
 
 +----------------------+-------------------------+
 |              Unique Send Layer                 |
 +----------------------+-------------------------+
                  
 +----------------------+-------------------------+
 |         Optional Packet Link Layer             |
 +----------------------+-------------------------+
                        
 +----------------------+-------------------------+
 |  Optional Low Power Listening Implementations  |
 +----------------------+-------------------------+
                        
 +----------------------+-------------------------+
 |        Unique Receive Filtering Layer          |
 +----------------------+-------------------------+
                        
 +----------------------+-------------------------+
 |      Optional 6LowPAN TinyOS Network Layer     |
 +----------------------+-------------------------+
                        
 +----------------------+-------------------------+
 |     Carrier Sense Multiple Access (CSMA)       |
 +----------------------+-------------------------+
                        
                                   
+----------+----------+   +----------+----------+
|      ReceiveP       |   |      TransmitP      |
+----------+----------+   +----------+----------+
                                    
                        
+-----------------------+-------------------------+
|    SPI bus, GPIO, Interrupts, Timer Capture     |
+-------------------------------------------------+

See Also

Next