Skip to main content

Pulse, two firmware updates later: Bluetooth, a missing PATH and a lost hour

Updated 14 min readMarkdown
Part of seriesProjects
Pulse, two firmware updates later: Bluetooth, a missing PATH and a lost hour

What happened when I brought my Pager pattern-of-life sensor up to firmware 2.1, and why it now listens to Bluetooth too.

Where we left off

Pulse is a payload for the Hak5 WiFi Pineapple Pager. It answers a question every physical engagement has to ask sooner or later: when is this place empty? You leave the Pager near a site for hours or days. It listens passively to the Wi-Fi traffic phones and laptops send anyway, counts devices per 15 minutes, and turns that into a pattern of life: when people arrive, when they leave, the quietest window, and what never switches off. A live dashboard on the Pager's own network shows every device as it transmits, and a time machine lets you scrub back through the whole run.

I wrote it in October on firmware 1.1.3; the first article tells that story. Since then Hak5 shipped two big updates: 2.0.0 on 29 October and 2.1.0 on 24 November. Both are mostly about speed, and 2.0 also added a Bluetooth scanner. This article covers what the updates broke, what they made possible, and the bug I found along the way that had nothing to do with firmware.

Reading the changelogs like a threat model

Before touching code, I read both changelogs looking for anything that touches one of Pulse's assumptions. Most of the lines were good news, for example 2.0's claim that "idle" CPU use is down by three times, on a single-core 580 MHz chip. One line in 2.1 looked dangerous:

Payloads: stopping a payload also stops all processes it started.

Pulse's whole design depends on the opposite. The payload starts a capture daemon in its own session with setsid and exits, and the daemon keeps capturing for days. If the Pager now tracked every process a payload started, every long run would die when I left the menu.

The payload runner is a compiled binary, so I couldn't read how it does this. I tested it instead. I wrote a throwaway payload that starts four background helpers, each one detached a different way, waits 30 seconds and exits:

Helper started with Payload finishes normally Payload stopped by the user
plain & survives killed
setsid survives survives
start-stop-daemon -b survives survives
a procd service survives survives

So 2.1 kills what is still in the payload's session when you stop it, and leaves alone anything that left the session. Pulse already used setsid, so it needed no change. I'd been ready to rebuild the daemon as a procd service, and the test showed that wasn't necessary. Reading the changelog told me where to look; only the test could tell me what was really there.

What the update did break

Three things broke, all small and all quiet.

1. The flash removed the web server. The Pager ships without a web server, so in October I installed uhttpd offline. I streamed the package from OpenWrt's official feed through my laptop and checked its SHA256 against the feed's index. A firmware flash wipes packages you installed yourself. 2.1 is still built on OpenWrt 24.10.1, so the same package installed again with the same checksum. The README now says that a flash means installing it again.

2. busybox --list stopped working. Pulse checked whether busybox had its own httpd by listing its applets. The busybox on 2.1 answers --list with "applet not found". The check failed quietly, and Pulse fell through to uhttpd, so nothing visibly broke. That's exactly the kind of bug that bites later. Pulse now calls the applet directly and checks the exit code: 127 means "not there".

3. The dashboard wouldn't start. I ran Pulse → Show dashboard and got an error instead of the QR code. The log said:

setsid: can't execute 'uhttpd': No such file or directory

The file was right there at /usr/sbin/uhttpd, and it ran fine from my SSH session. The two processes saw the same filesystem, and the library dependencies were all present. The cause turned out to be the environment. On 2.1 the launcher starts payloads without an exported PATH. Bash doesn't mind, because it falls back to a built-in default search path that includes /usr/sbin. So command -v uhttpd inside the payload happily found the server. But setsid is a separate program, and it got no PATH at all, so it only searched /bin and /usr/bin.

I could reproduce it with one line:

env -i /bin/bash -c 'command -v uhttpd; setsid uhttpd -h'
# /usr/sbin/uhttpd
# setsid: can't execute 'uhttpd': No such file or directory

The fix is two lines: export PATH at the top of payload.sh, and starting uhttpd by its full path. Any payload that launches something from /usr/sbin through setsid or nohup on 2.1 will hit the same wall, so it went into the project's notes for every future payload.

What the update made possible: Bluetooth

Pulse's honest weak spot has always been the idle phone. A phone that is connected to Wi-Fi and lying on a desk hardly sends probe requests, so Wi-Fi-only counting undercounts the quiet middle of the day.

Firmware 2.0 added blue5, a Bluetooth Low Energy and Classic scanner that runs as a system service. That phone on the desk still advertises over BLE several times a second. So does the watch on someone's wrist and the earbuds in their bag. When I first queried blue5 in my flat, it already knew 27 devices.

Reading, not scanning

Pulse doesn't run its own Bluetooth scanner. blue5 is already running, and two scanners would fight over one adapter. Every 10 seconds Pulse asks blue5 which devices it heard in the last 10 seconds:

blue5ctl fetch -n 0 -g 10 -m -90

On the Pager that call takes about 12 milliseconds, so polling is effectively free. The -m -90 drops anything weaker than −90 dBm, which mostly means the neighbours through the wall. The output is a text table, so it fits the pipeline Pulse already has:

 tcpdump (probe requests)  ─► joiner ─┐
 tcpdump (data frames)     ─► joiner ─┼─► FIFO ─► parser (awk) ─► counts, devices, history
 blue5ctl fetch, every 10s ─► joiner ─┘                     └──► live.json ─► dashboard

A third mode in the awk joiner turns each table row into one line per device, the same way it does for Wi-Fi frames. Nothing downstream needed to know where a line came from, only what kind of device it describes.

Naming what you can't name

Most BLE devices use random addresses that change about every 15 minutes, so the address says nothing about the maker. The advertisement itself often does:

  • Company ID: the manufacturer data starts with a Bluetooth SIG company number. The Pager ships a 4,041-entry list of them, so 0x004C becomes Apple. My speaker showed up under its own model name, and its company ID gave away the brand.
  • Service UUID: devices without manufacturer data often advertise a service, and the Pager's 791-entry UUID list maps FE2C (Fast Pair) to Google.
  • Apple Continuity: for Apple, the first byte after 4C00 says what the device is doing at that moment. Pulse turns it into a label: Nearby (an iPhone or Watch in use), Find My, AirPods, Handoff, AirPlay.

So a row in the waterfall reads "Apple Find My" or "Google" instead of a random address.

Why Bluetooth doesn't go into the headcount

It was tempting to add Bluetooth devices to Pulse's people estimate. I didn't, for two reasons:

  • Bluetooth counts devices, not people. One person with a phone, a watch and earbuds is three Bluetooth devices.
  • Addresses rotate. A BLE address can change inside a 15-minute slot, so distinct addresses overcount, just like Pulse's Wi-Fi "high" figure does.

So Bluetooth gets its own series: a blue line on the time-machine strip, its own count in the header, a "Bluetooth peak" fact, and a Bluetooth column in the hour-of-day profile. What matters for pattern-of-life work is the shape, and putting the two shapes side by side is more honest than blending them. When the Wi-Fi curve says the office is empty but the Bluetooth line says otherwise, that's exactly the disagreement you want to see before you walk in.

On the hardware

On the first real run on 2.1, Bluetooth came through right away. Within seconds the live view held 30 Bluetooth devices, three connected Wi-Fi clients and two fixed-MAC devices, while Wi-Fi probe requests in my quiet flat stayed at zero. That's the idle-phone problem in one snapshot. With two tcpdumps, the parser, the Bluetooth poll and the web server all running, the load average sat around 0.3.

The bug that had nothing to do with firmware

That first real run had another surprise. Pulse starts by asking for the UTC offset, which it remembers between runs, and then asks "Local time is 15:43?". It was 14:43. I corrected it, Pulse set the clock, and the run started.

Afterwards the Pager's clock was an hour behind real time.

Pulse had saved my offset as +2 in October, during summer time. Summer time ended on 25 October, and the Pager's own zone had correctly moved to +1. But Pulse preferred the saved value. So it showed a time an hour ahead, and when I "corrected" it with the stale offset, it moved the real clock an hour back. For a tool whose whole output is what happened at what time, that's the worst kind of bug: everything looks fine and every timestamp is wrong.

The fix has two parts:

  • The Pager's zone wins. When the Pager has a time zone (firmware 2.1 now reports the real offset), Pulse uses it. The saved value only fills in when the Pager says plain UTC.
  • Whole hours are suspicious. A clock that is off by 3 minutes is a wrong clock. A clock that is off by almost exactly one, two or three hours is almost always a wrong offset. Pulse now spots a correction like that and asks before it touches the clock.

I tested it the mean way. I put the stale +2 back into Pulse's settings and started a new run. It suggested +1, showed the right time, and the run's timestamps matched my laptop to the second.

A dashboard built for days, used for minutes

The dashboard was designed for runs of several days. Then I used it during a 30-minute test, and it failed in ways a multi-day demo never showed.

The time machine wouldn't move. Its limits assumed the run was longer than the viewed window. On a 30-minute run with a 3-hour window, the lower limit ended up above the upper one, so every drag snapped back to the same spot.

The first slot was hidden. Pulse counts a 15-minute slot only when its heartbeats show the capture really ran, so a gap isn't mistaken for an empty room. My run started at 15:20, so it had only 10 minutes of the 15:15 slot, and nine heartbeats instead of the ten the rule required. The dashboard hatched my first slot as a capture gap. The rule now looks at the part of the slot that falls inside the run: two thirds of that part, and at least five minutes.

The lines were flat. Even when everything was counted, a short run showed one flat step per 15-minute slot. Each slot is a single number, so two slots make two steps. That's not wrong, but it tells you nothing during the first hour.

The fixes changed the dashboard in three ways:

  • Points you can choose. The strip now draws one point per 5, 10, 15 or 30 minutes, each counting the distinct Wi-Fi and Bluetooth devices seen in that interval. Auto picks the finest interval that fits the strip, so a short run gets a real curve and a three-day run stays readable. The interval still filling up is drawn as a dashed tail, because a half-finished count always looks like a drop.
  • Windows down to 15 minutes. Besides 3, 12 and 24 hours, you can now view 15, 30 or 45 minutes or an hour. A 15-minute window built from 5-minute history would be three columns wide, so Pulse now also keeps a 1-minute history. I wanted the browser to fetch only the newest data, but uhttpd on the Pager doesn't serve byte ranges. So the 1-minute history is split into one file per hour. The dashboard loads past hours once and then reloads only the hour still being written.
  • A list that stays in its box. In a busy place the waterfall had a hundred rows and pushed everything else off the page. It now shows about twelve devices and scrolls inside its box, with the time axis pinned on top.

None of this changes what Pulse captures, only how much of it you can see on a short run. That matters more than it sounds: the first hour of a deployment is when you check that the sensor is placed well, and that's exactly when the old dashboard showed the least.

Test data is personal data too

To test the Bluetooth parser I'd copied four real blue5ctl rows from the Pager into the test suite. That was convenient and realistic, and it meant the repository now held the fixed address of a monitor, the model name of a speaker and the advertising data of an iPhone and a Google device from around my home. That's not a secret, but it's not something to publish either.

The fixture now uses the Pager's real format with made-up addresses, names and payloads. The commit that had the real rows was never pushed, so I amended it rather than leaving the rows in the history. If you build tests from captured traffic, that data came off the air around real people, so scrub it before it's committed, not after.

The rest of Pulse's privacy model carries over to Bluetooth. IDENT=0 writes no Bluetooth addresses or names anywhere: devices become salted hashes whose salt lives only in the capture process's memory. Bluetooth names are often more personal than Wi-Fi names ("Anna's AirPods"), which makes that mode more important, not less. As before, use Pulse only where you're authorized to.

What I'd tell myself before the next update

  • Read the changelog for your assumptions, then test them. The scary line turned out to be harmless for Pulse, and only a test could show that.
  • Silent fallbacks hide breakage. The busybox check had been failing since the update without anyone noticing, because something else caught it.
  • The environment is part of the interface. An unexported PATH broke the dashboard while every file and library was in place.
  • Stored settings go stale. An offset that was right in summer was wrong in winter, and the device already knew better.
  • Test the short case too. A dashboard built around a 40-hour demo broke in three places on a 30-minute run.

What's next

The off-device tests pass for counts, devices, Bluetooth, privacy mode and the multi-day report, and v0.3 has been running on the Pager. Next is the long test I've been owing since October: a multi-day run, now with Bluetooth, to measure CPU load in a busy place, storage growth, and whether the Bluetooth line really tracks people better than Wi-Fi alone. After that comes Sealed Loot, the companion that encrypts a run's data to the operator's key and sends it home when a trusted network shows up.

I built this update with Claude Code as a pair programmer: it read the changelogs with me, wrote much of the code and ran the tests, and every decision and hardware run went through me.

About the author

  • 30 years in creative leadership (in the ad industry as a Creative Director) taught me one core skill: dissecting complex systems and finding the flaw before someone else does. My tech roots run back to 8-bit machine code on a C64 (yeah – 80s, baby!) Today, I’m combining that legacy hacker curiosity with modern threat detection and offensive security. BATTLE-TESTED LOGIC: Decades of high-pressure problem solving and systems analysis. HACKER MINDSET: I don't just follow playbooks; I reverse-engineer how the attack path actually works. CONTINOUS SKILL-UP: CompTIA Security+ certified (among other certs), building home labs, and constantly training for L1 ops to future Pentesting.
OOlivia7h ago

The missing PATH detail is the part that stuck with me — everything in place, yet setsid couldn't find uhttpd because the launcher never exported it. That stale +2 clock offset is a great catch too; a whole-hour error is so easy to trust.