Embedded software refactoring for an ESP32-based smart noise monitoring sensor - Lemberg Solutions

Embedded software refactoring for an ESP32-based smart noise monitoring sensor

Lemberg Solutions resolved ESP32 module Wi-Fi connection issues for a smart volume measurement device servicing short-term rental properties.

About the client

NoiseAware is a US-based IoT startup that provides the world’s first privacy-safe noise monitoring service for short-term rental property managers and hotel chains. The indoor and outdoor sensors of the device monitor noise levels at a property and send alerts via a dashboard or mobile app when noise levels go over set thresholds.

The challenge

Our client faced Wi-Fi functionality issues and needed to improve system stability to avoid possible hard faults during OTA updates or high loads. Dealing with unstable Wi-Fi connections and data loss during communication between devices, NoiseAware asked us to optimize the code of their indoor gateway device. 

Delivered value

NoiseAware's system performance stabilized thanks to improvements introduced to the source code architecture and individual modules. We ran a refactoring phase based on the initial audit and delivered a new version of the code ready to be deployed to production. We also added device-analysis functionality to the BLE protocol on existing firmware.

The process

NoiseAware contacted us when they started looking for a partner with embedded software capabilities who can help audit and improve their product. Our main goal was to make the ESP32 module software in their device more reliable, for better data transmission. We agreed on a project-based business model at a fixed cost, and our team conducted weekly status calls with the client to report the results of the LS team’s work. 

At first, we carried out a code audit, which included reviewing code and running it through a static analyzer to detect critical issues. Subsequently, LS engineers developed a local test server to test HTTPS data communication without a connection to the NoiseAware server. Using the ESP library, we modified and structured the code by further isolating the client’s libraries.   

We filtered access points to ensure the same device wouldn’t be scanned repeatedly. The LS embedded engineering team also integrated anonymization of the data collected from devices connected to the sensor. Since Bluetooth was processed incorrectly, the device connected to Wi-Fi and failed to register in the cloud. 

Our client had only partially implemented a feature for counting the number of devices with switched-on Bluetooth and those connected to a router. We continued its development and faced the challenge: during testing, smartphones failed to connect both to WiFi routers and to the NoiseAware device via Bluetooth. LS engineers decided to set an individual task for connection to WiFi, which solved this problem.

Currently, we are working on the second part of the project, helping NoiseAware to rework the TI module in their device. 
 

Technologies
C
Wi-Fi 6
Bluetooth Low Energy (BLE)
HTTPS
ESP SDK
ESP32
Save case study in PDF
Embedded software refactoring for an ESP32-based smart noise monitoring sensor - Lemberg Solutions
NoiseAware dashboard - Embedded software refactoring for an ESP32-based smart noise monitoring sensor - Lemberg Solutions
NoiseAware device - Embedded software refactoring for an ESP32-based smart noise monitoring sensor - Lemberg Solutions

How it works

Jakob Umbrage, Senior Director of R&D at NoiseAware - Lemberg Solutions
Jakob Umbrage, Senior Director of R&D at NoiseAware - Lemberg Solutions

We found Lemberg Solutions at the perfect time in our product development: we had a big goal, lots of issues, and not enough resources. We contracted Lemberg Solutions to first audit our firmware and identify bugs and architectural inefficiencies. They delivered quickly and diligently, and we were so impressed with the deliverable that we moved to the implementation phase immediately. They were a pleasure to work with, everyone on their team was smart and effective, and our firmware is in a great place. We will definitely utilize them for all embedded needs in the future.

Embedded Software Refactoring for ESP32 - PDF Form - Lemberg Solutions
Download the case study to read it later