Repository navigation
Protocol Reference
LORAX is the path-based command channel newer Puffco firmware uses in place of the old one-characteristic-per-field GATT. Under the hood it's a small file-access protocol: the device paths are files, and the "short" ops are open+read / open+write+close folded into a single frame.
frame = seqId (uint16 LE) + opcode (uint8) + payload
reply = seqId (uint16 LE) + status (uint8, 0x00 = OK) + data
The seqId ties a reply to its command — every outgoing frame takes the next id,
and the reply comes back on the reply characteristic carrying the same id. Run a
small table of seqId -> pending and you have a clean request/response model over
BLE notifications.
| role | UUID | properties |
|---|---|---|
| service | e276967f-ea8a-478a-a92e-d78f5dd15dd5 |
— |
| version | 05434bca-cc7f-4ef6-bbb3-b1c520b9800c |
read |
| command | 60133d5c-5727-4f2c-9697-d842c5292a3c |
write without response |
| reply | 8dc5ec05-8f7d-45ad-99db-3fbde65dbd9c |
notify (command replies) |
| event | 43312cd1-7d34-46ce-a7d3-0a98fd9b4cb8 |
notify (async events) |
The link must be paired and encrypted first. Unpaired, a Peak Pro silently
ignores every LORAX frame and the client just hangs on timeouts (reading the OTA
version char returns ATT 0x0F, "Insufficient Encryption"). Put the Peak in
pairing mode — hold the button until the logo glows blue — and pair it with the OS
before you connect. On Windows, Settings/Chrome often won't pair it; a ConfirmOnly
custom pairing (DeviceInformationCustomPairing) works, and if it sticks on
OPERATION_ALREADY_IN_PROGRESS, a reboot clears it.
| group | opcodes |
|---|---|
| auth / session |
0x00 getAccessSeed · 0x01 unlockAccess · 0x02 getLimits · 0x03 ackEvents |
| shorthand |
0x10 readShort · 0x11 writeShort · 0x12 statShort · 0x13 unlink |
| file handles |
0x20 fileOpen · 0x21 fileRead · 0x22 fileWrite · 0x23 fileWatch · 0x24 fileUnwatch · 0x25 fileStat · 0x26 fileClose · 0x27 pruneFileHandles |
Most traffic is the shorthand ops. The handle ops are the long form — open a path, then read/write/watch/stat against the returned handle, then close — used for the bigger or streamed files.
readShort = offset(u16 LE) maxLen(u16 LE) path
writeShort = offset(u16 LE) flags(u8) path 0x00 data (flags: truncate = 0x04)
The path is ASCII, NUL-terminated before the data on a write. Real app captures
carry flags = 0x04 (truncate) at offset 0 on every writeShort — that's the
bp=4 the decoder prints.
seed = getAccessSeed() # 16 bytes, from the device
token = SHA-256(lorax_key ++ seed)[:16] # 16 bytes
unlockAccess(token) # status 0x00 = unlocked
lorax_key is ZMZFYlbyb1scoSc3pd1x+w== (base64, 16 bytes). The shipping app
carries three of these keys, one per firmware generation — flatA, flatX
(= FUrZc0WilhUBteT2JlCc+A==, exactly the constant from Fr0st3h's older-firmware
write-up), and lorax — and selects by generation. LORAX firmware uses lorax.
After unlock, getLimits reports the transport caps. On my Peak Pro
(fw gith 5652c02): maxPayload 241, maxFiles 36, maxCommands 8.
The Path Map types are the Peak Pro table (codename Pikachoid,
apiSeries 0), where values are mostly float32. A Proxy (Toad, apiSeries 1)
reports the same paths as int32 with a scale divisor — so /p/bat/soc is float32
on a Peak Pro but int32/100 on a Proxy. Detect the variant from /p/sys/fw/api:
apiSeries = value >> 16.