Hyperledger Fabric Based Ultra-Wideband Real-Time Localization

Sachith Harshitha Liyanagama
5 min readJun 8, 2021

An article consist of brief introduction into the fields of RTLS, UWB and blockchain along with a sample project I have created based on Hyperledger Fabric Network.

Table of Contents

  • What is UWB and RTLS
  • Blockchain and Hyperledger Fabric
  • Concept Architecture
  • Asset Architecture and Chaincode
  • Sample Hyperledger Fabric Java Project
  • Complete Project

What is UWB and RTLS

Given the recent upcoming of Apple AirTag, the Ultra-Wideband technology is getting attention which was somewhat lacking before even though similar devices with similar functionality existed since early 2014. There are various use cases with the technology. Due to its ability to identify static object’s location up to 10 cm accuracy*, Real-Time Location Tracking has become one of the most common use cases of this technology. Currently, the UWB sensor market is dominated by a few globally established players such as Decawave (Ireland), NXP Semiconductors (Netherlands), and Apple (US).

Even though there are much more feasible systems such as GPS available for real-time location tracking, there is a bottleneck within the domain of indoor localization. Especially given the fact that indoor infrastructure insulating the outside signals, warehouses owned by Amazon, require much more accurate systems to track their products within the warehouse especially with increasing demand for Automated Guided Vehicles (AGVs).

Fig 1: UWB Communication Structure Based on Decavawe DWM1001 Module

Therefore, within recent years the indoor localization-based UWB technology is being developed by many vendors such as Siemens AG (Germany), Sewio Networks, s.r.o.(Czech Republic) and Decawave (Ireland).

*Depends on the module used

Blockchain and Hyperledger Fabric

“A Distributed Ledger”, would be the simplest way to explain what really a blockchain is.

According to Wikipedia, “A blockchain is a growing list of records, called blocks, that are linked using cryptography. Each block contains a cryptographic hash of the previous block, a timestamp, and transaction data (generally represented as a Merkle tree).” By design or the architecture of its own, data on the blockchain is immutable. This means each block is an object whose state cannot be modified after it is created.

To use as a distributed ledger, a blockchain is typically managed by a peer-to-peer network collectively working together according to a protocol for internal communication and block validation. This transparency and the safety features brought the attention of various industries to Blockchain Technology.

Multiple organizations are working to standardize the blockchain platforms and the encouragement imposed by the open-source licensing to innovate through collaboration brought most of them to the state where they are right now. Hyperledger project is one of those which is governed by Linux Foundation and similarly backed by technology giants such as IBM. Hyperledger Fabric is a sub-project of Hyperledger Project with a modular blockchain framework and de facto standard for enterprise blockchain platforms. Given the fact that it is supported by the IBM blockchain platform, not only there are multiple enterprise-grade solutions, but also there is a wide range of plug-and-play components for the ease-of-development.

Fig 2: Hyperledger Family (Source: https://www.hyperledger.org/use)

The main characteristics of the Hyperledger Fabric can be summarized as below.

· Private: Most of the blockchains consist of a public architecture where this can be not suitable for an enterprise-grade solution when it comes to data security. Therefore, Hyperledger follows an architecture consisting of private networks and the possibility of creating multiple networks for different organizations.

· Permissioned: Given above that this is a Private network the main benefit comes with the permission architecture. This means anyone who would like to access network(s) require permission to be given by each network's certificate authority.

· Confidential: With the above characteristics, each transaction inside the blockchain is confidential. Only those who are permitted access are allowed to see the content.

· Ease-of-Development: The development of this blockchain application is somewhat the easiest out of all. There are multiple plugins available for platforms such as the Visual Code IDE, where a user could run up a testing environment with few clicks in the Graphical User Interface.

· Ease-of-Maintenance: Given its modular architecture and continuous development, maintenance of a network could not have been easier.

Concept Architecture

Conceptual Architecture developed based on the current state-of-are in RTLS platforms ©Sachith Liyanagama
Fig 4: Conceptual Architecture based on the current state-of-are in RTLS platforms

The system consists of 4 main components as shown in the above graphical representation. The Content of each component would be as below.

Table 1: Table of System Architecture Components

Asset Architecture and Chaincode

Unlike general blockchain networks focused on currency, Hyperledger Fabric allows you to define an Asset that will be the mode of a transaction within the whole network. This could be as an example an Ownership Certificate of a house, A component, or even any item without monetary value. Since the position of the Tag could be a property of the tag itself, In this simple task we will be focusing on our UWB Tags as the asset.

Fig 5: Tag Properties

Based on the above specification, we could derive the below UML Class Diagram to plan our programming.

UML Class Diagram for the Tag Asset and its Smart Contract

Sample Hyperledger Fabric Java Project

I have created a simple project based on Java which can be cloned via below path.

Github: https://github.com/SachiHarshitha/HyperledgerFab_Java_Example

In the above sample project, I have created a simple asset structure in the Hyperledger Fabric and also developed a basic REST API based on the Openliberty platform.

Have a look at it and try to update the above Smart Contract and its REST API functions.

Complete Project

The complete functionality is still under development, but the source codes can be found via below links.

ChainCode : https://github.com/SachiHarshitha/HyperledgerFabric-UWB-ChainCode

Rest API: https://github.com/SachiHarshitha/HyperledgerFabric-UWB-RESTAPI

Thank you for reading and stay safe!

--

--

Sachith Harshitha Liyanagama

My enthusiasm for programming keeps me awake sometimes. But at the end of the day the knowledge I gained never make me regret.