Cell towers EMF certification process with Web3 Foundation

2024-06-14

With the support of the Web3 Foundation, Staex completed a groundbreaking project focused on the automated certification of cell towers' compliance with electromagnetic field (EMF) radiation regulations.

The rapid expansion of 4G and 5G networks has raised concerns about their potential health impacts, prompting European policymakers to implement strict EMF radiation limits for wireless antennas. Ensuring compliance, especially with multiple antennas on a single tower, has become a major responsibility for cell tower companies.

To address this, we've developed innovative software that automates the EMF compliance certification process, making it seamless and efficient for cell tower companies.

General schema
General schema

So in this article we explain how it works. You can check more technical details in our GitHub repository.

IoT integration

First task which we need to solve is to be able to receive measurement data from EMF sensors. To accomplish this we have developed a low-level RPC server based on TCP protocol and JSON format. TCP and JSON were chosen because this protocol and serialization format is very common and can be used in any programming language with already existing libraries. So people who developed firmware can easily send measurement data to our software.

When our software receives measurements, it saves it to the IoT device disk. From time to time, usually every 24h, it accumulates saved data and calculates the average value to save it on-chain later. As we need to store simple measurements (unsigned integer 128 bit) without huge amounts of them, we decided to save it simply to the ordinary system file.

In addition to the usual measurements software can receive measurement spikes. Spike is a measurement whose value is more than allowed. We save it on-chain immediately because such spikes can influence people's health and the certification process should know about such data.

Using this flow you can check for details

And by this link you can check how agent (measurement module) works

Save data on-chain

We save all accumulated measurements on-chain using a smart contract which can be deployed to any Substrate-based blockchain network and it is written in ink! programming language. This helps us to achieve data integrity and automate the certification process to make it work in an honest and transparent way.

The best way to integrate our software (which is completely written in Rust) with Substrate-based network is subxt library. It provides an RPC client and other primitives to interact with any Substrate-based network and their smart contracts.

So once per 24h software accumulates all measurements which are saved to the disk and sends the average measurement to the smart contract and deletes all local data to start collecting new ones from the next measurements interval.

This is source code for interacting with Substrate node

On-chain data and smart contracts

We save measurements on-chain to make them more trustworthy. Also we store ordinary measurements and spikes separately to pay attention to spikes in the certification process.

In case a cell tower produces a lot of spikes, our smart contract emits a special event about it to potentially notify someone about it to reduce them immediately.

When a smart contract receives enough measurements it emits an on-chain event that the certification process is ready to start.

Cell companies listen for such events and can start the certification process by executing a smart contract method to issue new certificates. This method will check measurement values and spikes. If it finds measurements or spikes which are above maximum acceptable value, it will produce a certificate with a bad status, otherwise with "ok" status.

Smart contract source code and tests

Indexer

To provide data about cell towers, measurements and certificates to our frontend, we implemented our on-chain data indexer which is listening for on-chain events from EMF smart contract. Index simply connects to the Substrate node and scans block by block. Save all available events and their data to the SQL database to be able to request this data from frontend with particular filtering by HTTP API.

Indexer source code

User interface

To provide comfortable access to our system for ordinary people who want to check cell towers around them and for cell companies we have implemented a user interface.

So when a cell company adds a new cell tower on-chain it is required to specify location (GPS coordinates) of the cell tower. So we can put all cell towers from different cell companies on the map and add the possibility for people to find cell towers in particular places near them. By clicking on the cell tower marker the user interface will show a card with certificate details and status.

Map
Map

Source code with UI map

Testing

To be able to sleep well after any update to the measurement module or smart contract we developed fully automated integration tests.

By simply executing the starting tests command in the console, a new Substrate node starts, the smart contract is built and deployed, measurement module and indexer starts and everything is automatically connected to the Substrate node.

After that tests create a cell company with cell towers and produce some fake measurements for different use cases involving certificates and wait for on-chain events captured by the indexer.

Integration tests source code

Detailed schema

Detailed schema
Detailed schema

Conclusion

This project is a game-changer for anyone looking to reduce operational costs and enhance transparency in EMF certification. It's particularly valuable for cell tower companies managing complex compliance requirements.

By utilizing Substrate-based smart contracts we achieved an automated and transparent way of EMF certification process and made it easier for people to check their health environment.

***
Staex logo.

Staex is a secure public network for IoT devices that can not run a VPN such as smart meters, IP cameras, and EV chargers. Staex encrypts legacy protocols, reduces mobile data usage, and simplifies building networks with complex topologies through its unique multi-hop architecture. Staex is fully zero-trust meaning that no traffic is allowed unless specified by the device owner which makes it more secure than even some private networks. With this, Staex creates an additional separation layer to provide more security for IoT devices on the Internet, also protecting other Internet services from DDoS attacks that are usually executed on millions of IoT machines.

To stay up to date subscribe to our newsletter, follow us on LinkedIn and Twitter for updates and subscribe to our YouTube channel.

***

See also

  • Staex IoD.

    Staex: Data Sharing for IoT

    2024-06-17

    In this article, we want to share how we achieved Web3 IoT data infrastructure utilizing Staex and PEAQ networks.

  • Staex tunnels diagram.

    Staex latest release features tunnels as the ultimate network isolation tool

    2024-06-04

    The tunnels force network traffic to go through them. Any network packets that try to bypass tunnels are dropped. If no tunnels are defined, no network traffic is allowed.

  • Public network for IoT devices

    2024-02-23

    Staex public network is a zero trust network that is the backbone for the today'sโ€™ demand of the Internet of Things. In this article we discuss why we are creating such a network and how it can be useful to anyone dealing with IoT devices.