0% found this document useful (0 votes)
61 views16 pages

Lecture - 07 - Internet of Things (IoTs) Development Platforms

The document discusses several open-source software platforms and standards for Internet of Things development including ContikiOS, TinyOS, Arduino, and others. It also provides details on the TinyOS operating system, its nesC programming language, component-based architecture, and use of interfaces and events.

Uploaded by

Tú Phạm Anh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views16 pages

Lecture - 07 - Internet of Things (IoTs) Development Platforms

The document discusses several open-source software platforms and standards for Internet of Things development including ContikiOS, TinyOS, Arduino, and others. It also provides details on the TinyOS operating system, its nesC programming language, component-based architecture, and use of interfaces and events.

Uploaded by

Tú Phạm Anh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

IoTs Open-Source Development

Software Platforms (1/2): Platforms


• ContikiOS, http://www.contiki-os.org/
• TinyOS, http://www.tinyos.net/
• Adruino, http://www.arduino.cc/
• BeagleBoard, http://beagleboard.org/
• Raspbian, http://raspbian.org/
• OpenIoT, http://openiot.eu/
• Cloud-based IoTs [Emulation/Scalability/Availability]
• Simulation/Emulation: ns-2, InstantContiki, Wsim/Wsnet/Avrora
•…
IoTs Open-Source Development
Software Platforms (2/2): Standards
• Open InterConnect Consortium (OIC), http://openinterconnect.org/
• AllSeen Alliance, https://allseenalliance.org/
• ZigBee Alliance, http://www.zigbee.org
• IPSO Alliance, http://www.ipso-alliance.org
• IETF. 6LowApp Charter, http://trac.tools.ietf.org/area/app/trac/wiki/BarBofs/IETF75/6LowApp
• IETF. ROLL Charter, http://www.ietf.org/dyn/wg/charter/roll-charter.html
• IEEE 802.15 WPAN™ Task Group 4 (TG4), http://www.ieee802.org/15/pub/TG4.html
• IEEE 802.15 WPAN™ Task Group 1 (TG1), http://www.ieee802.org/15/pub/TG1.html
• IEEE 802.11TM WIRELESS LOCAL AREA NETWORKS, http://www.ieee802.org/11/
• HART Communication Foundation. Wireless HART Technology.
http://www.hartcomm.org/protocol/wihart/wireless_technology.html
• http://www.isa.org/isa100
• http://www.iai-tech.org
• http://www.buildingsmart.com
• Open Geospatial Consortium (OGC). CITYGML: http://www.opengeospatial.org/standards/citygml
• …
TinyOS Introduction [1/x]:
TinyOS
• Open-source operating system designed for wireless embedded
sensor networks
• Component-based architecture
• Enables rapid implementation with minimal code size
• Event-driven execution model enables fine-grained power
management, power/battery saving capabilities, etc.
• http://www.tinyos.net/
TinyOS Introduction [2/x]:
nesC
• (New) structured component-based language
• C-like syntax (extension of C-language)
• TinyOS operating system, libraries and applications are written in
nesC
• Supports the TinyOS concurrency model
• Goal: build components that can be easily composed into
concurrent
complete, systems - No Dynamic Memory (no malloc)
• http://www.tinyos.net/ - No Function Pointers
- No Heap
TinyOS Introduction [3/x]: Programming
concepts
• Application
• A TinyOS/nesC application consists of one or more
components
• Are linked/wired together via configurations to get a
run-time executable
• Component
• Basic building blocks for nesC applications
• Two types: Modules & Configurations
• Can provide and use interfaces (bidirectional in
contrast to unidirectional in common programming
languages like JAVA)
• Module
• A component that implements one or more
interface
• Contains application code...
TinyOS Introduction
[3/x]: Programming
•concepts
Configuration
• A component that wires other components
together
• Idea: build applications as set of modules,
wiring together by providing a configuration
• Interface
• Abstract definition of the interaction of two
components
• Concept is similar to JAVA interfaces
• NesC-interfaces are bidirectional
Components
A configuration is a component built
out of other components.
It wires “used” to “provided”
interfaces.
It can instantiate generic
components
It can itself provide and use
interfaces

• Basic unit of nesC code is compon en


• Configurations t
• Wire other components together Components start with a signature specifying
• Configurations compose modules • the interfaces provided by the component
into larger abstractions • the interfaces used by the component
A module is a component implemented in C
• Modules • with functions implementing commands
• Variables and executable codes and events
• and extensions to call commands,
• Implement program logic events
Interfaces
• Collections of related functions
• Define interactions between components
• Interfaces are bidirectional
• Commands
• Implemented by provider
• Called by user
• Events
• Called (signaled) by provider
• Implemented (captured) by user

In TinyOS, all long-running operations are


split-phase:
• A command starts the op: read
• An event signals op completion:
interface Timer<tag> {
readDone command void startOneShot(uint32_t period);
Errors are signalled using the error_t type, command void startPeriodic(uint32_t period);
typically event void fired();
• Commands only allow one outstanding }
request
The
Toolchain
TinyOS PC Applications

App

Native binary:
03 2F 77
9A F2 FF
...
The
Toolchain
TinyOS PC Applications

App

Native binary:
03 2F 77
9A F2 FF
...

Compile TinyOS applications


“Make”:
Compile
Applications
ncc
int main() {
scheduler_init();
...
}

gcc Native binary:


03 2F 77
9A F2 FF
...
The
Toolchain
TinyOS PC Applications

App

Native binary:
03 2F 77
9A F2 FF
...

Install applications on motes


15
The “Make”
System
TinyOS PC Applications

App

Native binary:
03 2F 77
9A F2 FF
...

make telosb install

automates nesC, C compilation,


mote installation

16
The
Toolchain
TinyOS

App

Native binary:
03 2F 77
9A F2 FF
...

PC Applications

Build PC applications
Architectures
• AVR • MSP430
• mica2, mica2dot – telosb, sky
• micaz – shimmer
• btnode – eyesIFX
• IRIS – tinynode
– epic

• 8051
• ARM – CC2430
• imote2 – CC1110/CC1111

19
https://github.com/tinyos/tinyos-main/tree/master/apps/Blink

Blink
Application
• README for Blink
• Author/Contact: [email protected]

• Description:

• Blink is a simple application that blinks the 3 mote LEDs. It tests


• that the boot sequence and millisecond timers are working properly.
• The three LEDs blink at 1Hz, 2Hz, and 4Hz. Because each is driven by
• an independent timer, visual inspection can determine whether there are
• bugs in the timer system that are causing drift. Note that this
• method is different than RadioCountToLeds, which fires a single timer
• at a steady rate and uses the bottom three bits of a counter to display
• on the LEDs.

You might also like