BLE energy-meter sensor (nRF51822) · Works

Revived a cloud-dependent BLE energy monitor by reverse engineering it with Claude Code

by Kacper GrabowskiRead the write-up Save and follow17 views
View JSON
BLE energy-meter sensor (nRF51822): The vendor went bankrupt; the meter now talks to Home Assistant locally.
Image: Title card: Reversed with AI

Who did what

The author did all physical work (opening the case, wiring a Pico debug probe, dumping flash). Static analysis alone stalled; progress came once Claude could test hypotheses on the live device. Claude kept mining dead ends and needed nudges; the author estimates it worked out about 80% of the device.

What was done

After the vendor went bankrupt, Claude Code analysed a firmware dump and then probed the live device over Bluetooth and a debug probe to work out its protocol, and wrote a local Home Assistant integration.

Kacper Grabowski's Bluetooth energy monitor stopped working when its maker went bankrupt and the cloud service died. Grabowski dumped the firmware personally, then let Claude Code probe the live device over Bluetooth and a debug probe until it worked out the protocol and wrote a local Home Assistant integration.

How it was done

Grabowski found a Nordic nRF51822 and its debug pads, wired up a Raspberry Pi Pico as a debug probe, and used a published readout protection workaround to dump the 256 KB flash and RAM.

Claude Code first worked on the dump alone over several sessions, some lasting hours. It wrote pages of notes but could not pin down the keys or the data format. Grabowski then built an isolated VM with OpenOCD, radare2 and Python BLE libraries, passed through the debug probe and a Bluetooth adapter, and let Claude experiment on the live device, with one rule: no permanent changes. It wrote short scripts to test each guess and at one point halted the chip mid encryption to read a reply from RAM.

Results

Over a couple of evenings, with occasional nudges, Claude worked out what the author estimates is about 80% of how the device works. The two keys it needs are stored in flash, so the owner could extract their own. Claude Code wrote about 90% of the Home Assistant integration, which now feeds the Energy dashboard with no cloud. Other owners would have to repeat the hardware steps.

Discussion

Your library

Sources

Sources reviewed · Added

An AI model drafted this entry from the sources above. Checked against the sources on 14 Oct 2026. The figures are the author's. How entries are checked. Something wrong? Tell me.

The weekly dump: new projects, once a week