Presentation is loading. Please wait.

Presentation is loading. Please wait.

TinyOS 2.0 Network Stack Enhancements Joseph PolastrePhil Levis UC Berkeley UC Berkeley Moteiv Corporation.

Similar presentations


Presentation on theme: "TinyOS 2.0 Network Stack Enhancements Joseph PolastrePhil Levis UC Berkeley UC Berkeley Moteiv Corporation."— Presentation transcript:

1 TinyOS 2.0 Network Stack Enhancements Joseph PolastrePhil Levis UC Berkeley UC Berkeley Moteiv Corporation

2 2 TinyOS Technology Exchange II: 2/11/2005 Need for changes Cross-platform common radio/MAC micaZ, Telos, imote2… Currently each platform implements routines for accessing radio and timer Support different TOSMsg structures for different radios/MACs Difficult to build different underlying MAC and Radio implementationsCSMA/TDMA/slotted

3 3 TinyOS Technology Exchange II: 2/11/2005 Summary of Changes New TOSMsg format Defined by each radio External typesnetwork structures Abstract typefields provided by components New Interfaces to AM Layer Supports CSMA and slotting MAC protocols New Bus Protocol Abstraction

4 4 TinyOS Technology Exchange II: 2/11/2005 TOSMsg Abstract type defined by each MAC protocol Similar to S-MAC TinyOS implementation typedef nx_struct TOSMsg { TOSRadioHeader header; nx_uint8_t data[TOSH_DATA_LENGTH]; TOSRadioFooter footer; TOSRadioMetadata metadata; } TOSMsg; Radio/MAC specific header Application data payload Radio/MAC specific footer Radio/MAC metadata not sent over the radio

5 5 TinyOS Technology Exchange II: 2/11/2005 Global TOSMsg Fields Interface RadioPacket Length Address Group/PAN Data Time Acknowledgement

6 6 TinyOS Technology Exchange II: 2/11/2005 Accessing TOSMsg Fields For Global Fields Platform and MAC independent All MAC required to implement Wire to RadioC.RadioPacket Access fields through Radio Packet interface length = call RadioPacket.getLength(msg);

7 7 TinyOS Technology Exchange II: 2/11/2005 Moving up the stack RadioPacket accesses the lowest primitive fields at the link protocol AM exports fields through AMPacket Likewise, standard MultiHop fields through MultiHopPacket Provides separation of message field implementation and access to those fields Radio AM MultiHop

8 8 TinyOS Technology Exchange II: 2/11/2005 Accessing TOSMsg Fields For MAC-dependent applications Use structures defined by MAC protocol Example: CC2420 radio void myfunc() { if (msg.lqi > 100) { // perform action } } typedef nx_struct TOSRadioMetadata { nx_uint8_t strength; nx_uint8_t lqi; nx_bool crc; nx_bool ack; nx_uint16_t time; } TOSRadioMetadata;

9 9 TinyOS Technology Exchange II: 2/11/2005 Protocol Bus Abstraction All protocol busses provide Bus Arbitration SPI, I 2 C, UART HIL Protocol Access Bus must be acquired before use, even if only a single user Token granted to bus user, all accesses must use token Bus ArbitrationHIL SPIStdControl SPIC SPI Configuration

10 10 TinyOS Technology Exchange II: 2/11/2005 Component Organization Example: CC2420 Radio Stack for Telos RadioC CSMARadioC CC2420RadioMCC2420ControlM HPLCC2420 HIL SPI HAL Interrupts & PinsHAL SPI HPL MCU Hardware TelosCC2420 All radios provide Adds CSMA interfaces CC2420 Logic Rd/Wr CC2420 Registers Wiring to SPI bus/Ints SPI Bus Interface MCU Implementation MCU Registers MCU & Radio Platform IndependentPlatform Specific

11 Questions? More information: See TEP 105: Radio Link Layer


Download ppt "TinyOS 2.0 Network Stack Enhancements Joseph PolastrePhil Levis UC Berkeley UC Berkeley Moteiv Corporation."

Similar presentations


Ads by Google