Kiridharan

skiridharan.me@gmail.com

Get in touch

BLE Finder: using signal strength as a compass, not a ruler

How we built a Flutter app that finds Bluetooth Low Energy devices by live RSSI, maps it to hot and cold, and is honest about what signal strength can't say.

Published
Reading time
5 min
Project
BLE Finder
Topics
  • Flutter
  • Dart
  • flutter_blue_plus
Signal rings around a Bluetooth device, with a phone's compass needle turning toward it. −48 dBm warmer

A lost fitness band or tracker tag is usually still talking. It keeps advertising over Bluetooth Low Energy, and any phone nearby can hear it. What the phone cannot tell you is where it is. BLE Finder is a small Flutter app for iOS and Android that turns that broadcast into a hot-and-cold game: pick a device, walk slowly, and follow a dial that moves from cold to warm to hot to here, with optional haptic ticks that speed up as you close in. The source is MIT-licensed at github.com/kiridharan/ble-finder. The most important design decision was deciding what the app would refuse to claim.

RSSI is not distance

Every BLE packet arrives with an RSSI, the received signal strength in dBm. Closer to zero is stronger, so -45 is nearer than -85. It is tempting to plug that into a path-loss formula and print “3.2 metres”. We chose not to, because the number would be fiction. RSSI moves with walls and furniture, with the phone in a pocket or against your body, with antenna orientation, with other 2.4 GHz traffic, and with how often the device advertises. A jump from -80 to -55 usually means you got closer. It does not mean you are four metres away.

So the app maps RSSI to bands, not metres, and says so in its own code comments and documentation: treat it as a compass, not a tape measure.

Proximity proximityFromRssi(int? rssi) {
  if (rssi == null) return Proximity.unknown;
  if (rssi >= -45) return Proximity.here;
  if (rssi >= -60) return Proximity.hot;
  if (rssi >= -75) return Proximity.warm;
  if (rssi >= -90) return Proximity.cold;
  return Proximity.faint;
}

Each band gives an instruction, not a measurement. Warm says “Same area. Search this room.” Hot says “Very close. Check cushions, pockets, floor.” The thresholds are heuristics, and the docs call them that.

Trend beats the instant reading

A single RSSI sample is noisy. What helps a person searching is direction: am I getting warmer? The app keeps a short history of readings for the tracked device and compares the average of the later half with the earlier half. A rise of 3 dBm or more reads as warmer, a fall of 3 or more as colder, and anything smaller as steady. It needs at least four samples before it will say anything other than steady, which stops one lucky packet from sending you across the room.

To keep readings flowing, the app runs a continuous scan and, when it can, also connects to the tracked device and polls its RSSI every 700 milliseconds. If the connection fails, it falls back to the RSSI in advertisements. It does not change the connection’s MTU, so it is less likely to disturb another app already talking to the same device, and on exit it disconnects only what it connected itself.

Haptics you can feel in a pocket

People search with their eyes on the floor, not the screen. When haptics are on, the phone ticks every 900 ms when warm, every 480 ms when hot and every 220 ms at “here”, where it adds a stronger pulse and a click. Cold and faint stay silent, because a tick that never changes carries no information. It is a Geiger counter, the oldest interface for this job, and it works without looking.

What the platform decides for you

The app only sees Bluetooth Low Energy. Many headphones, speakers, mice and keyboards use classic Bluetooth and will not appear, and we say that near the top of the README rather than leaving users to discover it. Wearables, tags and many IoT boards do advertise over BLE.

The platforms differ in ways that shape the product. On Android 12 and later the app asks for Nearby devices permission; older versions may also ask for location, because the OS ties BLE scans to it. On iOS the app asks for Bluetooth, and it never sees a hardware MAC address. It gets an opaque UUID that can change after the OS forgets the device, so “remember this device” is a best effort there. iOS will also only report devices already connected to another app if you ask for a service UUID they expose, so the app asks for a broad list of common ones, such as battery and heart rate.

Scanning is foreground only. We did not add background modes, on purpose: this is a tool for a phone in your hand. There are no accounts, no analytics and no uploads. The last tracked device and the haptics setting stay on the phone.

One more platform fact belongs in any honest write-up: the app’s code is MIT, but the Bluetooth library it depends on requires a paid licence for commercial use. The repository’s notice file says so plainly.

Tested where it can be

The iOS Simulator has no Bluetooth radio, so we kept the decisions out of the radio code. The proximity bands, the 0-to-1 signal meter, the trend calculation and the fallback names for unnamed devices are pure functions in one file, and they have unit tests that run in CI. Everything the user is told comes from code that can be checked without a phone.

What we’d tell a team building something similar

Decide early what your sensor cannot know, and design the interface around that limit. A band with a clear instruction is more useful than a precise number that is wrong.

Show the trend, not just the value. People navigate by change.

Separate the decisions from the hardware so you can test them, and read your dependencies’ licences before you ship.

If you’re weighing a mobile or hardware-adjacent build like this, get in touch.

Tell me what you are building.

For consulting, a build, or a question about a write-up.

  1. Full-stack developmentScalable frontend and backend systems with modern technologies.
  2. System architectureDistributed systems and microservices architectures.
  3. GenAI integrationAI-powered features and automation workflows.
  4. Technical consultingStrategic problem-solving and measurable client impact.

ChennaiIndia

Write to me

Or write directly

skiridharan.me@gmail.com