Thingsquare Mist

Connect Everything to the Internet

Thingsquare Mist brings resilient wireless mesh networking and true Internet-connectivity to the Internet of Things. The Thingsquare Mist open source firmware is exceptionally lightweight, battle-proven, and works with multiple microcontrollers with a range of radios.

Uses | Experience | Benefits | Technology

How Thingsquare Mist works | Comparison | Hardware Platforms | Get Thingsquare Mist

Scroll down to keep reading

The Mesh

The Thingsquare Mist devices have low-power radios and automatically form a mesh network. To increase reliability and range without sacrificing battery life, the Thingsquare Mist sleepy mesh technology allows devices to relay messages from others while sleeping between each message to save precious battery power. Thingsquare Mist mesh networks use the Internet Protocol version 6 (IPv6).

The Router

One of the mesh nodes have an Internet connection, either via Ethernet or WiFi. This node is called the router. The other nodes reach the Internet through the router. The Thingsquare Mist router software is exceptionally lightweight: only 5 kilobytes of ROM and 1 kilobyte of RAM is needed. The router runs on tiny, low-cost microcontrollers and systems-on-a-chip: no need for a computer gateway or a bulky Linux board.

The Internet

Thingsquare Mist networks are connected to the Internet without the hassle of manual configuration. When the Thingsquare Mist router connects to the Internet, it automatically obtains its configuration, allowing the Thingsquare Mist devices to reach the Internet.

The Thingsquare Mist router contains a firewall with a simple policy: the Thingsquare Mist network can reach the Internet, but the Internet cannot reach the Thingsquare Mist network.


Uses

Connected Home

By using Thingsquare Mist to Internet-enable home equipment and appliances, homeowners can use existing Internet equipment without the hassle of USB dongles or costly home router replacements.

In large buildings such as offices or hotels, the Thingsquare Mist mesh technology allows building large networks without having to extend the WiFi network.

Smart Lighting

With Thingsquare Mist, smart lighting systems for buildings, homes, and cities can be connected to smartphone apps. The low-power features in Thingsquare Mist allows saving energy to comply with legal requirements for standby power consumption.

Connected Cities

Modern cities need smart street lights that light up just before cars pass at night and smart parking apps that know what parking spaces are occupied and how to find them. Thingsquare Mist make it possible to Internet-connect entire cities, using battery-powered wireless sensors.

And many more

The Experience

For Manufacturers

Thingsquare Mist is supported on a range of hardware platforms so manufacturers have multiple options, both systems-on-a-chip (SoCs) solutions and standalone microcontrollers with radio transceivers. Both 2.4 GHz radios, for fully internationalized products, and sub GHz radios, for increased wireless range, are supported.

For Developers

With Thingsquare Mist, developing Internet-connected applications starts with a few simple examples and onward. The Thingsquare Mist Eclipse-based development environment is a single download that includes all necessary compilers and tools. With the Thingsquare Mist simulation environment, all code can be thoroughly tested before production and deployment.

For End Users

End users never notice Thingsquare Mist. All the end users' Thingsquare Mist-based devices - and the smartphone apps that the devices communicate with - just work. In fact, the end users won't know that the Internet was involved. All that the end users ever will see are their smartphone apps.

Benefits

Open Standards

Thingsquare Mist uses open Internet standards: no proprietary specifications, no vendor lock-in.

Just Works

Thingsquare Mist networks self-heal if problems arise and deployment tools assist network deployment and debugging.

Tested

With the Thingsquare Mist simulation framework, all code can be thoroughly tested before deployment.

Radio-independent

Multiple radios supported, including both IEEE 802.15.4 and sub-GHz radios.

Battery-operated

With the Thingsquare Mist sleepy meshing technology, all devices can be battery-operated while forwarding traffic for other devices.

Low-power SoCs

Thingsquare Mist runs on numerous low-power wireless Systems-on-a-Chip platforms.

Open Source

The source code is fully available and can be modified and distributed, without restrictions.

Secure Updates

Need to fix a bug or add a feature after deployment? Thingsquare Mist firmware can be updated over the air*, with authentication.

* On selected platforms

Technology

The World's Smallest IPv6 Stack

Thingsquare Mist uses IP, the Internet Protocol, for all communication. Thingsquare Mist devices run the world's smallest fully certified Internet Protocol version 6 (IPv6) stack. The Thingquare Mist router runs both IPv6 and IPv4. The Thingsquare Mist mesh run true IPv6 routing based on the IETF RPL protocol.

Seamless Internet Access

Thanks to the Thingsquare Mist router, all Thingsquare Mist devices can reach the Internet, do DNS lookups, and reach Internet hosts. The Thingsquare Mist router runs NAT64 routing and DNS64 address translation combined with a firewall to translate between the internal IPv6 network and the Internet. Thingsquare Mist devices use either regular DNS or mDNS to do domain name lookups.

Industry Strength Encryption

Thingsquare Mist uses the symmetric block cipher Advanced Encryption Standard, AES, with 128 bits keys for encryption. The Thingsquare Mist AES is implemented in software but can optionally use AES acceleration hardware if available. Thingsquare Mist uses AES CCM for all wireless communication and an AES MIC for authentication.

Frequency Hopping

Thingsquare Mist networks automatically adapt to their wireless environment. To avoid interference from other systems, and to avoid interfering with others, Thingsquare Mist devices use frequency hopping. For sub GHz radios, frequency hopping is mandated to meet ETSI and FCC regulations.

Over-the-air Firmware Updates

Software changes, features are added, and bugs are found, even after the system has been deployed. Thingsquare Mist devices can be securely updated with new firmware when the need arises. The new firmware is encrypted and signed to ensure the authenticity of the new code.

Network Debugging Tools

Wireless communication may be unpredictable and it is difficult to know what goes on inside the network. To ease network deployment and debugging, Thingsquare Mist provides network sniffing and graphical network inspection tools.

Memory Footprint

Thingsquare Mist typically runs on hardware with 64-256 kilobytes of flash and 16-32 kilobytes of RAM. The graphs below show a breakdown for the flash and RAM footprint, measured in kilobytes, for an example device configuration and a router configuration. The device configuration runs a WebSocket client that talks to a cloud-hosted server. The router runs the seamless router software and firewall in addition to the full Thingsquare Mist stack. The code was compiled with gcc for two popular embedded microcontrollers, one 16-bit and one 32-bit.

Device

Router

Standards

Thingsquare Mist uses open IEEE and IETF standards. Thingsquare Mist is compliant with a number of IETF RFCs, but due to the constrained nature of Thingsquare Mist devices, some features have not been included. The list of RFCs is: RFC 768 (UDP), RFC 791 (IPv4), RFC 792 (ICMPv4), RFC 793 (TCP), RFC 862 (ARP), RFC 894 (IPv4 over Ethernet), RFC 1035 (DNS), RFC 1055 (SLIP), RFC 1071 (IP checksum), RFC 1122 (IP host requirements), RFC 1945 (HTTP/1.0), RFC 2131 (DHCP), RFC 2460 (IPv6), RFC 3484 (IPv6 address selection), RFC 3513 (IPv6 addressing architecture), RFC 3962 (AES), RFC 4291 (IPv6 addressing), RFC 4294 (IPv6 node requirements), RFC 4443 (ICMPv6), RFC 4861 (IPv6 neighbor discovery), RFC 4862 (IPv6 auto configuration), RFC 4944 (IPv6 over 802.15.4), RFC 6052 (IPv4/IPv6 translation), RFC 6146 (NAT64), RFC 6147 (DNS64), RFC 6206 (Trickle), RFC 6455 (WebSockets), RFC 6550 (RPL), RFC 6551 (RPL metrics), RFC 6552 (RPL of0).


Terminology

IPv4

The Internet Protocol version 4 is the Internet Protocol used on the global Internet. With its seamless router, Thingsquare Mist devices connect to IPv4 networks, such as Wifi and Ethernet networks.

IPv6

The Internet Protocol version 6 is the network protocol used in Thingsquare Mist networks. With its huge address space, IPv6 can address any Thingsquare Mist devices it needs.

RPL

The Routing Protocol for Lossy networks, RPL, is the IETF standard routing protocol for low-power IPv6 networks. Thingsquare Mist uses RPL to automatically build wireless mesh networks.

6lowpan

6lowpan is the name of a header compression and adaptation format for the transmission of IPv6 packets over IEEE 802.15.4 radios. Thingsquare Mist uses 6lowpan compression to reduce packet header overhead.

2.4 GHz IEEE 802.15.4, sub GHz

2.4 GHz radios are globally license-free but share the spectrum with many other wireless technologies. Sub GHz radios have longer range but have different frequencies in different continents. Thingsquare Mist works with both 2.4 GHz IEEE 802.15.4 and sub GHz radios.

Contiki

All Thingsquare Mist devices run the open source Contiki operating system, drawing from the expertise in the Contiki community and its growing ecosystem while contributing back to the community.

Websockets

Websockets provide a way to keep HTTP connections open, through firewalls and proxies, with a very low overhead. Thingsquare Mist devices use Websockets to communicate with cloud services.

AES

The Advanced Encryption Standard, AES, is the industry standard encryption used for all wireless communication in Thingsquare Mist. It provides a strong guarantee against eavesdropping while being efficient enough for the low-power microprocessors used by Thingsquare Mist.

How it Works

Thingsquare Mist builds a resilient wireless mesh network where one router provides seamless Internet access for all mesh nodes. All based on open Internet standards.


Wireless Mesh Formation

Every Thingsquare Mist device has a low-power radio that allows them to communicate with each other and the Thingsquare Mist router. The Thingsquare Mist router has both a low-power radio and an Internet connection, typically Ethernet or WiFi. The Thingsquare Mist router is responsible for the formation of the Thingsquare Mist mesh network.

When a Thingsquare Mist device boots up, it starts to send RPL DIS messages announcing that it would like to connect to a nearby Thingsquare Mist network. Since the messages are encrypted, only the devices that belong together can hear the messages.

  • Thingsquare Mist uses the IETF RPL IPv6 mesh routing protocol - pronounced "ripple".
  • Devices relay messages for each other to extend range and increase reliability.
  • RPL mesh networks are energy-efficient and adapt to changing radio conditions.
  • The mesh network is self-forming and self-healing.

The Thingsquare Mist router is the root of the RPL network. All other devices have routes to the root device as well as routes to all its children in the routing graph. The root begins to form the RPL network by sending out RPL DIO messages to its neighbor devices.

Devices that hear the DIO messages from the root attach to a RPL network and begin sending their own RPL DIO messages. The DIO messages contain a routing metric that holds information about how far away from the root a device is. Devices closer to the root have lower metrics. Devices use the routing metric when determining how to send packets in the network: routes with lower routing metrics are preferred.

After a few minutes, all devices have exchanged DIOs and the network has stabilized. The devices will keep sending DIO messages, but increasingly seldom. To avoid overloading the network, the devices will also refrain from sending DIOs if they have already heard DIOs from others, within their send interval.

The Thingsquare Mist devices have multiple ways to reach the root of the network. To choose which way to take, the devices continuously measure the quality of the paths and use the one that needs fewer transmissions to reach the root. If a path goes bad, more retransmissions are needed, and the device will switch to a better path.

To setup routes in the downward direction, from the root to the devices in the network, the devices exchange RPL DAO messages. The root device knows the route to all other devices, and the other devices know the route to all devices below them in the routing graph. Packets going between devices in the network are routed through common ancestors.

Seamless Internet Access

Thingsquare Mist's seamless Internet access allows low-power Thingsquare Mist devices communicate directly with Internet services, just like being directly connected to the Internet. The Thingsquare Mist router translates the low-power IPv6 mesh traffic from within the Thingsquare Mist network to IPv4 that can be routed onto the Internet.

  • Thingsquare Mist mesh devices reach the Internet through the router.
  • The router is transparent: devices do not know it is there. All they see is the Internet.
  • The router firewall policy is simple: allow traffic out but no traffic in.

After the Thingsquare Mist mesh network is formed, the Thingsquare Mist router distributes DNS information to the Thingsquare Mist devices. When a Thingsquare Mist device wants to reach an Internet server, it sends a DNS request to the DNS server provided by the router. The request is sent through the mesh network and routed onto the Internet.

The DNS server responds with the IPv4 address of the server that the DNS name points to. The router intercepts the DNS response and rewrites the IPv4 address in the response to an IPv6 address with a special prefix that corresponds to the IPv4 address of the Internet server.

The Thingsquare Mist device can now communicate with the Internet server by using the IPv6 address in the DNS response. The router translates the IPv6 address to the real IPv4 address of the Internet server. Packets going back to the Thingsquare Mist device are also translated. The Thingsquare Mist device is now connected to the Internet server, via the Thingsquare Mist low-power mesh network.


A Sleepy Mesh

Radio communication drains batteries. Not only do radio transmissions draw battery, idle listening for transmissions from others consume much more energy. To save battery, devices must completely shut off their radios, but must have them turned on often enough to be able to receive and relay messages from others.

  • Sleepy meshing allows all mesh devices to be battery-operated - even traffic relays.
  • Relaying increases reliability and range.

Thingsquare Mist devices periodically wake up, 2-16 times per second, to quickly check if there is any activity over the radio. If a signal is detected, they keep the radio on for a longer while to see if there is a message being transmitted. When the message is received, the receiver sends an acknowledgment message. To send a message, the sender repeatedly sends its message until it hears the acknowledgment. This allows devices to keep their radio off more than 99% of the time, thereby increasing lifetime from days to years.


Developing for Thingsquare Mist


Software Development

Software for Thingsquare Mist is developed in the C programming language and is compiled with either gcc or IAR. Developers may use the open source Instant Contiki development environment: a single-file download that makes compiler and tool chain installation simple.

The code below shows how to connect to a cloud service with a websocket from a Thingsquare Mist device.

  • Thingsquare Mist applications are written in C.
  • Thingsquare Mist code can be compiled with either gcc or IAR (for selected platforms).
  • The Thingsquare Mist libraries are designed to make development simple and easy.

Simulation

Writing software for networked devices is difficult. To make development and debugging easier, Thingsquare Mist provides a visual simulation environment in which networks of Thingsquare Mist devices can be simulated. The simulator emulates the hardware of each device, providing a detailed view of the behavior of the Thingsquare Mist-based system before deploying on actual hardware.

  • For rapid development, Thingsquare Mist systems can be simulated.
  • The simulator simulates networks of Thingsquare Mist devices.
  • The simulator emulates the hardware level, including the radio and microcontroller.

Comparison

Thingsquare
Mist
WiFi Bluetooth
Low Energy
ZigBee
Immediate Internet connectivity
Open source, open IPv6/IPv4 standards
Battery operated mesh
Sub-GHz radios: indoor, outdoor
2.4 GHz radios: indoor
System-on-a-Chip
Low-power, low-cost microcontrollers
Network simulation with MCU emulation

Hardware Platforms

Thingsquare Mist runs on a number of low-power wireless Systems-on-a-Chip (SoCs) as well as standalone microcontroller and low-power wireless transceiver combos. Both 2.4 GHz and sub-GHz radios are supported.



2.4 GHz SoC Platforms

Platform Microcontroller Architecture Radio
mist-cc2538dk TI CC2538 ARM Cortex M3 SoC
red-io Freescale MC13224v ARM7 SoC

Sub-GHz Platforms

Platform Microcontroller Architecture Radio
stm32l-spirit1 ST STM32L ARM Cortex M3 SPIRIT1
exp1120 TI MSP430f5438 MSP430x CC1120
exp1101 TI MSP430f5438 MSP430x CC1101

Get Thingsquare Mist

Download Thingsquare Mist

Thingsquare Mist latest source code

Want to be kept in the loop?