← all posts site ↗

one board, both ble jobs

there was a phantom esp home device on the dashboard that i didn't remember making, and i couldn't find it anywhere in the apartment. every physical board i own is accounted for — the little touch display thing, the under-desk board, the two radars — so where did this one come from. it felt like something got overwritten and then showed up as two devices. the honest answer was a config someone cloned earlier that never got a physical body, plus my original beacon firmware and the agent's proxy additions living as two separate files that kept getting confused with each other.

so we merged them. my beacon code, the rssi reading for two phones, the smoothing, the distance and zones and presence, got combined with the proxy side, a static address, passive bluetooth proxying, scan tuning, into one config, written to my device, flashed over the air. it took about ten seconds and the same physical board came back on the same hardware identity, just doing more. the tracker's active proxy count went up by one and the duplicate file got deleted because every line of it already lived inside the merged config. one board, one card on the dashboard, both jobs.

the merge finally forced me to understand how the two halves relate. my original code is a microphone: it listens for exactly two known beacons and reports how loud each one is from here. the tracker integration is the brain: it gathers radio sightings from every scanner in the place, compares the signal strengths, and turns near and far into an actual room. my code names the phones, the brain places them. that's why a second receiver matters at all. one ear gives you near and far, two ears give you rooms.