Skip to content

Find a Phone with Claude and Bluetooth

Category Creative & Real-World AI Builds
Status 🟡 Partially completed
Repo nextwork-find-a-phone-with-claude-and-bluetooth
Original NextWork guide nextwork.ai

Learning project

Practice work following a NextWork guide, separate from my production projects.

📚 NextWork learning project. This is a practice project I built while working through NextWork's Find a Phone with Claude and Bluetooth guide. It is part of my Learning portfolio and is fully separate from my production projects.

Category: Learning › Creative & Real-World AI Builds
Status: 🟡 Partial

Overview

Bluetooth signal strength (RSSI) is noisy, but it's enough to find a lost device: walk around, and the smoothed reading climbs as you get closer. This version follows the guide's features, using a log-distance path-loss simulator so it can be tested without a radio.

Summary

The software side is built and tested against a physics-based radio simulator: a redacted signal survey, hunt mode with median smoothing and a 10-second stale cut-off, parking-sensor clicks rendered to a WAV, a privacy-safe hunt recording, and the secret-mission home signal map. It has a real BLE backend (bleak), but no Bluetooth hardware was used.

The checks behind this are in docs/verification.txt.

Skills & tools

Python, Bluetooth LE, Signal smoothing, Privacy redaction, Audio synthesis, Simulation

What I built

  • findphone.py survey: every nearby device with reading count, min/max, and spread. Names and addresses are redacted unless --show-private is used.
  • findphone.py hunt: follows one owned device by exact name. A 7-reading median smoother rejects spikes, the proximity label and click interval come from the smoothed RSSI, and the clicks go silent when the last reading is over 10 s old. --wav renders the parking-sensor click track, and --record saves a CSV with elapsed time and the strongest reading, containing only the target.
  • findphone.py map: the secret mission. It measures three conditions (line of sight, closed door, inside a sofa cushion), repeats the weakest one, and writes signal-map.md.
  • SimRadio: rssi = tx − 10·n·log10(d) − obstacle loss + Gaussian noise, with dropouts. BleakRadio: the real-hardware backend.
  • test_findphone.py: 5 tests (redaction, click mapping, median/stale logic, a hunt that gets warmer and records only the target, and the signal map).

How to run

python findphone.py survey
python findphone.py hunt --target "Sean's Earbuds" --record hunt.csv --wav hunt.wav
python findphone.py map --out signal-map.md
# real hardware (Linux/macOS/Windows with a BLE adapter):
pip install bleak && python findphone.py survey --radio bleak

Verification

I ran the verification command on 2026-12-02. The full output is in docs/verification.txt.

mkdir -p docs && /workspace/nextwork-portfolio/.venv/bin/python findphone.py survey > docs/survey.txt && /workspace/nextwork-portfolio/.venv/bin/python findphone.py hunt --record docs/hunt.csv --wav docs/hunt-clicks.wav | tail -8 && /workspace/nextwork-portfolio/.venv/bin/python findphone.py map --out docs/signal-map.md > /dev/null && /workspace/nextwork-portfolio/.venv/bin/python -m pytest -q -p no:cacheprovider test_findphone.py

Notes

The guide builds a Swift package with Core Bluetooth and AudioToolbox on a Mac. My build machine is headless Linux with no Bluetooth adapter, so I wrote the same features in Python, with a simulator in place of the radio and a WAV file in place of live clicks.

What isn't done, and why

There's no hardware: no Bluetooth adapter, no owned device to hunt, and no Mac, so the guide's Swift/Core Bluetooth app wasn't built and nothing was found in a real room. The guide also has Claude Code write the app, and I wrote it myself. To finish, run python findphone.py survey --radio bleak on a machine with Bluetooth and hunt a device you own.


Original project: https://nextwork.ai/projects/ab537dfe-bcde-4c54-8796-b29f0e7ae967 · Part of my NextWork Learning portfolio (hub).

Verification output

From docs/verification.txt:

$ mkdir -p docs && /workspace/nextwork-portfolio/.venv/bin/python findphone.py survey > docs/survey.txt && /workspace/nextwork-portfolio/.venv/bin/python findphone.py hunt --record docs/hunt.csv --wav docs/hunt-clicks.wav | tail -8 && /workspace/nextwork-portfolio/.venv/bin/python findphone.py map --out docs/signal-map.md > /dev/null && /workspace/nextwork-portfolio/.venv/bin/python -m pytest -q -p no:cacheprovider test_findphone.py

t= 23.0s  Sean's Earbuds:  -71.0 dBm  same room        clicks every 0.9 s
t= 24.0s  Sean's Earbuds:  -68.0 dBm  same room        clicks every 0.806 s
t= 25.0s  Sean's Earbuds:  -61.0 dBm  close            clicks every 0.585 s
t= 26.0s  Sean's Earbuds:  -50.0 dBm  very close       clicks every 0.238 s
t= 27.0s  Sean's Earbuds:  -50.0 dBm  very close       clicks every 0.238 s
t= 28.0s  Sean's Earbuds:  -49.0 dBm  very close       clicks every 0.206 s
t= 29.0s  Sean's Earbuds:  -47.0 dBm  very close       clicks every 0.143 s
strongest reading -47 dBm at t=29.0s; clicks stop when the signal is stale (>10 s)
.....                                                                    [100%]
5 passed in 0.23s

[exit code 0]