With `--emu`, `hf mf chk` printed "Found keys have been transferred to
the emulator memory" and returned success whatever mf_elm_set_mem()
gave. It now checks that status, stops the transfer at the first
failure with fast mode off, says so and returns the status. With no
key found it wrote every trailer back and reported a transfer. It now
says "No keys found" and transfers nothing, as `hf mf fchk` does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With `--emu`, `hf mf fchk` printed "Found keys have been transferred to
the emulator memory" and returned success whatever mf_elm_set_mem()
gave. It also ignored the result of FastDumpWithEcFill(), which itself
returned success after "Dump file is PARTIAL complete". The transfer
now stops at the first failure with fast mode off, says so and skips
the card fill. The fill returns the device status when both keys fail,
and the command returns the status that failed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tag never acknowledges a write, so the client printed "Done!" also
when the tag rejected it (wrong password, protected block, missed PMC
window). After a good write the tag stays silent during EEPROM access
(640T0), sends a PMC and then the programmed block, even outside
RFB..RLB, and continues as after reset (datasheet 6.4/6.5). On failure
it skips that block.
- RealWritePCF7931: keep the field on after the frame and switch to
sampling right away (4.5 blocks). Confirm when the decoded blocks
follow the read-after-write grid; when that block itself decodes,
check the written byte and return the whole block
- DecodePCF7931: split from DemodPCF7931 to decode an existing capture;
a block with no PMC before it gets its start from the closing PMC
- SendCmdPCF7931: frame sending split into SendFramePCF7931
- WritePCF7931: up to 3 attempts while not confirmed (a tag idle for a
while often misses the first one); reply status and block
- client write: report confirmed with block data, confirmed by timing,
or not confirmed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the reset-aligned 12.5-block capture an empty one takes ~1.3s, so
10 of them took 13.4s against the 15s client timeout. A present tag
always decodes in the first capture.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tag does not send block numbers (datasheet 5.1, 6.1); only block 1
(sync pattern and RFB/RLB/RB1 selection) identifies positions. The
reader printed raw captures, repeated and unordered.
- ReadPCF7931: field off 50ms before each capture so it starts from a
tag reset (first block = RFB, or block 1 with RB1, fig 10), record the
start sample of each block and return its index in the sequence sent
after reset in a pcf7931_read_t reply. Keep the longest capture, at
least 10 blocks (a full cycle plus repeats)
- DemodPCF7931: capture 12.5 blocks (~0.9s) instead of 4.5, enough for
the 9-block cycle (RB1 with a full range sends block 1 twice) to repeat
- PMC/block debug prints only at DBG_EXTENDED
- client: identify block 1 as the block whose selection explains the
observed cycle; it must match the minimal period of the data (a single
repeated block was taken for a 2-block selection). Print blocks 0-7
(missing ones as not transmitted) and decode PAC, password, write
protected blocks and selection
- client: when several blocks fit as block 1 (a full 8-block cycle is
rotation symmetric, e.g. a user block ending in 55 C4 reads as RFB 5,
RLB 4) pick --rfb, then the one with fewest reserved bits set (fig 8),
else print the reset order as #n with the possible RFB values
- without block 1: print the blocks in transmission order as RFB+n, list
the RFB values that keep block 1 out of the range, number them when
only one is possible, or with the new --rfb option
- client: reader timeout 15s, covers the no-tag path
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With `--emu`, `hf mf staticnested` printed "keys transferred to emulator
memory." and returned success whatever mf_elm_set_mem() gave. It now
checks that status, stops the transfer at the first failure with fast
mode off, says so and returns the status.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release asset from RfidResearchGroup/Proxmark5_BWM_esp32 tag V4
(built Nov 11 2026 13:40:09, ESP-IDF v5.5.2).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With `--emu`, `hf mf nested` printed "Key transferred to emulator
memory" or "keys transferred to emulator memory." and returned success
whatever mf_elm_set_mem() gave. It now checks that status, stops the
transfer at the first failure with fast mode off, says so and returns
the status. The single sector recovery also returned success when
mf_nested() failed, for example after "No valid key found". It now
returns the mf_nested() status.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`hf mf eclr` returned success without waiting for the reply to
CMD_HF_MIFARE_EML_MEMCLR, and the device replied PM3_SUCCESS even
without room for the emulator memory. emlClearMem() now returns the
status of BigBuf_Clear_EM(), the device replies with it and the client
waits for it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The device did not answer CMD_HF_MIFARE_EML_MEMSET, so `hf mf eload`
and `hf mfu eload` printed "Done!" even when the device had no room
left for the emulator memory and nothing was written. BigBuf_Clear_EM()
then ran memset() on a NULL pointer. The device now refuses a MEMSET
packet shorter than its blocks and replies with the status, which the
client waits for. `hf mf eload` also turns fast mode off when its last
packet holds more than one block. hf_mf_tnp3_sim.lua sends the flags
byte added in 4d7d49e08, and both lua sims check the status. The
`hf mfu eload` hint loses a stray backtick.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bwm_cmd() emptied the UART RX ring before each query and its own parser
threw away every frame that was not its reply. Queries made during a
WiFi/BLE session (hw status asks five, the autooff and BLE paths more)
so ate forward-frame acks and client data:
- every eaten ack left a phantom frame in the flow-control window; the
gate then stalled on its timeout and "forgot" frames, overrunning the
ESP's UART ring, which lost reply frames (lines missing from hw status
over WiFi, pings timing out)
- incoming client bytes were dropped outright
bwm_cmd() now registers the reply it expects with the shared app_com
parser (bwm_frame_expect) and pumps it, so acks, DATA_FORWARD and
LINK_STATE keep flowing while it waits. Pumping before arming replaces
the drain's job of not taking a late reply as the next one's.
Flow control: the ack timeout goes from 200 ms to 1 s (with accurate
counting it only fires on a real radio stall, and waiting beats
overrunning the ring), and the window resets after 5 s without a
forward frame, as the header promised ("drains at idle").
PM5 over WiFi, hw status speed test: ~20 KB/s with 190 forgotten frames
and lost lines -> up to ~90 KB/s (the 921600 baud UART) on a clean
link, every line and ping intact. Over a lossy link TCP retransmits
still stall it. WiFi up/down, BLE status, power save, name and OTA
checked on the PM5.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix byte-parity removal to process the 112 payload bits separately from
the trailing 8-bit CRC8-Maxim checksum, add 35-bit Pyramid encoding/
decoding via `getPyramidBitsEx()`, add `--fmt` on `lf pyramid clone`/`sim`
and `--raw` on `lf pyramid demod`, and guard `detectPyramid()` against
truncated frame buffers.
Co-Authored-By: Gemini <noreply@google.com>
Detect and decode 64-bit SecuraKey Short (`0x7FC00000` preamble,
marker-free 24-bit card number), support `--raw` on `lf securakey demod`/
`clone`/`sim`, and generate/clone/simulate 64-bit Short frames via
`--cn` with T55X7_SECURAKEY_SHORT_CONFIG_BLOCK / EM4305 config blocks.
Co-Authored-By: Gemini <noreply@google.com>
Formats longer than 55 bits populate packed.Top while packed.Mid can be
<= 0xFFF, which caused sendTry(), CmdHIDSim(), and CmdHIDClone() to omit
long-format transmission. Include packed.Top != 0 in the longFMT check.
Co-Authored-By: Gemini <noreply@google.com>
Define T55x7 and EM4x05 configuration block constants for WatchNET,
LF ICT (24X / GT 081), Keri NXT, and 64-bit SecuraKey Short, register
SecuraKey Short and ICT in testKnownConfigBlock(), and display these
formats in printT5x7KnownBlock0() with an enlarged output buffer.
Co-Authored-By: Gemini <noreply@google.com>
Release asset from RfidResearchGroup/Proxmark5_BWM_esp32 tag V3
(built Nov 11 2026 11:01:47, ESP-IDF v5.5.2).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BWM free RAM.... free heap, plus lowest since boot and largest block on
ESP fw that reports them (APP_CMD_GET_SYS_FREE_HEAP).
BWM chip........ model, revision, package, flash maker / JEDEC id and
size (APP_CMD_GET_SYS_CHIP_INFO), omitted on ESP fw without it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bwm_ota_once() returned PM3_ETIMEOUT both when OTA BEGIN timed out and
when the END ack was lost. The retry loop reads PM3_ETIMEOUT as "all
data sent", so a BEGIN timeout (e.g. upgrade re-run while the PM5 is
still resetting) printed "BWM firmware uploaded" with nothing sent and
reset the PM5 while the ESP was still erasing. BEGIN failures now return
PM3_EFAILED and take the normal retry path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With BLE off, `hw bwm ble` suggested `hw bwm ble pairing on`; it now
suggests `hw bwm ble on` and drops the pairing hint until BLE is on.
A WiFi join failing with reason 201 now says the BWM is 2.4 GHz only,
the usual cause when pointed at a 5 GHz SSID.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release asset from RfidResearchGroup/Proxmark5_BWM_esp32 tag V2
(8b133b0, ESP-IDF v5.5.2). OTA-tested on PM5: V1-12-g23bfa7b -> V2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Decode the five tag traces in traces/cotag that had no test (active
1558 / 385816, passive 2402442, Bewator 1576805 / 1576807) by card
number, and run lf search on an active and a passive trace.
The 3361, HD500 and TWN4 activation sequence traces carry no tag, so
lf cotag demod must fail on them and lf search must find nothing. That
guards the demod against reporting a card number from reader noise.
lf_cotag_reader_HD500_with_tag.pm3 is left out: lf cotag demod cannot
decode the tag inside that reader capture yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ULC config / Attack lines are a fingerprint result, next to PRNG,
Vendor and Chip IC. hf mfu info now prints them there, including the
read protected case, and keeps the UL-C Configuration block for the
page decode only. dump / view / eview -v have no fingerprint section
and still print the verdict after the decode. Definite verdicts use
the [+] prefix like the other fingerprint lines.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>