SlideShare a Scribd company logo
1 of 48
Download to read offline
IP-based
Sensor Networking with
        Contiki
Adam Dunkels, PhD, Fredrik Österlind, Nicolas Tsiftes,
          Niclas Finne, Joakim Eriksson, Zhitao He (SICS)
                      Oliver Schmidt (SAP AG)
             Julien Abeillé, Mathilde Durvy, PhD (Cisco)
         Takahide Matsutsuka, Simon Barner, Simon Berg
                       Colin O'Flynn (NewAE)
        Eric Gnoske, Blake Leverett, Michael Vidales (Atmel)
                              David Kopf
Today
•   IP for embedded systems
•   The history of IP-based sensor networks
•   Contiki
•   Hands-on
    – Instant Contiki
    – Contiki for Tmote Sky
    – Tmote Sky as IPv6/6lowpan bridge
IP for Embedded Systems
History of IP for Embedded
               Systems
• Embedded systems
  – Resource-constrained
  – Autonomous operation
  – Remote configuration, data collection, …
• 1999: EMIT Alliance – remote communication
  – EMbed the InterneT Alliance
  – EmWare, Atmel, Texas Instruments, Zilog, Microchip,
    …
  – ”IP too heavyweight”
     • Non-IP based wired protocol
     • Gateways
2000: lwIP
• Open source lightweight IP stack
  – Top-down design
    • Similar to BSD, Linux, …
  – 40 kb code, 20 kb RAM
  – IP, ICMP, UDP, TCP
  – Widely used
    • ”Too large”…
2001: uIP
• World’s smallest TCP/IP stack
  – Open source
  – Bottom-up design
  – 4 kb code, 1 kb RAM
  – Fully RFC compliant
  – IP, ICMP, UDP, TCP
2002: IP for Embedded is a Fact
• Non-IP solutions went away
  – Highly optimized custom protocols
  – IP took over
• EMIT Alliance is no more
  – EmWare moved to uIP
The Most Important
          Lesson Learned
• Ability to communicate more important
  than performance
Example: uIP-based Pico Satellite
• CubeSat: pico satellite construction kit
 – MSP430-based
• 128 bytes of RAM for uIP
2004: IP-based Sensor Networks
•   Lightweight IP stack (uIP)
•   Header compression
•   Low-power MAC layer
•   Sensor data
    – UDP
• Configuration
    – TCP
• 2006: IETF 6lowpan
2004: First IP-based Sensor
          Network
Why IP for Sensor Networks?
•   Scalable
•   Versatile
•   Manageable
•   Open and flexible standard
•   Widely deployed
•   Lightweight
    – As shown by uIP, uIPv6
• Low-power
    – IETF 6lowpan wg
    – Power-saving MAC protocols
September 2008:
IP for Smart Objects Alliance
October 2008:
uIPv6, first certified IPv6 stack,
          SICSlowpan
November 2008:
30th best invention of 2008
The Contiki Operating System
Contiki as an Open Source
               Project
• Open source – BSD license
   – C programming language
• Version 1.0 released in March 2003
   – Version 2.2.3 in March 2009
• Highly portable
   – Tmote Sky, JCreate, TelosB, Atmel Raven, MSB,
     ESB, MicaZ, …
   – Simulators: Cooja, MSPsim, AvroraZ, netsim
   – Native platform
• Actively developed
   – 17 developers from SICS, SAP, Cisco, NewAE, TU
     Munich, Atmel
• Active mailing list
Contiki as a Research Theme
• Exploring successful computer science abstractions,
  mechanisms for sensor networks
   –   Dynamic module loading and linking [ACM SenSys 2006]
   –   File system [IEEE/ACM IPSN 2009]
   –   Multi-threaded programming [EmNets 2004]
   –   Java, scripting, … [ACM SenSys 2006, …]
   –   Interactive network shell
   –   IP networking for low-power embedded systems [ACM/Usenix
       MobiSys 2003, ACM SenSys2007, ACM SenSys 2008]
• Pursuing new abstractions
   –   Protothreads [ACM SenSys 2006]
   –   Low-power radio networking [ACM SenSys 2007]
   –   Power profiling [EmNets 2007]
   –   Novel communication primitives
Contiki Influence
• Dynamic loading [EmNets 2004]
   – SOS: loadable modules [MobiSys 2005]
   – TinyOS 2.1.0: loadable modules (2008)
• Preemptive threads on top of events [EmNets 2004]
   – TOSThreads: preemptive threads on top of events (TinyOS
     2.1.0, 2008)
• Software-based power profiling [EmNets 2007]
   – TinyOS Quanto [OSDI 2008]
• IP-based sensor networks [MobiSys 2003, EWSN 2004,
  SenSys 2007]
   –   IETF 6lowpan: IPv6 over 802.15.4 (2006)
   –   Two papers at ACM SenSys 2008
   –   Tutorials at IPSN 2009
   –   Several demos, posters at SenSys, IPSN, …
Coffee [IPSN 2009]

                         Contiki Timeline                                                 Contiki 2.2.3
                                                                                   Contiki 2.2.2
                                                                                 Best poster @ SenSys 2008
                                                                              uIPv6
                                                                            Contiki 2.2.1
                                                                           Contiki 2.2
                                                                       Instant Contiki
                                                                    Contiki 2.1
                                                                Best demo @ SenSys 2007 (Mottola, Picco)
                                                                Power profiling [SenSys 2007]
                                                                Rime [SenSys 2007]
                                                           Power profiling [EmNets 2007]
                                                          Contiki 2.0
                                                   Dynamic linking [SenSys 2006]
                                                   Protothreads paper [SenSys 2006]
                                               Cooja
                                    Protothreads
                                 Contiki paper [EmNets 2004]
                               Contiki 1.2
                         IP for Sensor networks [EWSN 2004]
                uIP paper [MobiSys 2003]
               Contiki 1.0
         uIP
  lwIP

                                                   2007        2008           2009
2001 2002 2003    2004       2005       2006
The Coffee file system
              [IPSN 2009]
•   Flash-based file system
•   open(), read(), seek(), write(), close()
•   Constant memory complexity
•   Very lightweight
    – 5 kb ROM, < 0.5 kb RAM
• Very fast
    – More than 92% of raw flash throughput
Interactive shell
• Network debugging, performance tuning
• Leverage UNIX-style pipelines
• Network commands
• Direct serial connection, or over
  Telnet/TCP
• A generic interface for higher level
  applications
    – Automated interaction, scripting
Power Profiling
             [EmNets 2007]
• Software-based
  – Zero-cost hardware
  – Zero-effort deployment
• Good accuracy, low overhead
• Enables network-scale energy profiling
• Enables energy-aware mechanisms
Linear current draw

                         Transmit


                                    LED


      Sensors

                Listen




CPU
Accuracy is good [EmNets 2007]
Trend: experimental is increasing
                        30
 Experimental papers,


                        25
    ACM SenSys



                        20

                        15

                        10

                        5

                        0
                             2003   2004   2005   2006   2007   2008
                                              Year
Example: B-MAC
      [Polastre et al, SenSys 2004]
 “To [experimentally] determine the power consumption of
   each protocol, we implemented counters in the MAC
   protocol that keep track of how many times various
   operations were performed.
 For B-MAC, this includes receiving a byte, transmitting a
   byte, and checking the channel for activity.
 For S-MAC, we count the amount of time that the node is
   active, number of bytes transmitted and received, and
   the additional time the node spent awake due to
   adaptive listening.”
Polastre, Hill, Culler. Versatile low power media access for wireless sensor networks. SenSys 2004
Per-peripheral Power Profiling
  7

  6

  5

  4

  3

  2

  1

  0
      CPU   LPM    Tx    Rx
Per-packet Power Profiling
7
       Broadcast
6

5

4
Data reception
3

2

    Idle listening
1

0
     CPU    LPM      Tx   Rx
Rime: Communication Primitives
      [ACM SenSys 2007]
• Makes implementation of sensor network
  mechanisms easier
• A set of protocols
  – Data collection
  – Data dissemination
  – Unicast multi-hop routing
  – Single-hop bulk transfer
  –…
The Contniki IP Architecture
                   Applications


                       uIP                    Rime


                   SICSlowpan


                   SICSlowmac



  X-MAC               LPP                  NULLMAC



          CC2420                  CC1100
Instant Contiki
•   Contiki development environment
•   Single-file download
•   Linux system with all Contki tools installed
•   Runs in VMWare, VirtualBox
•   Removes toolset installation hurdle
Seamless Integration with IP
            Networks
• Atmel Raven/Jackdaw USB
  Stick
• Attaches as network card in
  Windows, Linux [EWSN 2009]
• IPv6 packets sent out over
  802.15.4 with 6lowpan header
  compression
Today: Build IPv6 Bridge with a
               Mote
• Make Tmote Sky mote a Linux
  SICSlowpan network card
• No custom hardware needed
                  Linux

                           Application
    Application

                           Transport
    Transport

                              IP
       IP

                           MAC / Link
    MAC / Link


                                         mote
                    mote
Contiki Programming Crash Course
• Hello world
• uIP APIs
  – Raw API
  – Protosockets
• Timers
• Building
Hello, world!
/* Declare the process */
PROCESS(hello_world_process, “Hello world”);
/* Make the process start when the module is loaded */
AUTOSTART_PROCESSES(&hello_world_process);

/* Define the process code */
PROCESS_THREAD(hello_world_process, ev, data) {
  PROCESS_BEGIN();            /* Must always come first */
  printf(“Hello, world!n”); /* Initialization code goes
   here */
  while(1) {                  /* Loop for ever */
    PROCESS_WAIT_EVENT();     /* Wait for something to
   happen */
  }
  PROCESS_END();              /* Must always come last */
}
uIP APIs
• Two APIs
  – The “raw” uIP event-driven API
  – Protosockets – sockets-like programming based on
    protothreads
• Event-driven API works well for small programs
  – Explicit state machines
• Protosockets work better for larger programs
  – Sequential code
Protosockets: example
int smtp_protothread(struct psock *s)
{
  PSOCK_BEGIN(s);

  PSOCK_READTO(s, 'n');

  if(strncmp(inputbuffer, “220”, 3) != 0) {
    PSOCK_CLOSE(s);
    PSOCK_EXIT(s);
  }

  PSOCK_SEND(s, “HELO ”, 5);
  PSOCK_SEND(s, hostname, strlen(hostname));
  PSOCK_SEND(s, “rn”, 2);

  PSOCK_READTO(s, 'n');

  if(inputbuffer[0] != '2') {
    PSOCK_CLOSE(s);
    PSOCK_EXIT(s);
  }
Four types of timers
• struct timer
   – Passive timer, only keeps track of its expiration time
• struct etimer
   – Active timer, sends an event when it expires
• struct ctimer
   – Active timer, calls a function when it expires
• struct rtimer
   – Real-time timer, calls a function at an exact time
   – Limited function support
Using etimers in processes
PROCESS_THREAD(hello_world_process, ev, data) {
  static struct etimer et;        /* Must be static      */
  PROCESS_BEGIN();                /* since processes are */
                                  /* protothreads        */
  while(1) {
       etimer_set(&et, CLOCK_SECOND);
       PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&et));
  }
  PROCESS_END();
}
Example: building hello world
•   cd examples/hello-world
•   make TARGET=native               Build monolithic system for native
•   ./hello-world.native             Run entire Contiki system + app
•   make TARGET=netsim               Build netsim simulation
•   ./hello-world.netsim             Run netsim simulation
•   make TARGET=sky                  Build monolithic system image
•   make TARGET=sky hello-world.u    Build & upload system image
•   make TARGET=sky hello-world.ce   Build loadable module
•   make TARGET=esb                  Monolithic system image for ESB
•   make TARGET=esb hello-world.u             Build & upload image
•   make TARGET=esb hello-world.ce   Build loadable module
make TARGET=
• TARGET=name of a directory under
  platform/
• make TARGET=xxx savetarget
  – Remembers the TARGET
  – Example: make TARGET=netsim savetarget
Hands-on
Hands on
• Install Instant Contiki
   – USB stick with VMWare Player, Instant Contiki, FTDI
     Driver
• Compilation
   –   Hello World for native
   –   Blink for Tmote Sky
   –   Hello World for Tmote Sky
   –   Contiki Shell for Tmote Sky
• IPv6 mote bridge
   – Tmote Sky / JCreate as an IPv6/6lowpan bridge
Conclusions
• IP for embedded systems, sensor networks
• Contiki: many influential, widely used features
  – IP for sensor networks, dynamic loading, protothreads
  – Vision and mission
     • Exploring successful CS abstractions in a novel context,
       pursing new abstractions
• Instant Contiki simplifies development
• IPv6 bridge mote: no custom hardware needed
Thank You
http://www.sics.se/contiki/

More Related Content

What's hot

Symmetric Crypto for DPDK - Declan Doherty
Symmetric Crypto for DPDK - Declan DohertySymmetric Crypto for DPDK - Declan Doherty
Symmetric Crypto for DPDK - Declan Dohertyharryvanhaaren
 
DPDK summit 2015: It's kind of fun to do the impossible with DPDK
DPDK summit 2015: It's kind of fun  to do the impossible with DPDKDPDK summit 2015: It's kind of fun  to do the impossible with DPDK
DPDK summit 2015: It's kind of fun to do the impossible with DPDKLagopus SDN/OpenFlow switch
 
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...Jim St. Leger
 
Coscup SDN workshop - mininet
Coscup SDN workshop - mininetCoscup SDN workshop - mininet
Coscup SDN workshop - mininetHungWei Chiu
 
Performance challenges in software networking
Performance challenges in software networkingPerformance challenges in software networking
Performance challenges in software networkingStephen Hemminger
 
Accelerating Neutron with Intel DPDK
Accelerating Neutron with Intel DPDKAccelerating Neutron with Intel DPDK
Accelerating Neutron with Intel DPDKAlexander Shalimov
 
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics WorkshopLagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics WorkshopLagopus SDN/OpenFlow switch
 
Disruptive IP Networking with Intel DPDK on Linux
Disruptive IP Networking with Intel DPDK on LinuxDisruptive IP Networking with Intel DPDK on Linux
Disruptive IP Networking with Intel DPDK on LinuxNaoto MATSUMOTO
 
Python Basics for Operators Troubleshooting OpenStack
Python Basics for Operators Troubleshooting OpenStackPython Basics for Operators Troubleshooting OpenStack
Python Basics for Operators Troubleshooting OpenStackJames Dennis
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsHisaki Ohara
 
Tommaso Cucinotta - Low-latency and power-efficient audio applications on Linux
Tommaso Cucinotta - Low-latency and power-efficient audio applications on LinuxTommaso Cucinotta - Low-latency and power-efficient audio applications on Linux
Tommaso Cucinotta - Low-latency and power-efficient audio applications on Linuxlinuxlab_conf
 
Openstack Quantum Security Groups Session
Openstack Quantum Security Groups SessionOpenstack Quantum Security Groups Session
Openstack Quantum Security Groups SessionDavid Lapsley
 
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro NakajimaDPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro NakajimaJim St. Leger
 
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitchDPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitchJim St. Leger
 
Mininet: Moving Forward
Mininet: Moving ForwardMininet: Moving Forward
Mininet: Moving ForwardON.Lab
 
Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)micchie
 
Vigor 3910 docker firmware quick start
Vigor 3910 docker firmware quick startVigor 3910 docker firmware quick start
Vigor 3910 docker firmware quick startJimmy Tu
 
Openstack Trunk Port
Openstack Trunk PortOpenstack Trunk Port
Openstack Trunk Portbenceromsics
 

What's hot (20)

Symmetric Crypto for DPDK - Declan Doherty
Symmetric Crypto for DPDK - Declan DohertySymmetric Crypto for DPDK - Declan Doherty
Symmetric Crypto for DPDK - Declan Doherty
 
DPDK summit 2015: It's kind of fun to do the impossible with DPDK
DPDK summit 2015: It's kind of fun  to do the impossible with DPDKDPDK summit 2015: It's kind of fun  to do the impossible with DPDK
DPDK summit 2015: It's kind of fun to do the impossible with DPDK
 
Operating System fo IoT
Operating System fo IoTOperating System fo IoT
Operating System fo IoT
 
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
 
Coscup SDN workshop - mininet
Coscup SDN workshop - mininetCoscup SDN workshop - mininet
Coscup SDN workshop - mininet
 
Performance challenges in software networking
Performance challenges in software networkingPerformance challenges in software networking
Performance challenges in software networking
 
Accelerating Neutron with Intel DPDK
Accelerating Neutron with Intel DPDKAccelerating Neutron with Intel DPDK
Accelerating Neutron with Intel DPDK
 
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics WorkshopLagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
 
Disruptive IP Networking with Intel DPDK on Linux
Disruptive IP Networking with Intel DPDK on LinuxDisruptive IP Networking with Intel DPDK on Linux
Disruptive IP Networking with Intel DPDK on Linux
 
Python Basics for Operators Troubleshooting OpenStack
Python Basics for Operators Troubleshooting OpenStackPython Basics for Operators Troubleshooting OpenStack
Python Basics for Operators Troubleshooting OpenStack
 
ON.LAB Mininet
ON.LAB MininetON.LAB Mininet
ON.LAB Mininet
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructions
 
Tommaso Cucinotta - Low-latency and power-efficient audio applications on Linux
Tommaso Cucinotta - Low-latency and power-efficient audio applications on LinuxTommaso Cucinotta - Low-latency and power-efficient audio applications on Linux
Tommaso Cucinotta - Low-latency and power-efficient audio applications on Linux
 
Openstack Quantum Security Groups Session
Openstack Quantum Security Groups SessionOpenstack Quantum Security Groups Session
Openstack Quantum Security Groups Session
 
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro NakajimaDPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
 
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitchDPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
 
Mininet: Moving Forward
Mininet: Moving ForwardMininet: Moving Forward
Mininet: Moving Forward
 
Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)
 
Vigor 3910 docker firmware quick start
Vigor 3910 docker firmware quick startVigor 3910 docker firmware quick start
Vigor 3910 docker firmware quick start
 
Openstack Trunk Port
Openstack Trunk PortOpenstack Trunk Port
Openstack Trunk Port
 

Viewers also liked

Contiki introduction I.
Contiki introduction I.Contiki introduction I.
Contiki introduction I.Dingxin Xu
 
Building the Internet of Things with Thingsquare and Contiki - day 1, part 1
Building the Internet of Things with Thingsquare and Contiki - day 1, part 1Building the Internet of Things with Thingsquare and Contiki - day 1, part 1
Building the Internet of Things with Thingsquare and Contiki - day 1, part 1Adam Dunkels
 
Open Source XMPP for Cloud Services
Open Source XMPP for Cloud ServicesOpen Source XMPP for Cloud Services
Open Source XMPP for Cloud Servicesmattjive
 
Switch to Python 3…now…immediately
Switch to Python 3…now…immediatelySwitch to Python 3…now…immediately
Switch to Python 3…now…immediatelyRussel Winder
 
XMPP Technical Overview + Jingle Protocol Study
XMPP Technical Overview + Jingle Protocol StudyXMPP Technical Overview + Jingle Protocol Study
XMPP Technical Overview + Jingle Protocol StudyValérian Saliou
 
Internet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! nightInternet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! nightAndy Gelme
 
Contiki introduction II-from what to how
Contiki introduction II-from what to howContiki introduction II-from what to how
Contiki introduction II-from what to howDingxin Xu
 
Arduino compatible layer (with 6LoWPAN) on Contiki
Arduino compatible layer (with 6LoWPAN) on ContikiArduino compatible layer (with 6LoWPAN) on Contiki
Arduino compatible layer (with 6LoWPAN) on Contiki裕士 常田
 
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under LinuxPractical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under LinuxSamsung Open Source Group
 
The Real Time Web with XMPP
The Real Time Web with XMPPThe Real Time Web with XMPP
The Real Time Web with XMPPJack Moffitt
 
RIOT and the evolution of operating systems for IoT devices (Emmanuel Baccell...
RIOT and the evolution of operating systems for IoT devices (Emmanuel Baccell...RIOT and the evolution of operating systems for IoT devices (Emmanuel Baccell...
RIOT and the evolution of operating systems for IoT devices (Emmanuel Baccell...AGILE IoT
 
XMPP In Real Time
XMPP In Real TimeXMPP In Real Time
XMPP In Real Timeguest488a24
 
ICT role in Yemen
ICT role in Yemen ICT role in Yemen
ICT role in Yemen Salah Amean
 
Contiki os timer tutorial
Contiki os timer tutorialContiki os timer tutorial
Contiki os timer tutorialSalah Amean
 
Network configuration
Network configurationNetwork configuration
Network configurationengshemachi
 
CoAP Course for m2m and Internet of Things scenarios
CoAP Course for m2m and Internet of Things scenariosCoAP Course for m2m and Internet of Things scenarios
CoAP Course for m2m and Internet of Things scenarioscarlosralli
 

Viewers also liked (20)

Contiki introduction I.
Contiki introduction I.Contiki introduction I.
Contiki introduction I.
 
Building the Internet of Things with Thingsquare and Contiki - day 1, part 1
Building the Internet of Things with Thingsquare and Contiki - day 1, part 1Building the Internet of Things with Thingsquare and Contiki - day 1, part 1
Building the Internet of Things with Thingsquare and Contiki - day 1, part 1
 
Internship end
Internship endInternship end
Internship end
 
Open Source XMPP for Cloud Services
Open Source XMPP for Cloud ServicesOpen Source XMPP for Cloud Services
Open Source XMPP for Cloud Services
 
Switch to Python 3…now…immediately
Switch to Python 3…now…immediatelySwitch to Python 3…now…immediately
Switch to Python 3…now…immediately
 
XMPP Technical Overview + Jingle Protocol Study
XMPP Technical Overview + Jingle Protocol StudyXMPP Technical Overview + Jingle Protocol Study
XMPP Technical Overview + Jingle Protocol Study
 
Internet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! nightInternet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! night
 
Contiki introduction II-from what to how
Contiki introduction II-from what to howContiki introduction II-from what to how
Contiki introduction II-from what to how
 
Arduino compatible layer (with 6LoWPAN) on Contiki
Arduino compatible layer (with 6LoWPAN) on ContikiArduino compatible layer (with 6LoWPAN) on Contiki
Arduino compatible layer (with 6LoWPAN) on Contiki
 
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under LinuxPractical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
 
The Real Time Web with XMPP
The Real Time Web with XMPPThe Real Time Web with XMPP
The Real Time Web with XMPP
 
What is XMPP Protocol
What is XMPP ProtocolWhat is XMPP Protocol
What is XMPP Protocol
 
RIOT and the evolution of operating systems for IoT devices (Emmanuel Baccell...
RIOT and the evolution of operating systems for IoT devices (Emmanuel Baccell...RIOT and the evolution of operating systems for IoT devices (Emmanuel Baccell...
RIOT and the evolution of operating systems for IoT devices (Emmanuel Baccell...
 
Run Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT NetworkRun Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT Network
 
XMPP In Real Time
XMPP In Real TimeXMPP In Real Time
XMPP In Real Time
 
XMPP 101
XMPP 101XMPP 101
XMPP 101
 
ICT role in Yemen
ICT role in Yemen ICT role in Yemen
ICT role in Yemen
 
Contiki os timer tutorial
Contiki os timer tutorialContiki os timer tutorial
Contiki os timer tutorial
 
Network configuration
Network configurationNetwork configuration
Network configuration
 
CoAP Course for m2m and Internet of Things scenarios
CoAP Course for m2m and Internet of Things scenariosCoAP Course for m2m and Internet of Things scenarios
CoAP Course for m2m and Internet of Things scenarios
 

Similar to IPSN 2009 Contiki / uIP tutorial

CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)
CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)
CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)The Linux Foundation
 
CINECA for HCP and e-infrastructures infrastructures
CINECA for HCP and e-infrastructures infrastructuresCINECA for HCP and e-infrastructures infrastructures
CINECA for HCP and e-infrastructures infrastructuresCineca
 
Architectures and buildings
Architectures and buildingsArchitectures and buildings
Architectures and buildingsARCFIRE ICT
 
Intelligent IoT gateway on openwrt
Intelligent IoT gateway on openwrtIntelligent IoT gateway on openwrt
Intelligent IoT gateway on openwrtMateusz Babiarz
 
SNAIL Project for IoT Connectivity
SNAIL Project for IoT ConnectivitySNAIL Project for IoT Connectivity
SNAIL Project for IoT ConnectivityDaeyoung Kim
 
Internet das Coisas: Tecnologias Atuais e Futuras, e o Papel do Software
Internet das Coisas: Tecnologias Atuais e Futuras, e o Papel do SoftwareInternet das Coisas: Tecnologias Atuais e Futuras, e o Papel do Software
Internet das Coisas: Tecnologias Atuais e Futuras, e o Papel do SoftwareAntonio Marcos Alberti
 
Unikraft: Fast, Specialized Unikernels the Easy Way
Unikraft: Fast, Specialized Unikernels the Easy WayUnikraft: Fast, Specialized Unikernels the Easy Way
Unikraft: Fast, Specialized Unikernels the Easy WayScyllaDB
 
Contiki IoT simulation
Contiki IoT simulationContiki IoT simulation
Contiki IoT simulationnabati
 
Real-time DeepLearning on IoT Sensor Data
Real-time DeepLearning on IoT Sensor DataReal-time DeepLearning on IoT Sensor Data
Real-time DeepLearning on IoT Sensor DataRomeo Kienzler
 
Internet of Things – Contiki.pdf
Internet of Things – Contiki.pdfInternet of Things – Contiki.pdf
Internet of Things – Contiki.pdfSudhanshiBakre1
 
XPDDS18: Unleashing the Power of Unikernels with Unikraft - Florian Schmidt, ...
XPDDS18: Unleashing the Power of Unikernels with Unikraft - Florian Schmidt, ...XPDDS18: Unleashing the Power of Unikernels with Unikraft - Florian Schmidt, ...
XPDDS18: Unleashing the Power of Unikernels with Unikraft - Florian Schmidt, ...The Linux Foundation
 
Webcast: Reduce latency, improve analytics and maximize asset utilization in ...
Webcast: Reduce latency, improve analytics and maximize asset utilization in ...Webcast: Reduce latency, improve analytics and maximize asset utilization in ...
Webcast: Reduce latency, improve analytics and maximize asset utilization in ...Emulex Corporation
 
Intelligent IoT Gateway on OpenWrt
Intelligent IoT Gateway on OpenWrtIntelligent IoT Gateway on OpenWrt
Intelligent IoT Gateway on OpenWrtTieto Corporation
 
Open Ethernet: an open-source approach to modern network design
Open Ethernet: an open-source approach to modern network designOpen Ethernet: an open-source approach to modern network design
Open Ethernet: an open-source approach to modern network designAlexander Petrovskiy
 
Addressing the hard problems of automotive Linux: networking and IPC
Addressing the hard problems of automotive Linux: networking and IPCAddressing the hard problems of automotive Linux: networking and IPC
Addressing the hard problems of automotive Linux: networking and IPCAlison Chaiken
 

Similar to IPSN 2009 Contiki / uIP tutorial (20)

CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)
CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)
CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)
 
CINECA for HCP and e-infrastructures infrastructures
CINECA for HCP and e-infrastructures infrastructuresCINECA for HCP and e-infrastructures infrastructures
CINECA for HCP and e-infrastructures infrastructures
 
Architectures and buildings
Architectures and buildingsArchitectures and buildings
Architectures and buildings
 
Intelligent IoT gateway on openwrt
Intelligent IoT gateway on openwrtIntelligent IoT gateway on openwrt
Intelligent IoT gateway on openwrt
 
SNAIL Project for IoT Connectivity
SNAIL Project for IoT ConnectivitySNAIL Project for IoT Connectivity
SNAIL Project for IoT Connectivity
 
Internet das Coisas: Tecnologias Atuais e Futuras, e o Papel do Software
Internet das Coisas: Tecnologias Atuais e Futuras, e o Papel do SoftwareInternet das Coisas: Tecnologias Atuais e Futuras, e o Papel do Software
Internet das Coisas: Tecnologias Atuais e Futuras, e o Papel do Software
 
Unikraft: Fast, Specialized Unikernels the Easy Way
Unikraft: Fast, Specialized Unikernels the Easy WayUnikraft: Fast, Specialized Unikernels the Easy Way
Unikraft: Fast, Specialized Unikernels the Easy Way
 
ccna lec 1.pdf
ccna lec 1.pdfccna lec 1.pdf
ccna lec 1.pdf
 
Contiki IoT simulation
Contiki IoT simulationContiki IoT simulation
Contiki IoT simulation
 
QSpiders - Day1 Network Basics
QSpiders - Day1 Network BasicsQSpiders - Day1 Network Basics
QSpiders - Day1 Network Basics
 
Real-time DeepLearning on IoT Sensor Data
Real-time DeepLearning on IoT Sensor DataReal-time DeepLearning on IoT Sensor Data
Real-time DeepLearning on IoT Sensor Data
 
Internet of Things – Contiki.pdf
Internet of Things – Contiki.pdfInternet of Things – Contiki.pdf
Internet of Things – Contiki.pdf
 
µIP (micro IP)
µIP (micro IP)µIP (micro IP)
µIP (micro IP)
 
XPDDS18: Unleashing the Power of Unikernels with Unikraft - Florian Schmidt, ...
XPDDS18: Unleashing the Power of Unikernels with Unikraft - Florian Schmidt, ...XPDDS18: Unleashing the Power of Unikernels with Unikraft - Florian Schmidt, ...
XPDDS18: Unleashing the Power of Unikernels with Unikraft - Florian Schmidt, ...
 
Webcast: Reduce latency, improve analytics and maximize asset utilization in ...
Webcast: Reduce latency, improve analytics and maximize asset utilization in ...Webcast: Reduce latency, improve analytics and maximize asset utilization in ...
Webcast: Reduce latency, improve analytics and maximize asset utilization in ...
 
International SIP conference 2009
International SIP conference 2009International SIP conference 2009
International SIP conference 2009
 
Intelligent IoT Gateway on OpenWrt
Intelligent IoT Gateway on OpenWrtIntelligent IoT Gateway on OpenWrt
Intelligent IoT Gateway on OpenWrt
 
Mina2
Mina2Mina2
Mina2
 
Open Ethernet: an open-source approach to modern network design
Open Ethernet: an open-source approach to modern network designOpen Ethernet: an open-source approach to modern network design
Open Ethernet: an open-source approach to modern network design
 
Addressing the hard problems of automotive Linux: networking and IPC
Addressing the hard problems of automotive Linux: networking and IPCAddressing the hard problems of automotive Linux: networking and IPC
Addressing the hard problems of automotive Linux: networking and IPC
 

Recently uploaded

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Recently uploaded (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

IPSN 2009 Contiki / uIP tutorial

  • 1. IP-based Sensor Networking with Contiki Adam Dunkels, PhD, Fredrik Österlind, Nicolas Tsiftes, Niclas Finne, Joakim Eriksson, Zhitao He (SICS) Oliver Schmidt (SAP AG) Julien Abeillé, Mathilde Durvy, PhD (Cisco) Takahide Matsutsuka, Simon Barner, Simon Berg Colin O'Flynn (NewAE) Eric Gnoske, Blake Leverett, Michael Vidales (Atmel) David Kopf
  • 2. Today • IP for embedded systems • The history of IP-based sensor networks • Contiki • Hands-on – Instant Contiki – Contiki for Tmote Sky – Tmote Sky as IPv6/6lowpan bridge
  • 3. IP for Embedded Systems
  • 4. History of IP for Embedded Systems • Embedded systems – Resource-constrained – Autonomous operation – Remote configuration, data collection, … • 1999: EMIT Alliance – remote communication – EMbed the InterneT Alliance – EmWare, Atmel, Texas Instruments, Zilog, Microchip, … – ”IP too heavyweight” • Non-IP based wired protocol • Gateways
  • 5. 2000: lwIP • Open source lightweight IP stack – Top-down design • Similar to BSD, Linux, … – 40 kb code, 20 kb RAM – IP, ICMP, UDP, TCP – Widely used • ”Too large”…
  • 6. 2001: uIP • World’s smallest TCP/IP stack – Open source – Bottom-up design – 4 kb code, 1 kb RAM – Fully RFC compliant – IP, ICMP, UDP, TCP
  • 7.
  • 8. 2002: IP for Embedded is a Fact • Non-IP solutions went away – Highly optimized custom protocols – IP took over • EMIT Alliance is no more – EmWare moved to uIP
  • 9. The Most Important Lesson Learned • Ability to communicate more important than performance
  • 10. Example: uIP-based Pico Satellite • CubeSat: pico satellite construction kit – MSP430-based • 128 bytes of RAM for uIP
  • 11. 2004: IP-based Sensor Networks • Lightweight IP stack (uIP) • Header compression • Low-power MAC layer • Sensor data – UDP • Configuration – TCP • 2006: IETF 6lowpan
  • 12. 2004: First IP-based Sensor Network
  • 13. Why IP for Sensor Networks? • Scalable • Versatile • Manageable • Open and flexible standard • Widely deployed • Lightweight – As shown by uIP, uIPv6 • Low-power – IETF 6lowpan wg – Power-saving MAC protocols
  • 14. September 2008: IP for Smart Objects Alliance
  • 15. October 2008: uIPv6, first certified IPv6 stack, SICSlowpan
  • 16.
  • 17. November 2008: 30th best invention of 2008
  • 19. Contiki as an Open Source Project • Open source – BSD license – C programming language • Version 1.0 released in March 2003 – Version 2.2.3 in March 2009 • Highly portable – Tmote Sky, JCreate, TelosB, Atmel Raven, MSB, ESB, MicaZ, … – Simulators: Cooja, MSPsim, AvroraZ, netsim – Native platform • Actively developed – 17 developers from SICS, SAP, Cisco, NewAE, TU Munich, Atmel • Active mailing list
  • 20. Contiki as a Research Theme • Exploring successful computer science abstractions, mechanisms for sensor networks – Dynamic module loading and linking [ACM SenSys 2006] – File system [IEEE/ACM IPSN 2009] – Multi-threaded programming [EmNets 2004] – Java, scripting, … [ACM SenSys 2006, …] – Interactive network shell – IP networking for low-power embedded systems [ACM/Usenix MobiSys 2003, ACM SenSys2007, ACM SenSys 2008] • Pursuing new abstractions – Protothreads [ACM SenSys 2006] – Low-power radio networking [ACM SenSys 2007] – Power profiling [EmNets 2007] – Novel communication primitives
  • 21. Contiki Influence • Dynamic loading [EmNets 2004] – SOS: loadable modules [MobiSys 2005] – TinyOS 2.1.0: loadable modules (2008) • Preemptive threads on top of events [EmNets 2004] – TOSThreads: preemptive threads on top of events (TinyOS 2.1.0, 2008) • Software-based power profiling [EmNets 2007] – TinyOS Quanto [OSDI 2008] • IP-based sensor networks [MobiSys 2003, EWSN 2004, SenSys 2007] – IETF 6lowpan: IPv6 over 802.15.4 (2006) – Two papers at ACM SenSys 2008 – Tutorials at IPSN 2009 – Several demos, posters at SenSys, IPSN, …
  • 22. Coffee [IPSN 2009] Contiki Timeline Contiki 2.2.3 Contiki 2.2.2 Best poster @ SenSys 2008 uIPv6 Contiki 2.2.1 Contiki 2.2 Instant Contiki Contiki 2.1 Best demo @ SenSys 2007 (Mottola, Picco) Power profiling [SenSys 2007] Rime [SenSys 2007] Power profiling [EmNets 2007] Contiki 2.0 Dynamic linking [SenSys 2006] Protothreads paper [SenSys 2006] Cooja Protothreads Contiki paper [EmNets 2004] Contiki 1.2 IP for Sensor networks [EWSN 2004] uIP paper [MobiSys 2003] Contiki 1.0 uIP lwIP 2007 2008 2009 2001 2002 2003 2004 2005 2006
  • 23. The Coffee file system [IPSN 2009] • Flash-based file system • open(), read(), seek(), write(), close() • Constant memory complexity • Very lightweight – 5 kb ROM, < 0.5 kb RAM • Very fast – More than 92% of raw flash throughput
  • 24. Interactive shell • Network debugging, performance tuning • Leverage UNIX-style pipelines • Network commands • Direct serial connection, or over Telnet/TCP • A generic interface for higher level applications – Automated interaction, scripting
  • 25. Power Profiling [EmNets 2007] • Software-based – Zero-cost hardware – Zero-effort deployment • Good accuracy, low overhead • Enables network-scale energy profiling • Enables energy-aware mechanisms
  • 26. Linear current draw Transmit LED Sensors Listen CPU
  • 27. Accuracy is good [EmNets 2007]
  • 28. Trend: experimental is increasing 30 Experimental papers, 25 ACM SenSys 20 15 10 5 0 2003 2004 2005 2006 2007 2008 Year
  • 29. Example: B-MAC [Polastre et al, SenSys 2004] “To [experimentally] determine the power consumption of each protocol, we implemented counters in the MAC protocol that keep track of how many times various operations were performed. For B-MAC, this includes receiving a byte, transmitting a byte, and checking the channel for activity. For S-MAC, we count the amount of time that the node is active, number of bytes transmitted and received, and the additional time the node spent awake due to adaptive listening.” Polastre, Hill, Culler. Versatile low power media access for wireless sensor networks. SenSys 2004
  • 30. Per-peripheral Power Profiling 7 6 5 4 3 2 1 0 CPU LPM Tx Rx
  • 31. Per-packet Power Profiling 7 Broadcast 6 5 4 Data reception 3 2 Idle listening 1 0 CPU LPM Tx Rx
  • 32. Rime: Communication Primitives [ACM SenSys 2007] • Makes implementation of sensor network mechanisms easier • A set of protocols – Data collection – Data dissemination – Unicast multi-hop routing – Single-hop bulk transfer –…
  • 33. The Contniki IP Architecture Applications uIP Rime SICSlowpan SICSlowmac X-MAC LPP NULLMAC CC2420 CC1100
  • 34. Instant Contiki • Contiki development environment • Single-file download • Linux system with all Contki tools installed • Runs in VMWare, VirtualBox • Removes toolset installation hurdle
  • 35. Seamless Integration with IP Networks • Atmel Raven/Jackdaw USB Stick • Attaches as network card in Windows, Linux [EWSN 2009] • IPv6 packets sent out over 802.15.4 with 6lowpan header compression
  • 36. Today: Build IPv6 Bridge with a Mote • Make Tmote Sky mote a Linux SICSlowpan network card • No custom hardware needed Linux Application Application Transport Transport IP IP MAC / Link MAC / Link mote mote
  • 37. Contiki Programming Crash Course • Hello world • uIP APIs – Raw API – Protosockets • Timers • Building
  • 38. Hello, world! /* Declare the process */ PROCESS(hello_world_process, “Hello world”); /* Make the process start when the module is loaded */ AUTOSTART_PROCESSES(&hello_world_process); /* Define the process code */ PROCESS_THREAD(hello_world_process, ev, data) { PROCESS_BEGIN(); /* Must always come first */ printf(“Hello, world!n”); /* Initialization code goes here */ while(1) { /* Loop for ever */ PROCESS_WAIT_EVENT(); /* Wait for something to happen */ } PROCESS_END(); /* Must always come last */ }
  • 39. uIP APIs • Two APIs – The “raw” uIP event-driven API – Protosockets – sockets-like programming based on protothreads • Event-driven API works well for small programs – Explicit state machines • Protosockets work better for larger programs – Sequential code
  • 40. Protosockets: example int smtp_protothread(struct psock *s) { PSOCK_BEGIN(s); PSOCK_READTO(s, 'n'); if(strncmp(inputbuffer, “220”, 3) != 0) { PSOCK_CLOSE(s); PSOCK_EXIT(s); } PSOCK_SEND(s, “HELO ”, 5); PSOCK_SEND(s, hostname, strlen(hostname)); PSOCK_SEND(s, “rn”, 2); PSOCK_READTO(s, 'n'); if(inputbuffer[0] != '2') { PSOCK_CLOSE(s); PSOCK_EXIT(s); }
  • 41. Four types of timers • struct timer – Passive timer, only keeps track of its expiration time • struct etimer – Active timer, sends an event when it expires • struct ctimer – Active timer, calls a function when it expires • struct rtimer – Real-time timer, calls a function at an exact time – Limited function support
  • 42. Using etimers in processes PROCESS_THREAD(hello_world_process, ev, data) { static struct etimer et; /* Must be static */ PROCESS_BEGIN(); /* since processes are */ /* protothreads */ while(1) { etimer_set(&et, CLOCK_SECOND); PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&et)); } PROCESS_END(); }
  • 43. Example: building hello world • cd examples/hello-world • make TARGET=native Build monolithic system for native • ./hello-world.native Run entire Contiki system + app • make TARGET=netsim Build netsim simulation • ./hello-world.netsim Run netsim simulation • make TARGET=sky Build monolithic system image • make TARGET=sky hello-world.u Build & upload system image • make TARGET=sky hello-world.ce Build loadable module • make TARGET=esb Monolithic system image for ESB • make TARGET=esb hello-world.u Build & upload image • make TARGET=esb hello-world.ce Build loadable module
  • 44. make TARGET= • TARGET=name of a directory under platform/ • make TARGET=xxx savetarget – Remembers the TARGET – Example: make TARGET=netsim savetarget
  • 46. Hands on • Install Instant Contiki – USB stick with VMWare Player, Instant Contiki, FTDI Driver • Compilation – Hello World for native – Blink for Tmote Sky – Hello World for Tmote Sky – Contiki Shell for Tmote Sky • IPv6 mote bridge – Tmote Sky / JCreate as an IPv6/6lowpan bridge
  • 47. Conclusions • IP for embedded systems, sensor networks • Contiki: many influential, widely used features – IP for sensor networks, dynamic loading, protothreads – Vision and mission • Exploring successful CS abstractions in a novel context, pursing new abstractions • Instant Contiki simplifies development • IPv6 bridge mote: no custom hardware needed