After two failed reads of a block the dump loop ends, but the table was
still printed for every block the tag reports, from a buffer that is
zero where nothing was read, the command returned PM3_SUCCESS, and
without --ns that table was saved as the dump. A card with genuine zero
blocks makes the difference impossible to see. On a PM5 before 05c21a33b
every dump of an EM4233 read block 0, failed on block 1 and printed all
52 rows.
A dump that stops early now prints only the blocks it read, says
"Dump incomplete, read X of Y blocks, not saved", saves nothing and
returns PM3_EPARTIAL.
The tag answering 0x0F/0x10 is different: that is the existing end of
memory heuristic, used when SYSINFO gave no size and 128 blocks were
assumed. The block count now becomes what the tag actually holds, so
the dump stays complete and no rows past the real end are shown.
Behaviour change: an interrupted dump exits PM3_EPARTIAL instead of 0
and writes no file. A complete dump is unchanged.
Tested on a PM5 with an EM4233 (52 blocks), the pre-05c21a33b firmware
serving as a source of genuine read failures:
- fixed firmware, 1-of-4 and 1-of-256: 20/20 complete, exit 0
- failing firmware, 1-of-4: 15/15 "read 2..14 of 52 blocks, not saved",
only those rows printed, exit PM3_EPARTIAL; without --ns no file
- the end of memory path was not reached: this tag reports its size in
SYSINFO
Builds clean with gcc and clang.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New client command for VivoKey Thermo / Temptress style implants. The
NTAG 5 link (NTP5332) is used as I2C master: energy harvesting is enabled
through the EH_CONFIG_REG session register (AN12365), the TI sensor is
driven with WRITE I2C / READ I2C / READ SRAM and the I2C master status
register is polled for completion and NAKs. Sensors at 0x48-0x4B are
probed and identified by the TMP117/TMP119 device id register, a one-shot
conversion is triggered and the result printed in C and F.
Pure client side, uses CMD_HF_ISO15693_COMMAND with the field kept on.
Offline self test for the conversions is hooked into pm3_tests.sh, and
hf 15 info hints at the command for NTAG 5 tags.
Not tested on hardware, no implant available.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The help text and the -y warning said finalize erases the whole tag memory
to 00000000. A dump of a tag before and after finalize shows otherwise: the
configuration blocks are cleared, but user data is relocated rather than
erased. Data written to block 0x38 before finalize read back at block 0x20
afterwards.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The client only inspected PM3_EWRONGANSWER and then re-verified with its own
getUID(), which asks whether the tag carries the requested UID, not whether
this command wrote it. Running csetuid --v3 twice with the same UID printed
"Setting new UID ( ok )" on the second run even when the device had reported
PM3_ESOFT, because the UID written by the first run still matched.
Gen1 and V3 now switch on the device status, which already covers tag
identification and UID verification. V2 keeps the client side comparison,
the device does neither for it. PM3_ETIMEOUT is handled as well, cfinalize
already did that.
The cfinalize help text and its confirmation warning said the configuration
area is erased. Finalize erases the whole tag memory to 00000000.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Identification, writing and failure handling for magic Gen1 and V3 tags
now runs in a single field session on the device, which reports
PM3_SUCCESS only when the UID reads back as requested.
armsrc/iso15693.c:
- SetTag15693Uid() probes 0x38/0x39/0x3E/0x3F and refuses to write when
any of them answers with data, verifies the UID afterwards and blanks
the four blocks again when it did not change.
- SetTag15693Uid_v3() and FinalizeTag15693_v3() are new, both check the
0x14/0x15 configuration signature before writing and verify after.
client/src/cmdhf15.c:
- csetuid and cfinalize now only select a command and print the status.
The V3 block helpers and constants move to armsrc, which restores the
original read helper with its CALLOC message and the
ISO15_ERROR_HANDLING_* macros.
Behaviour change: hf 15 cfinalize without -y no longer energizes the tag
and no longer reports configuration mode before asking for confirmation.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- probe: only no answer / block not available count as unreadable, other read errors abort
- 69960000 is only accepted in 0x3F, the other blocks must be blank
- write 0x3E/0x3F/0x38/0x39 in one RF session
- rollback only when the tag still shows its original UID, message lists all four blocks
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Continuous 16-slot inventory now shows a persistent, in-place presence table: one row
per UID seen this session (kept as rows, never removed), redrawn in place each scan with
present / gone (Ns ago) status and a present/total count.
Also keep the RF field up across scans in continuous mode (drop it once on exit) instead
of re-initialising every round -- faster, and avoids per-scan 'Setting ISODEP' churn when
APDU logging is enabled. Fix the reader help text (the polling loop exits on Enter, not
the pm3 button).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add ISO 15693 16-slot inventory with anti-collision tree-walking, reachable via 'hf 15 reader --all'; single-tag reading stays the default. The firmware steps the 16 slots with EOF markers and flags 'signal but no decode' slots as collision hints; the client walks the UID mask tree, validates CRC per slot to confirm real collisions, and dedups discovered tags. Single-tag reading (default) and 16-slot inventory (--all) both run under hf 15 reader.