1. Home
  2. /
  3. Projects
  4. /
  5. IoT Messaging Library for Electric Scooter Ecosystem
Integra Sources home button.

GET IN TOUCH

IoT Messaging Library for Electric Scooter Ecosystem

IoT Solutions Middleware development System software development Transportation

There are a number of problems that you might face living in a big city anywhere in the world. Among them are overpopulation, long traffic jams, and environmental issues. Our customer, located in Germany, tries to solve these problems to make big city life easier and more comfortable.

They manufacture electric scooters - eco-friendly, smart transport able to solve traffic problems. The company decided to integrate an IoT solution into their product to make it more functional and user-friendly.

Electric scooters in a big city

Request

The e-scooter network consists of a scooter with a rechargeable battery and a charging cabinet. The keyless e-scooters and the battery chargers are accessed and controlled by a mobile application. The scooters are equipped with a GPS tracker, which makes it possible to track their geolocation. The charging start/stop time, the scooter lock/unlock time, GPS data, distances covered, and other data are stored on a cloud database.

The major task of the customer was to connect and synchronize all the devices of this IoT ecosystem. Our team was hired to develop an IoT infrastructure consisting of a server, a client, a dashboard, and a RestAPI to provide remote access to the system from the mobile application.

The customer had certain requirements for the system's functionality, but they had no specific instructions on technology that can be used to deliver this project. Thus, our mission was to offer a viable IoT solution to ensure effective interaction between the components of the network, namely a web dashboard, a server, and a charger.

Elements of the IoT ecosystem for e-scooters highlighted in blue are implemented by Integra Sources.
E-scooter IoT ecosystem. Components highlighted in blue were implemented by the Integra team.

Solution

There are various standard protocols that provide efficient client-server communication. In our project, we used HTTP to access the web dashboard on the server.

However, this solution didn't seem to be efficient enough for the communication between the server and the charger. Some chargers may work even on a 2G network that cannot provide a high bandwidth capacity and stable management of the charging cabinet. 

We needed a solution to save traffic and ensure a stable and predictable connection with the chargers. So we decided to use a custom TCP-based protocol and develop our own library to optimize the client-server interaction between the chargers and the server device. The IoT messaging library works as a mediator between the frontend application with business logic and the data packets.

The library consists of several components. The key component of the library is Session that allows identifying the messaging client in the messaging system. Session software module provides a high-level interface for sending/receiving messages and storing data necessary for the management of the latest session. The library's users can extend the parameters of the stored data by themselves.

SessionManager, as one of the key components of the library, manages sessions, and provides an interface to create them. Transport, another component of the library, delivers a mechanism of message transporting and is responsible for the storage of the sent and received messages. Thus, users do not need to create their own mechanisms to implement this functionality.

Components of the IoT messaging library developed by Integra Sources
Library components

Scope of Work

Integra’s team provided an IoT solution for the project by introducing the key components of the network.

We developed the server that can also work as a cloud solution and the client for the charging cabinet. We built a cross-platform application for the server's interaction with the charger's hardware via CAN and UART interfaces with custom protocols.

Our team developed a simple UI to manage IoT devices. This is a web dashboard that allows for monitoring and controlling the devices and collecting data and analytics, thus helping the manufacturer to optimize their product.

Screenshot of the web dashboard that manages IoT devices
Screenshot of the web dashboard

We developed RestAPI for a mobile application. This is an additional module on the server's side that allows for the electric scooter's communication with the charger and the database.

And finally, we wrote the library with a number of components to implement a messaging system between the devices of the IoT network. The library unites all parts of the system, connecting them with each other. Above that, the server and the client are powered by the library that ensures their smooth performance.


Technologies Used

  • The library was written in C/C++.
  • We used JavaScript and HTML for the frontend development.
  • The cross-platform application we developed on the charger’s side can run on both Windows and Linux operating systems.
  • We used ASP.NET as a server-side cross-platform framework to build the web app.
  • We wrote custom protocols for CAN and UART interfaces.

Result

We developed a multi-component library that facilitates the implementation of message-oriented middleware intended for messaging in distributed systems. The library serves for the development of client-server applications and other apps interacting in peer-to-peer networks.

Our messaging solution can be used for the purposes of message exchange, data serialization, session management, and network interaction. It identifies message types, creates messages with fieldsets, and is able to record long messages. Besides, the library has a spam filtering system protecting it from malware or any unwelcome message. 

The solution we developed has a light architecture, and consequently very low overhead. It is easy to implement and deploy. The library is highly flexible and customizable, so it can be used in various C++ applications. Because of its high scalability, it allows users to add as many devices as their server’s capacity permits.