Wirepas 5G Mesh Introduction

This document describes on a high level what is the Wirepas 5G Mesh network and how it works. The document explains how routing and communication works, what are the node types in the network, and network security. The document also covers a couple of important concepts including over-the-air updating.

What you’ll learn

  • Wirepas 5G Mesh network architecture
  • Network organization, formation, and maintenance
  • Messages direction, types, and routing methods
  • Wirepas related terminology

What you’ll need

  • You will need a cup of coffee to read through this section.

Wirepas network basics

In this section, we will present the basics of the Wirepas 5G Mesh network. If you are already familiar with the 2.4GHz profile, you are already familiar with the basic concepts.

Wirepas 5G Mesh is a wireless communication protocol. The wireless network operates without any centralized control mechanisms such as the operator in the network. Devices route traffic via multiple hops with decentralized decision making. This means that each node in the network selects its role, maintains and optimizes the connections autonomously based on its environment.

This enables very reliable, optimized, scalable, and simple connectivity between devices.

Wirepas 5G Mesh concepts explained

Network organization

Wirepas 5G Mesh network consists of nodes and gateways:

  • Nodes: The network device that can be a router node or a non-router node. In Wirepas 5G Mesh, nodes select automatically their role, namely they are in a so called Auto Role. In that mode, the nodes select autonomously if they route traffic or not.
  • Gateways: A gateway is a bridge between the Wirepas 5G Mesh network and the backend. The gateway can use one or multiple special nodes called a sink to connect to the network. A sink transmits data between the gateway and the 5G Mesh network.

 

image-20240314-212533.png

 

The network forms the topology automatically from the sink node. Each node selects individually to which sink’s routing tree they belong. The nodes try to find the best route to the sink using the best router nodes.

Because Wirepas mesh network organization relies on unique point-to-point links it results in a tree organization as described in the figure below.

Network: A network is formed by nodes that share the same network parameters (see below). The network can consist of multiple gateways and therefore multiple trees.

Tree: A tree consists of all the nodes that are attached to a sink node. A node is always connected to a single upper node in the tree at a time. In the mesh tree, there are multiple groups called clusters.

Cluster: A cluster consists of a cluster head and its direct member connections. A cluster head is a sink or a router node. A device can be a member node in one cluster and a next-hop cluster head in another. This way, an uplink message hops from one cluster to another and eventually to the final destination, which is the sink.

Network & Devices parameters

To join a Wirepas 5G Mesh network, the device must have at least the following key parameters:

Network parameters: Network parameters are network wide. Only nodes with the same network parameters can connect together.

  • Network address (24 bits): the Network identification.
  • Network discovery channel: 1 channel amongst the 11 channels to be used for network discovery and connection.
  • Security keys:

When the nodes have the same parameters, they form the network automatically without any user interaction.

Device parameters:

  • Node address (32 bits): Used to identify each device. The device ID must be unique in the network. The device ID can be generated from the chipset ID.
  • Application Area ID: Application ID is used to separate different devices' firmware such as different embedded applications, the Wirepas 5G Mesh stack or the NR+ Modem Firmware during the firmware update process. The ID is usually the same for a given device hardware/software combination.
  • Bootloader keys: Used to secure update images. They can be common to a manufacturer or to a network operator. For further details, you can refer to this link.

Application Area ID and bootloader keys are defined at the build time and they cannot be changed afterwards.

The default parameters can be given in the factory during the manufacture.

Low Latency mode

This mode is intended to achieve low latency and high throughput on the network. To achieve this, routers are listening during all their idle time allowing nodes to transmit to the next-hop immediately.

Nodes roles detailed

As seen before all the nodes are capable to automatically decide roles and optimize the network. Independently of their roles, each device can individually send and receive data.

image-20240326-220639.png

Sink role

The sink is a node on top of the network tree thus it’s the reference point from which a routing tree starts to form. Usually, the sink is connected to the gateway via a serial interface, like UART, thus it just routes the traffic between the backend and the Wirepas 5G Mesh network.

Nodes around the sink can self-manage their connection to the sink node, if set in auto-role. If a new gateway/sink is added to the network, the nearest nodes find it as the lowest cost effective path, and a new tree begins to form organically. Hence, the network balances the load automatically to maximize the throughput without any user interaction. However, for some very specific use cases, role selection can be set manually.

Auto role

The node automatically selects the role of either router or non-router node. Hence, the user does not have to take care of the selection process and the network becomes more optimized.

Router role

A router is a node that transmits data between multiple nodes as well as its own data.

A router creates a cluster and operates as the cluster head of this cluster so that other nodes can be associated with the cluster head. Other nodes which are associated with the cluster head follow the operation of this node. A sink operates always as the head of its cluster. A cluster head is responsible for:

  • Managing the cluster timing and frequency channel
  • Receiving and forwarding messages from and to the members
  • Receiving and forwarding messages from and to the next-hop router

Nodes around the router self organize themselves to allow for self network building. Hence, provided the nodes are in Auto Role mode, they decide on their own to set as routers as non-routers. This allows clustered tree to expand in an automatic manner. Further, when accepting associations a sink and a router prefer accepting and keeping associations from router nodes rather than non-router nodes. This ensures that connection to a router and especially to a sink is not blocked for a router by having only non-router nodes associated with it.

Non-Router role

A Non-Router is a device that does not route any data but is transmitting its own data to the cluster head and receiving the data (downlink unicast/broadcast) from the cluster head, that are targeted to this end node. In general, it is to be found at the end of a network tree’s branch.

Summary

The table below summarizes the different roles, associated functionality, and usage examples.

Role

Functionality

Example usage

Sink

  • Root for routing trees
  • Backhaul connection
  • Gateway (Sinks are in Low Latency mode as gateway are usually mains powered)

Router

  • Can route data and form a multi-hop data forwarding topology
  • Continuously connected to network
  • A connected light or a Smart Meter in Low Latency

Non-Router

  • Cannot route data, can act only as end node in the network
  • Continuously connected to network
  • A connected light or a Smart Meter in Low Latency

Wirepas Messages: Payload, Directions, Routing methods and Addressing

In this section, we will describe the available message types, direction, and routing methods.

Messages Payload

In Wirepas 5G Mesh the maximum size of a message (without fragmentation) is 102 bytes for the user payload. Even if messages with a lower size can be sent it is recommended to maximize the payload usage rather than sending several small messages.

Also, to allow for longer messages to be sent, and be compliant with IP payload transfer, Wirepas 5G Mesh integrates a message fragmentation and reassembly protocol. It allows the user to send and receive up 1500 bytes message application payload. For further details, you may refer to this overview and this application note (subject to Wirepas licence agreement).

Messages directions and performances

Wirepas 5G Mesh message has two directions which are defined as below

image-20240314-212747.png

  • Uplink: Message is sent from a node to the sink. The uplink direction is the most optimized direction and has the best performance. Only the sink onto which the node is attached can be addressed, this concept is called AnySink.
  • Downlink: Message is sent from the sink to the nodes.

Addressing types

Wirepas mesh supports three message addressing types as described below for downlink messages.

Unicast message is sent to a single device.

Multicast message is sent to a group of devices. Multicast uses a group address that is set to devices using Wirepas API. Multicast membership is defined in the application layer thus a device can belong to multiple multicast groups depending on the implementation.

Broadcast message is sent to all devices .

Endpoints concept

Endpoints (EP) are used to multiplex transport layer datagrams between different applications/application functionalities. To some extend they can be compared to port concept in TCP/IP communication. They are used to separate data generated by the stack from application data.

Application level EPs are 8-bit values (8-bit source and 8-bit destination EP). Application level EPs are allocated (for specific usage) as source and destination EP pairs.

When a node receives a request packet that has the correct source and destination endpoints, it processes the requests in the message and forms a response. Response message has the same endpoints that were in the request packets, except in reverse order.

Wirepas Messages performance

As we have seen before, two traffic directions (Uplink, Downlink) are possible in Wirepas 5G Mesh. The performance achieved for each traffic direction is impacted on the concurrent traffic load ongoing in the mesh network.

The table below summarizes the typical best case routing performance of a node on different roles when the traffic is only for one direction only.

 

Sink 1) 2)

Router 2)

Routing Throughput Uplink

120 Packet Per Second (pps)

20 pps

Routing Throughput Downlink

2 pps

2 pps

Per Hop Latency

milliseconds

milliseconds

1) Sink routing throughput means the mesh network level pps seen at Sink node

2) The above performance figure is for 102 bytes APDU

Quality of Service and Time to Live

Messages can have two different Quality of Service levels (QoS): high and normal priority. High priority packets are always served first and in the case of full buffers, dropped last. High priority messages also have a different Time-To-Live (TTL) parameter value (high priority 5 minutes, normal priority 10 minutes). TTL is calculated hop-by-hop, so when a router gets a packet from the previous hop, TTL calculation starts from zero. The TTL parameters can be adjusted with the software but it should be the same through the network.

Network Security

In Wirepas 5G Mesh, both the data transmission and the network signaling are secured on the link layer with AES128 encryption and OMAC1 integrity verification. Wirepas mesh uses the network-wide Message Integrity Code (MIC) and AES128 encryption key. A replay attack is prevented by adding nonce to the message. The messages are encrypted/decrypted and integrity checked hop-by-hop. End-to-end security can be implemented in the application layer, if needed. The encryption key and the MIC can be changed from the application side thus every network should have different credentials.

Software update

Wirepas 5G Mesh network nodes can be updated using Over the Air Programming (OTAP). OTAP allows a robust way to update each node in the network. In the process, the nodes spread a scratchpad file which includes one or more application images. OTAP can be used to update the firmware, namely the application, the Wirepas 5G Mesh and the NR+ Modem Firmware or three of them simultaneously. Each application image has a unique Application Area ID (AppAreaID) which is used to select the right binary from the scratchpad for the node.

 

 

The OTAP process is typically coordinated from the backend via the gateway(s). OTAP is wanted to get done as fast and as efficiently as possible. As software update is part of the data plane operation, traffic will be calculated into the overall performance and if network is under heavy load, the OTAP will take longer than in lightly loaded network.

For more details on the OTAP, you can refer to this document.

Diagnostics

Wirepas proposes a complete solution to monitor a Wirepas 5G Mesh Network, for example, to see if there are bottlenecks or congestion in a tree. When the diagnostics mode is turned on, the nodes start to send their diagnostics packets with a regular configurable interval. The diagnostics packets affect the network performance in the nodes because of the extra messaging in the network.

As part of its offer, Wirepas offers Backend Tools that provides monitoring and analysis of the Wirepas network operation. The tool provides visibility of the network’s key parameters, individual node behavior, and visualization of network topology. More information about Wirepas Network Tool can be found here.

Application data configuration

Application data configuration (app config) is a feature of Wirepas which allows the broadcasting of 80 bytes of data to all nodes in the network. App config is a kind of a shared state or persistent data under a sink. When a node joins the network, the app config is immediately and automatically transmitted to the joining device. Also, when the app config changes on the sink it’s spread to the network with the highest priority. Hence app config data is an excellent way to distribute dynamic configuration parameters to the application running on the nodes. Application configuration uses the Type-Length-Value (TLV) format. TLV format ensures that different configurations from different vendors can be used in the same network.

Revision History

Date

Version

Notes

06 May 2024

1.0.0

Initial version.

Legal Notice

Use of this document is strictly subject to Wirepas’ Terms of Use and Legal Notice.

Copyright © 2024 Wirepas Oy