Download presentation
Presentation is loading. Please wait.
Published byBenjamin Gift Modified over 9 years ago
1
KFUPM, COE 499. Ayman Al Bassam COE 499 Wireless Sensor Networks LAB 1
2
KFUPM, COE 499. Ayman Al Bassam Material covered in this lab Definition of Tiny Operating System. Definition of Tiny Operating System. The need for TinyOS The need for TinyOS Development and History of TinyOS Development and History of TinyOS Component, Event Driven and Object Oriented Programming Component, Event Driven and Object Oriented Programming Using TinyOS Using TinyOS Environment and Installation Environment and Installation nesC nesC
3
KFUPM, COE 499. Ayman Al Bassam Definition of TinyOS Formal Definition: TinyOS is an open-source operating system designed for wireless embedded sensor networks. It features a component- based architecture which enables rapid innovation and implementation while minimizing code size as required by the severe memory constraints inherent in sensor networks. TinyOS's component library includes network protocols, distributed services, sensor drivers, and data acquisition tools – all of which can be used as-is or be further refined for a custom application. TinyOS is an open-source operating system designed for wireless embedded sensor networks. It features a component- based architecture which enables rapid innovation and implementation while minimizing code size as required by the severe memory constraints inherent in sensor networks. TinyOS's component library includes network protocols, distributed services, sensor drivers, and data acquisition tools – all of which can be used as-is or be further refined for a custom application.
4
KFUPM, COE 499. Ayman Al Bassam Definition of TinyOS TinyOS's event-driven execution model enables fine- grained power management yet allows the scheduling flexibility made necessary by the unpredictable nature of wireless communication and physical world interfaces. TinyOS's event-driven execution model enables fine- grained power management yet allows the scheduling flexibility made necessary by the unpredictable nature of wireless communication and physical world interfaces. TinyOS has been ported to over a dozen platforms and numerous sensor boards. A wide community uses it in simulation to develop and test various algorithms and protocols. New releases see over 10,000 downloads. Over 500 research groups and companies are using TinyOS on the Berkeley/Crossbow Motes. TinyOS has been ported to over a dozen platforms and numerous sensor boards. A wide community uses it in simulation to develop and test various algorithms and protocols. New releases see over 10,000 downloads. Over 500 research groups and companies are using TinyOS on the Berkeley/Crossbow Motes.
5
KFUPM, COE 499. Ayman Al Bassam Definition of TinyOS Numerous groups are actively contributing code to the sourceforge site and working together to establish standard, interoperable network services built from a base of direct experience and honed through competitive analysis in an open environment. Numerous groups are actively contributing code to the sourceforge site and working together to establish standard, interoperable network services built from a base of direct experience and honed through competitive analysis in an open environment.
6
KFUPM, COE 499. Ayman Al Bassam Definition of TinyOS In Simple words: Tiny OS is an open source programming environment that is portable across different platforms (Motes) and works under Linux like environment. Tiny OS is an open source programming environment that is portable across different platforms (Motes) and works under Linux like environment. TinyOS implements Component-based Programming i.e. It provides different libraries and code that can be used in conjunction with the developer ’ s code. TinyOS implements Component-based Programming i.e. It provides different libraries and code that can be used in conjunction with the developer ’ s code. Main component includes the Boot sequence the OS scheduler and different interfaces to interact with different peripherals (sensors, radio chips...) Main component includes the Boot sequence the OS scheduler and different interfaces to interact with different peripherals (sensors, radio chips...) Basically you are tailoring your own OS according to your needs !! Basically you are tailoring your own OS according to your needs !!
7
KFUPM, COE 499. Ayman Al Bassam The need for TinyOS To set a standard operating system and programming tools that can be used in the industry. making merging applications from generation of hardware to a newer one easier. To set a standard operating system and programming tools that can be used in the industry. making merging applications from generation of hardware to a newer one easier. Many constrains are imposed by the hardware like: power consumption, limited computational power and storage thus, the need for a specialized OS. Many constrains are imposed by the hardware like: power consumption, limited computational power and storage thus, the need for a specialized OS. Allowing different devices from different manufactures to use the same code. Allowing different devices from different manufactures to use the same code.
8
KFUPM, COE 499. Ayman Al Bassam Development & History of TinyOS TinyOS began as a project at UC Berkeley as part of the Defense Advanced Research Projects Agency (DARPA) NEST program. It has since grown to involve thousands of academic and commercial developers and users worldwide. TinyOS began as a project at UC Berkeley as part of the Defense Advanced Research Projects Agency (DARPA) NEST program. It has since grown to involve thousands of academic and commercial developers and users worldwide. 1999: First TinyOS platform (WeC) and OS implementations are developed at Berkeley. 1999: First TinyOS platform (WeC) and OS implementations are developed at Berkeley.
9
KFUPM, COE 499. Ayman Al Bassam Development & History of TinyOS 2000: Berkeley designs the rene platform and partners with Crossbow, Inc., who mass produces the hardware. TinyOS version 0.43 is made available to the public via SourceForge. Pre-1.0 versions of TinyOS are a mix of C and Perl scripts. 2000: Berkeley designs the rene platform and partners with Crossbow, Inc., who mass produces the hardware. TinyOS version 0.43 is made available to the public via SourceForge. Pre-1.0 versions of TinyOS are a mix of C and Perl scripts.Perl April 2002: Work on the nesC programming language begins as a collaboration between Intel Research and UC Berkeley. April 2002: Work on the nesC programming language begins as a collaboration between Intel Research and UC Berkeley. September 2002: TinyOS version 1.0, implemented in nesC, is released. September 2002: TinyOS version 1.0, implemented in nesC, is released.
10
KFUPM, COE 499. Ayman Al Bassam Development & History of TinyOS June 2004: Working group forms on next steps for TinyOS, based on experiences porting to new platforms. Group agrees to start work on 2.0. June 2004: Working group forms on next steps for TinyOS, based on experiences porting to new platforms. Group agrees to start work on 2.0. November 2006: TinyOS 2.0 released at the SenSys conference in Boulder, CO. November 2006: TinyOS 2.0 released at the SenSys conference in Boulder, CO. August 2008: TinyOS 2.1.0 released. August 2008: TinyOS 2.1.0 released.
11
KFUPM, COE 499. Ayman Al Bassam Component, Event Driven and Object Oriented Programming Tiny OS introduces a new concept in programming called Component-based Programming. Tiny OS introduces a new concept in programming called Component-based Programming. The idea is to create different components and “ wire ” them together. The idea is to create different components and “ wire ” them together. A whole application can be created with out writing a single line of code. A whole application can be created with out writing a single line of code. Event driven programming is used heavily in case of an event happened a component signals another component to continue processing. Event driven programming is used heavily in case of an event happened a component signals another component to continue processing. Object oriented programming is implemented in means of hierarchy (the use of interfaces like Java). Object oriented programming is implemented in means of hierarchy (the use of interfaces like Java).
12
KFUPM, COE 499. Ayman Al Bassam Tiny OS Code Example This is the configuration file configuration BlinkAppC{ } implementation{ components MainC, BlinkC, LedsC; components new TimerMilliC() as Timer0; components new TimerMilliC() as Timer1; components new TimerMilliC() as Timer2; BlinkC -> MainC.Boot; BlinkC.Timer0 -> Timer0; BlinkC.Timer1 -> Timer1; BlinkC.Timer2 -> Timer2; BlinkC.Leds -> LedsC; }
13
KFUPM, COE 499. Ayman Al Bassam TinyOS Code Example The implementation Code module BlinkC { uses interface Timer as Timer0; uses interface Timer as Timer1; uses interface Timer as Timer2; uses interface Leds; uses interface Boot;} implementation{ event void Boot.booted() { call Timer0.startPeriodic( 250 ); call Timer1.startPeriodic( 500 ); call Timer2.startPeriodic( 1000 ); } event void Timer0.fired() { call Leds.led0Toggle(); } event void Timer1.fired() { call Leds.led1Toggle(); } event void Timer2.fired() { call Leds.led2Toggle(); } }
14
KFUPM, COE 499. Ayman Al Bassam Using TinyOS TinyOS is designed to operate on Linux environment TinyOS is designed to operate on Linux environment Since most of us are used to deal with Windows a better solution has to be found. Since most of us are used to deal with Windows a better solution has to be found. There are 3 workarounds that we will discuss in the next slides There are 3 workarounds that we will discuss in the next slides
15
KFUPM, COE 499. Ayman Al Bassam Option I: Using Cygwin & Installing TOS manually Cygwin is a freely available Linux API emulator Cygwin is a freely available Linux API emulator under Windows that gives the feel and looks of Linux/Unix environment. The disadvantage is that after installing Cygwin TOS has to be installed manually. The disadvantage is that after installing Cygwin TOS has to be installed manually. A tedious job but very rewarding. A tedious job but very rewarding. Will be discussed next lab. Will be discussed next lab.
16
KFUPM, COE 499. Ayman Al Bassam Option II: Using Xubuntos Live CD Xubuntos is a pre configure Linux distribution with TinyOS 2.0.2 Xubuntos is a pre configure Linux distribution with TinyOS 2.0.2 Freely available and can be booted directly from the live CD or installed as a second OS on the host machine. Freely available and can be booted directly from the live CD or installed as a second OS on the host machine. Easiest way to do it and very convenient. Easiest way to do it and very convenient.
17
KFUPM, COE 499. Ayman Al Bassam Option III: Using VMWare Player & Xubuntos VMWare player is a free Virtual machine emulator that can be used to run different images of different operating system on top of windows. VMWare player is a free Virtual machine emulator that can be used to run different images of different operating system on top of windows. The idea is OS within another OS. The idea is OS within another OS. Xubuntos runs on top of Windows using VMWare player. Xubuntos runs on top of Windows using VMWare player. Very Easy and convenient to use. Very Easy and convenient to use.
18
KFUPM, COE 499. Ayman Al Bassam Using TinyOS All files will be available thru the lab administrator or on the course website. All files will be available thru the lab administrator or on the course website. All the tools can also be obtained freely online All the tools can also be obtained freely online
19
KFUPM, COE 499. Ayman Al Bassam nesC Network embedded system C. Network embedded system C. A derivative of the C programming language. A derivative of the C programming language. Developed by a collaboration between UC Berkley and Intel. Developed by a collaboration between UC Berkley and Intel. Modified to handle special data structures and the Object oriented/ Component-based nature of TOS. Modified to handle special data structures and the Object oriented/ Component-based nature of TOS. More details will be given later on. More details will be given later on.
20
KFUPM, COE 499. Ayman Al Bassam Recourses www.tinyos.net www.tinyos.net www.tinyos.net Discussion boards and e-mail groups. Discussion boards and e-mail groups. Start Goggling !! Start Goggling !!
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.