Tinyos 2 0 network stack enhancements
Download
1 / 11

TinyOS 2.0 Network Stack Enhancements - PowerPoint PPT Presentation


  • 96 Views
  • Uploaded on

TinyOS 2.0 Network Stack Enhancements . Joseph Polastre Phil Levis UC Berkeley UC Berkeley Moteiv Corporation. Need for changes. Cross-platform common radio/MAC micaZ, Telos, imote2… Currently each platform implements routines for accessing radio and timer

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'TinyOS 2.0 Network Stack Enhancements' - senta


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Tinyos 2 0 network stack enhancements

TinyOS 2.0Network Stack Enhancements

Joseph Polastre Phil Levis

UC Berkeley UC BerkeleyMoteiv Corporation


Need for changes
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 implementations—CSMA/TDMA/slotted


Summary of changes
Summary of Changes

  • New TOSMsg format

    • Defined by each radio

    • “External types”—network structures

    • Abstract type—fields provided by components

  • New Interfaces to AM Layer

    • Supports CSMA and slotting MAC protocols

  • New Bus Protocol Abstraction


Tosmsg
TOSMsg

  • Abstract type defined by each MAC protocol

    • Similar to S-MAC TinyOS implementation

Radio/MAC specific header

typedef nx_struct TOSMsg {

TOSRadioHeader header;

nx_uint8_t data[TOSH_DATA_LENGTH];

TOSRadioFooter footer;

TOSRadioMetadata metadata;

} TOSMsg;

Application data payload

Radio/MAC specific footer

Radio/MAC metadatanot sent over the radio


Global tosmsg fields
Global TOSMsg Fields

  • Interface RadioPacket

    • Length

    • Address

    • Group/PAN

    • Data

    • Time

    • Acknowledgement


Accessing tosmsg fields
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);


Moving up the stack
Moving up the stack

  • RadioPacket accesses the lowest primitive fields at the link protocol

  • AM exports fields throughAMPacket

  • Likewise, standard MultiHopfields through MultiHopPacket

  • Provides separation of messagefield implementation and accessto those fields

MultiHop

AM

Radio


Accessing tosmsg fields1
Accessing TOSMsg Fields

  • For MAC-dependent applications

    • Use structures defined by MAC protocol

  • Example: CC2420 radio

typedef nx_struct TOSRadioMetadata {

nx_uint8_t strength;

nx_uint8_t lqi;

nx_bool crc;

nx_bool ack;

nx_uint16_t time;

} TOSRadioMetadata;

void myfunc() {

if (msg.lqi > 100) {

// perform action

}

}


Protocol bus abstraction
Protocol Bus Abstraction

  • All protocol busses provide Bus Arbitration

    • SPI, I2C, 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

StdControl

HIL SPI

Bus Arbitration

SPIC

SPI Configuration


Component organization example cc2420 radio stack for telos

Platform Independent

Platform Specific

Component OrganizationExample: CC2420 Radio Stack for Telos

All radios provide

RadioC

CSMARadioC

Adds CSMA interfaces

CC2420RadioM

CC2420ControlM

CC2420 Logic

HPLCC2420

Rd/Wr CC2420 Registers

TelosCC2420

Wiring to SPI bus/Ints

HIL SPI

SPI Bus Interface

MCU Implementation

HAL SPI

HAL Interrupts & Pins

HPL MCU

MCU Registers

Hardware

MCU & Radio


Questions

Questions?

More information:

See TEP 105:

“Radio Link Layer”