TinyOS: An Operating System for Wireless Sensors

Featured Img Tinyos

IoT devices are built on a variety of operating systems depending on the end-use applications.

Linux distros, such as Yocto or Android Things, are popular with smart home appliances. Windows 10 IoT core is the best fit for “server-class IoT edge devices.” And, of course, Raspbian OS is recommended for regular use on a Raspberry Pi.

Here we will discuss TinyOS, which in essential terms, is very useful for low-power sensor networks.

What Is TinyOS?

TinyOS is an open-source, BSD-based operating system which uses the nesC programming language to control and manage wireless sensor networks (WSN). The sensor devices (called motes) in such networks are characterized by low power, limited memory and very small form factor.

TinyOS was first written by Jason Hill at the University of Berkeley in 2000. It is a completely free and open-source software.

Low power sensors

Considering its end uses, TinyOS is a popular operating system for low-power sensors that control light, acceleration, temperature, pressure and acoustic objects. It is commonly used in Industry 4.0 applications.

Why Is TinyOS Useful for Wireless Sensor Networks?

Low-power sensors, due to their limitations in scope, require efficient utilization of resources. TinyOS is essentially built on a “components-based architecture” to reduce code size to around 400 to 500 bytes and an “events-based design” which eliminates the need for even a command shell.

The components-based architecture uses “nesC,” which is a C programming language designed for networking embedded systems. Each code snippet consists of simple functions placed within components and complex functions integrating all the components together.

The following example of a components-based code snippet in NesC shows an integration of various components such as timers, clocks and the sending of a message.

Nesc Code Example
A nesC code snippet consisting of a timer, a clock, a message and output in terms of a “components-based architecture”

TinyOS also uses an “events-based design” whose objective is to put the CPU to rest when there are no pending tasks. An event can be something such as the triggering of an alert when the temperature of a thermostat rises or falls above a certain value. As soon as the event is over, the sensor motes can go to sleep.

The need for a design like TinyOS is mandatory in applications such as smart transit and smart factories. Because of thousands of sensors, it is important to have a very small memory footprint to reduce power requirements.

Where Is TinyOS Being Used?

At the moment, TinyOS has over 35,000 downloads. Its main applications lie in all kinds of devices which utilize wireless sensor networks.

  • Environmental monitoring: since each TinyOS system can be embedded in a small sensor, they are useful in monitoring air pollution, forest fires, and natural disaster prevention.
  • Smart vehicles: smart vehicles are autonomous and can be understood as a network of sensors. These sensors communicate through low-power wireless area networks (LPWAN) which makes TinyOS a perfect fit.
  • Smart cities: TinyOS is a viable solution for the low-power sensor requirements of smart cities’ utilities, power grids, Internet infrastructure and other applications.
Low power sensors can be used in smart cities
  • Machine condition monitoring: machine-to-machine (M2M) applications have many sensor interfaces. It is impossible to assign a complete computing environment to each sensor. TinyOS can perform security, power management and debugging of the sensors.

Where to Learn About TinyOS

All the download information on TinyOS is accessible from its official GitHub page. Apart from BSD, it also supports Mac OS X.

The biggest source of all-inclusive information on TinyOS is available on a wiki page for Stanford University. It contains information on installing the program, extensive tutorials, and a huge index of code contributed by many others.


TinyOS is one of the examples of an operating system designed for low-power, low-cost wireless sensor networks. But it’s not the only one. Other examples of similar operating systems include Contiki, OpenWSN, FreeRTOS and RIOT.

Sayak Boral Sayak Boral

IoT-addicted since early 2016. Love to explore the challenges, opportunities and trend insights into what is becoming the third wave of Internet.

More Posts