Repository navigation
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.
- On the phone, enable Developer Options, then turn on Enable Bluetooth HCI snoop log.
- Toggle Bluetooth off and on so logging starts clean. Start the log before the app connects if you want the auth handshake in it.
- 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.
- Pull
btsnoop_hci.logoff the device (a bug report,adb pull, or the vendor's log path — it moves around by OEM and Android version).
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
readShortpath 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.
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:FFPair 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).
Capture and decode hardware you own. Don't point any of this at devices or accounts that aren't yours.