Protocol Stack Basics
Good to know
Protocol stacks are not just a "piece" of software, but sophisticated and very special products that are relatively complex in their functionality. In order to facilitate the introduction to the topic of stacks, this knowledge page deals with some questions about functionality, areas of application, advantages of standardized stacks and other topics.
WHERE DOES STACKFORCE’S MAIN PRODUCT FIT INTO THE IOT ECOSYSTEM?
STACKFORCE is a company specializing in the development of Embedded Software for the IoT. Its main products are protocol stacks, which are used by various players in the IoT ecosystem, especially manufacturers of IoT devices. Protocol stacks from STACKFORCE help device manufacturers to implement standardized communication between different IoT end devices and components with little effort.
protocol stacks are integrated into sensors or meters as a software component for meeting requirements for communication between networked devices so that communication of devices and sensors/actuators can take place within the network. Thus, STACKFORCE's main product and related services in the IoT ecosystem are mostly of particular interest to end node manufacturers, but gateway manufacturers can also be effectively supported.
WHAT IS A PROTOCOL STACK?
In order to enable devices such as sensors or meters in an IoT network to transmit data via radio, software is required to perform this task. This software is the protocol stack. The software is called protocol stack because it consists of several protocols on different levels or layers of communication that build on each other. Figuratively speaking, the sum of the protocols then results in a stack.
Each layer within a protocol stack performs a specific function, depending on the technology-specific protocol in question, and interacts with the layer above and below it to handle data transmission between networked devices.
A protocol stack is usually programmed for a specific technology. In the IoT area, these are often LPWAN technologies such as mioty®, LoRaWAN®, Sigfox or NB-IoT. For other protocol stacks, the focus is on the application, such as the M-Bus Protocol Stack, which can certainly also integrate other sensors in the network, but was originally specified specifically for the needs of remote meter reading. Each technology has individual advantages and disadvantages, making each protocol stack very well or less well suited for certain use cases. Within our news we present the technologies in detail for further reading:
Basically, protocol stacks have one goal: meeting communication requirements (e.g., in terms of reliability, transmission frequency, transmission volume, etc.) between networked devices so that smooth communication between devices and sensors/actuators can take place to enable the automation of previously manually controlled operational processes.
WHAT IS THE MAIN TASK OF A PROTOCOL STACK?
The basic tasks of a protocol stack are to enable communication between devices in a network and to ensure reliable and efficient data transmission. The protocol stack is thus an important building block for transmitting device data, such as certain measured values from a sensor or a meter, to other devices or components within the network using various technologies such as LPWAN or M-Bus, so that the data can then be processed further.
Within this overall task, the different layers of the protocol stack have their individual tasks. Basically, there are seven layers that are standardized according to the OSI model, but not every protocol stack integrates every layer.
WHAT ARE FIELDS OF APPLICATION FOR PROTOCOL STACKS?
Protocol Stacks aim at the automation of previously manually controlled, mostly operational processes. Since automation takes place in every area, Protocol Stacks have a wide range of application and can be customized for a variety of use cases. Numerous processes can be simplified, better controlled, and speeded up, thanks to the large-scale networking of devices that communicate independently with each other.
Therefore, software-based communication can be used in any area. The application scenario determines the appropriate software. With our standard products we enable a simple and convenient introduction to equip your IoT network with connectivity.
Possible Application Scenarios
- Meter remote readout (water, gas, electricity, heat,…)
- Leakage detection and alarming
- Condition monitoring
- Predictive maintenance
- Oil-/gas field exploration and monitoring
- Machine monitoring
- Infrastructure surveillance
WHERE IS THE PROTOCOL STACK LOCATED IN A DEVICE?
The protocol stack is the software component that resides on a microcontroller within a device, invisible to the eye. Typically, the protocol stack in an IoT device (sensor, meter) is part of the firmware running on the microcontroller. The firmware is responsible for controlling the hardware components of the sensor.
Via a radio chip or a radio interface integrated in the microcontroller, the stack enables wireless transmission (e.g., using LPWAN technologies) of the read-out sensor data to an IoT network.
In order to equip a device with a radio technology, it is important to pay attention to the details depending on the application. For example, if the device application is used on the same microcontroller as the communication software, the resources of the microcontroller and its periphery must also be shared among each other. This may be a disadvantage for very time-critical sensor applications. In general, there are three ways to run the application:
- with a Communication Module
- with the One-Chip-Design
- with the Two-Chip-Design
The communication module takes over the communication with the network of the chosen Technologie. So it is possible to equip an existing sensor circuit with a radio interface without major modifications if there is sufficient space available in the enclosure.
The communication module is then connected to the sensor circuit via various interfaces, such as UART or SPI. If the communication module is selected, there are three options:
- use of a pre-programmed radio module,
- using the Protocol Stack as firmware in the modem version and
- using the Protocol Stack as a software library and developing custom firmware for the radio module.
The main advantage of this approach is the low development effort and the low risk of surprises when the device is certified.
An alternative to the communication module is the integration of a dedicated microcontroller together with a radio transceiver IC or a system-on-chip, which is used specifically for communication.
In terms of architecture, the two-chip approach is the same as the communication module, but this variant is more space- and cost-saving. On the software side, the two-chip approach is equally simple compared to using one communication module. However, the effort regarding the circuit is somewhat higher since a corresponding circuit board must be developed and thus the effort for product certification also increases.
The most integrated approach is the use of a technologie compliant circuit on which the sensor application can be run. This variant requires only one module for the application and the communication software. A software library will be integrated into the own sensor firmware.
With this library, the developer uses a complete implementation of the transmission protocol and
controls the wireless transceiver IC or the wireless transceiver on the radio part of a system-on-chip.
The advantage of this approach are obviously the savings in hardware costs as well as in the minimal space requirement of the various options. However, the one-off costs for the development of this approach are significantly higher as a separate and often product-specific hardware design has to be developed.
CAN A PROTOCOL STACK BE USED ON ANY HARDWARE?
In principle, a protocol stack is hardware-independent as long as the hardware meets the minimum requirements of the protocol stack respectively the radio technology used. This means that if, for example, the stack requires certain functions or features that are not supported by the hardware, additional hardware components may need to be added or hardware design changes made to ensure that the stack works properly.
Another important factor is the performance of the hardware. A protocol stack typically requires a certain amount of processing power and memory. If the IoT device's hardware does not have sufficient processing power or memory, this may result in not supporting all of the stack's functions, for example.
Our Standard Protocol Stacks are available for multiple hardware platforms, consisting of either a microcontroller (MCU) in conjunction with a single chip radio resp. transceiver (TRX), or a system-on-chip (SoC) silicon. For our reference hardware, the Protocol Stacks has been tested and optimized. In general, any other hardware is possible to use. However, there is an additional effort to ensure the compatibility of the Protocol Stacks with the selected hardware. Therefore, STACKFORCE offers additional platforms. Depending on the radio technology, bidirectional as well as unidirectional communication is possible, but not all radio modules currently available on the market support both communication variants. Please note that not every microcontroller or radio transceiver is compatible with every Protocol Stack we offer. Contact us for all possible hardware!
WHO CAN USE A PROTOCOL STACK?
A protocol stack can be used by anyone who wants to enable communication on a network. In the IoT space, different players can use a protocol stack. These include:
- IoT device manufacturers can integrate a protocol stack into their devices to enable standardized communication between the devices and other system components. The protocol stack is typically implemented as part of the IoT device's firmware.
- System integrators can use a protocol stack to interconnect and integrate different IoT systems and devices. The protocol stack helps ensure consistent communication between different components.
- IoT application developers can use existing protocol stacks to enable standardized communication between their applications and IoT devices. The protocol stack can be adapted by the developer to his own requirements.
WHAT TECHNOLOGIES ARE USED TO SUPPORT PROTOCOL STACKS FOR DEVICE COMMUNICATION?
A wide range of technologies can be used to enable devices to communicate in the IoT domain. At STACKFORCE, we mainly focus on the M-Bus protocol as well as LPWAN technologies, which are characterized by communication over longer distances with very low energy consumption to achieve the longest possible deployment time:
- mioty® is a LPWAN technology specifically designed for use in "massive" IoT networks. The technology is highly resistant to interference due to the telegram splitting technology, which results in high reliability in data transmission. mioty® is widely used in applications that require high reliability and long battery runtimes, such as industrial automation, Smart Cities and Building Automation.
- LoRaWAN® (Long Range Wide Area Network) is an LPWAN technology that enables long-distance, low-power wireless communication. Due to the simplicity of the protocol and good penetration, LoRaWAN® can be used by anyone for their own network. LoRaWAN® is widely used in applications such as smart cities, industrial automation, and environmental monitoring.
- Sigfox is an LPWAN technology that enables wireless communication over long distances with very low power. Sigfox develops and operates the entire network, which is available almost worldwide, so anyone can link their end devices to the network for a fee. Sigfox is widely used in applications such as Asset Tracking and Environmental Monitoring
- Narrowband IoT (NB-IoT) is an LPWAN technology built on existing cellular networks and is an extension of the LTE standard. It provides wide network coverage and data transmission with greater bandwidth than other LPWAN technologies. NB-IoT is widely used in applications such as Smart Metering, Smart Farming and Security Monitoring.
- M-Bus (Meter-Bus) is a communication protocol specifically designed for meter data collection and transmission. It was introduced in Europe as a standard for communication between meters and data acquisition devices and is now used in various applications worldwide. In addition to the serial transmission of data via the supply lines, M-Bus also supports the wireless variant via Wireless M-Bus and is able to support several meters or sensors in one network.
WHAT ARE THE ADVANTAGES OF STANDARDIZED PROTOCOL STACKS?
Standardized protocol stacks in the IoT area offer numerous advantages that are of great importance in the development and implementation of IoT applications. In the following, we will discuss the three most important advantages from our point of view:
As a first point, we would like to mention interoperability. Standardized protocols ensure that different IoT devices and systems can communicate with each other, regardless of manufacturer or implementation. This is important in complex environments where a large number of devices and sensors need to interact with each other, such as in Industry 4.0 scenarios. Therefore, this point is of particular interest to users.
For device manufacturers, interoperability initially appears to be more of a risk, as they can no longer differentiate themselves from competitors with connectivity. At the same time, however, it is also an opportunity, because customers who have already decided in favor of a competitor in a first round can be reached on this basis. It would be far more difficult to capture a customer who would have to replace an existing, complete network in one fell swoop if devices and systems could not communicate across the board.
Scalability also plays an important role in numerous IoT use cases. By using standardized protocols, applications can easily be extended to a larger number of devices and sensors without causing compatibility issues. Thus, networks can be easily adapted to changing requirements. This is particularly advantageous in areas such as Smart Cities, where the infrastructure is constantly changing.
When it comes to sensitive data containing personal information or financial data, security is also an important factor. Standardized protocols provide a high level of security by using state-of-the-art encryption technologies and authentication methods.
CAN MULTIPLE TECHNOLOGIES BE USED IN A STACK IF THE USE CASE REQUIRES IT?
Yes, it is possible to combine multiple technologies in a protocol stack to take advantage of different technologies and better meet the needs of specific applications. With our multi-stacks, this is even recommended, because except for a little more memory that the stack requires on the hardware, using a multi-stack offers only advantages:
- Flexibility: a multi-stack makes it possible to use different wireless technologies in one device to meet different requirements such as range, bandwidth and energy efficiency. So, depending on the application, different technologies and combinations of technologies can be used.
- Interoperability: by using multiple technologies, a multi-stack can communicate with different networks and devices, making it easier to integrate devices and increasing market opportunities.
- Redundancy: A multi-stack can increase the availability and reliability of wireless connections by using redundant technologies. If one wireless technology fails, another technology can be used in the stack to maintain connectivity.
- Future-proofing: By using multiple technologies, a multi-stack is better able to adapt to future developments and changes in wireless communications and can therefore be deployed for the longer term.
WHAT DOES A PROTOCOL STACK PACKAGE CONSIST OF?
The Protocol Stack Package is delivered with a pre-compiled stack library, hardware-specific drivers, a serial command interface, a power management and two apps:
While Exmaple includes a suggestion of creating your own firmware, which shows how to integrate the stack library into your own application software, the app Modem allows you to create your own modem firmware using the supplied serial interface (e. g. UART, SPI, I2C, …) and power management. Therefore, it is possible to implement both chip architectures with the supplied Protocol Stack Package:
- To use the Protocol Stack within a One-Chip-Design (the Protocol Stack runs on the same microcontroller as the application), the app Example is required, and thus only the stack library.
- If you follow a Two-Chip-Design (the Protocol Stack is to run on a communication controller and the application is to run on a host controller), the app Modem can be accessed. This makes it possible to create your own firmware for the communication controller using the supplied serial interface and the power management. The Protocol Stack is then accessed via the host controller.