
What was done
A human decompiled the charger app and protocol, then Claude Code finished an ESP32 bridge with MQTT, a web UI and docs.
freman built firmware that bridges a Powertech MB3906 Bluetooth battery charger to a network. He wanted a flight recorder, so the next battery failure would come with evidence. He did the decompiling and protocol work and used Claude Code for the rest.
How it was done
The charger's BLE protocol is undocumented, so he reverse engineered it and wrote it up in a blog post and a protocol reference. Claude Code, in his words, was brought in to finish: the captive portal, turning notes into readable documentation, and the web page code. Everything was checked against a live charger through full charge cycles.
Results
An ESP32-C3 connects over BLE, authenticates and streams voltage, current, capacity, program and faults, and starts or stops charge programs. Home Assistant gets ten sensors plus controls through MQTT discovery, and there is a web UI with live updates and a small OLED display. The code is MIT licensed.