Qt for Internet of Things

By | July 22, 2020

The Qt framework has been used since 1995 for development under X11/Linux platforms. Within five years this framework started to be applied to embedded development projects. Over the next 5 years, Qt was transformed into a tool for cross-platform development. Today the Qt framework is well known as a universal framework for multi-platform and complete multi-segments development. But it seems Qt’s past background now may remain a key factor in domination over other frameworks for multi-platform development. It is very important which development tool catches the Internet of Things (IoT) market. It is well known that the IoT segment in recent years has grown consistently and fast. And for sure, the Qt company understands this and has created excellent tools that meet the needs of this still-emerging industry.

In October 2016 the Qt Company introduced the Qt Lite Project—created for software development with simple hardware configurations. Qt Lite can be applied in dashboard screens for connected cars, smart medical devices, home entertainment systems, devices with or without screens, mobile gadgets, etc., where the need is a simple solution that requires only a minimum footprint.

Why Qt is good for IoT

Qt for Internet of
         Things

Lite applications

Small size and simplicity are the most important things in the Internet of Things world. Applications should be as small as possible and consume almost no RAM. There are some really good examples of the commercial application of Qt in IoT projects (like those that PulseOn or guh GmbH companies have done for example). The Qt Company has taken a course to optimize its applications for IoT requirements. The first thing is Qt Lite Project as we have already mentioned. The second, they declared it is easy to develop applications that run on devices with RAM and Flash in the 32MB or even 16 MB range. The main usage of this is still expected to be the Cortex-A based architecture or similar, but we are also aiming at the ARM Cortex M7, as one example. The third is refusing from OpenGL to use Qt Quick. It is important for the creation of user interfaces on devices like smartwatches.

C++

C++

The inclusion of C++ is a huge Qt advantage comparing to some other cross-platform frameworks. Memory consciousness is something that C++ handles very well. But converting between formats is needed to send and receive MQTT, JSON, or raw binary data to and from sensors in the most battery-sipping way possible. This is something not all framework options can do. Qt, however, has the libraries and the raw speed to handle this simply.

Sensors

The Qt Sensor API provides access to near 19 sensor types. It’s about accelerometer, humidity, pressure, gyroscope, and other classes. One fun example is given by Qt support: The Fall Detector example uses the accelerometer in a mobile device to detect if the user has fallen, then uses the Location API to get the user's location. The Contacts API accesses an email address, and the Messaging API uses it to send an email notification. Currently, the API is supported on Android, iOS, SailFish, and WinRT. Applications can access Qt Sensors using either QML or C++.

Positioning and location

The Qt Positioning API gives the ability to determine a position by using a variety of possible sources such as satellite, wifi, and mapping data. Satellite information can be retrieved and area-based monitoring is accessible for an application. The Qt Location API helps to create viable mapping solutions using the data available from some of the popular location services. Positioning and location APIs enable an application to access map data, make queries for a specific geographical location and route, and search for places.

M2M

Qt contains MQTT. It is a machine-to-machine (M2M) protocol utilizing the publish-and-subscribe paradigm. Its purpose is to provide a channel with minimal communication overhead. The Qt MQTT module enables applications to act as telemetry displays and allows devices to publish telemetry data.

Network communication

Network communication

Qt has many networking and connectivity classes that make it easy to use existing socket communication over new wireless technologies. The Qt Network provides an abstraction layer over the operations used, showing only high-level classes and functions. Qt Network can also handle lower-level protocols like TCP and UDP. Network communication is represented with a focus on HTTP, TCP, and UDP.

Cloud and Web Services

Qt includes a special SDK that simplifies access to API of the most famous cloud resources (AWS, Microsoft Azure) and Web Services (Facebook, Twitter, DropBox, LinkedIn, etc.). It is easy to work with cloud computing resources and Web Services even from an extremely small application.

Data visualization

The ability to visualize big data is an important feature for analytics. They need to see and interpret the data sets being generated. Qt provides the Data visualization module that supports 2D and 3D charts with a huge number of ways to manage and view data sets.

Single codebase

Single codebase

As Qt id cross-platform framework it is possible to share firmware and software between different embedded devices and the apps. Qt provides a good environment to design, build, and test a single data-parsing module, configuration management library, or protocol that can be shared among all the devices and apps.

Why Qt is bad for IoT

Well… We cannot write here any clear cons. All we’ve heard on the con side are more prejudices than facts. “It is said even small Qt application for DFU has 15-20Mb”… “Qt is good for desktop but definitely bad for small devices with limited abilities” . Here we should mention a case when the size of a Qt application was reduced from 500Mb to 24Mb, and the boot time was reduced from 22.8 to 1.56 seconds. And as stated at the beginning of this article Qt was designed for and used primarily for embedded development. The PulseOn company has developed wearable sensor platforms using Qt for the medical and sports fitness industry… But let’s stop here because we back to benefits again.

That is why we think Qt will continue to be widely deployed in the IoT segment. As it already has been for many other branches of software development.

Ulstein ship automation system is built on Qt
Ulstein ship automation system is built on Qt (image)

Ship Automation System

One good example is the X-CONNECT platform released by Ulstein company. This is a universal digital platform for marine automation, control, and monitoring of all parts of a vessel. The platform allows the shipping industry to minimize the human factor while managing any marine system with improved control. This platform is built by using Qt Creator, QML, and other Qt's libraries. Qt brought ease of use for configuring the system (drag-n-drop for example) for different types of vessels and also added many visual features. Both the visual and control sides were developed by using Qt. Data is retrieved from numerous sensors (like engine, power, data logs, internal diagnostics, and others) and syncs with storage in the cloud. Numerous sensors and aggregating services create a complex self-sufficient ecosystem.

Wearable Devices

The PulseOn company has developed a wearable sensor for the medical and sports fitness industries. The PulseOn UI is developed with applying of Qt 5.2. For the development, both Qt Bluetooth LE and QtQuick control modules were applied.

The PulseOn company used Qt because:

  • Ability to adapt a new platform quickly (from Android to iOS)
  • All applications are developed by the same team; there is no separation between embedded developers and application developers.
  • Easy plug third party solutions
  • Easy UI development using QML.

To be honest, this news is not too fresh (2015 year). Now the design of the pulsometer is updated frequently. And it seems nobody mentioned whether these devices new are continuing to use Qt or no.

Cloud Platform for IoT Ecosystem

The guh GmbH company is developing the Nymea project. This platform is like a framework for different IoT projects. The Nymea suggests cloud computing and storage resources, and different UI and UX templates adapted for mobile devices. Here, Qt is used as middleware that helps to unify data aggregation from very different sources such as sensors, operation systems, and mobile devices. Nymea’s middleware offers interfaces via sockets (TCP/IP or local sockets), WebSockets, REST, and Bluetooth RFCOMM. All of those are simply at hand with Qt, using SSL encryption, providing certificates for secure communication.

One more important feature of Nymea is a built-in documentation tool called QDoc. For Nymea as a platform that enables third-party developers to add their hardware/service, such documentation is obviously essential.

 Cloud Platform for IoT Ecosystem

Signage Platform

The Gimasi company developed the Dilitio signage platform. This solution includes a cloud-hosted content management platform, data analysis, and custom application integration. A key feature of Dilitio is the ability to turn any billboard into an interactive multimedia platform. Such billboards can be used in schools, retail stores can be integrated with e-beacons for a digital in-store experience. Also, it is possible to order food in a restaurant from digital menus integrated with a smartphone.

The key reasons why Gimasi decided to build their signage technology with Qt were the flexibility and multi-platform capabilities. Qt allows you to port the same code base to several platforms.

“Qt's cross-platform capabilities were key to our success. They put our solutions one step ahead of the rest and allow us to quickly adapt to the ever-changing software and hardware requirements of digital signage”.

Massimo Santoli, CTO, Gimasi

For the modern market, it is important to be able to quickly adapt software for frequently changing hardware requirements.

 Signage Platform

Cloud-based Collaborative Workspace

Our last example is Bluescape. It is a platform for creating a virtual workspace for teams. The main feature of the Bluescape is the ability to unify content from different devices and display it on a one shared space (for instance, a large screen). Actually, the Bluescape platform is not a clear representative of IoT because the clients of such a system are mostly common mobile devices (tablets, smartphones). Nevertheless, this product is developed with the aggregation and visualization data from numerous different devices in mind and is a good example of how to combine data different devices on one UI.

In this article, we’ve considered the abilities of the Qt framework for its application in the IoT segment. We are of the opinion that this cross-platform framework has a very high chance of remaining one of the most popular development software frameworks for small devices. The reason is Qt’s strong functionality for embedded development and because Qt is taking a course towards minimization (the Qt Light project announced in October 2016). Nevertheless, there is an opinion out there that Qt cannot pretend to take on such a dominant position because of heavy applications in practice making it impractical to use Qt in real small devices. Perhaps, that is one reason why the popularity of the Qt framework for Internet of things branch isn’t proven to all just yet. This article consolidates several examples of companies using Qt to create successful applications for IoT projects to support our opinion.

Leave a Reply

Your email address will not be published. Required fields are marked *