Work

Recent work, with its records.

One case so far, on ESP32, because that is what we have built and can show. It is public: you can read every line and rerun every test.

Case 1

Tests, a fix and a feature for an open-source ESP32 MQTT bridge

  • ESP32
  • Bluetooth LE
  • MQTT
  • Native tests
  • Public
Original project
Bluetti_ESP32_Bridge by Mario Lukas
Licence
GPL-3.0, public fork
Size
About 3,100 lines of C++, no tests
Changes
3, each verified on its own

An open-source ESP32 program that connects portable power stations to an MQTT broker over Bluetooth LE. About 3,100 lines of C++, no tests. Original project: Bluetti_ESP32_Bridge by Mario Lukas, GPL-3.0. Our work is in a public fork, and the fix and the feature are offered upstream as pull requests.

What we delivered, as three separate changes, each verified on its own:

  1. Test suite

    A first native test suite. Host-side tests for the reply field parsers and the frame CRC: 14 cases, run under address and undefined-behaviour sanitizers. The suite also surfaced an undefined-behaviour shift in the version parser, recorded for a later fix.

    14 cases · ASan + UBSan

  2. Fix

    A fix. A command arriving on an MQTT topic the firmware does not handle still queued a Bluetooth write, built from uninitialised values. We reproduced it in a test that failed first; the firmware now logs the topic and sends nothing. Flash cost: 92 bytes.

    failing test first · flash +92 B

  3. Feature

    A feature. Every Bluetooth LE reply is now checked (length and CRC-16/MODBUS) before use; short or corrupt replies are logged and dropped. The same change fixed a one-byte buffer overrun in the field copy. 25 native cases, 13 of 14 mutants caught. Open: the reply layout is not yet confirmed on a real station.

    25 cases · 13 / 14 mutants · bench open

Have a board that needs a fix or a feature?

Describe it in a free 30-minute call. You leave with a written scope, whether or not you hire us.