Skip to content

Capturing a Log

magikh0e edited this page Nov 16, 2026 · 1 revision

Capturing a Log

The decoder works from an Android btsnoop capture — the raw HCI log Android can record of everything over Bluetooth. Grab one while the real app talks to the device, and puffco_lorax_decode.py turns it into a typed path map.

Capture

  1. On the phone, enable Developer Options, then turn on Enable Bluetooth HCI snoop log.
  2. Toggle Bluetooth off and on so logging starts clean. Start the log before the app connects if you want the auth handshake in it.
  3. Open the Puffco app, pair, and use the device — read state, change a temp, start a cycle — so the traffic you care about is in the log.
  4. Pull btsnoop_hci.log off the device (a bug report, adb pull, or the vendor's log path — it moves around by OEM and Android version).

Decode

python3 puffco_lorax_decode.py btsnoop_hci.log [--json out.json] [--csv out.csv]

No dependencies beyond the Python 3 standard library. It prints:

  • the auth handshake (getAccessSeed → unlock) and a known-answer check that the computed token matches what the app sent — a quick confirmation your handshake code is right;
  • the device path map: every readShort path with its value decoded by type (float32 / u32 / string / rgb / mac / bytes), plus a short description.

--json / --csv write the same table to a file, handy as a drop-in reference for an app.

Go live

puffco_client.py goes the other way — it connects to the device over BLE, runs the same auth handshake, and reads live state. Cross-platform via bleak:

pip install bleak
python3 puffco_client.py                      # auto-scan for a Puffco
python3 puffco_client.py --name "PEAK PRO"
python3 puffco_client.py --address AA:BB:CC:DD:EE:FF

Pair first. The Peak Pro only answers over a paired, encrypted link — unpaired, it ignores every LORAX frame and the client hangs on timeouts. See Protocol Reference § GATT for the pairing notes (including the Windows ConfirmOnly workaround).

Your own device, your own traffic

Capture and decode hardware you own. Don't point any of this at devices or accounts that aren't yours.

Clone this wiki locally