Commit Graph
23503 Commits
Author SHA1 Message Date
towelbyte 294fb3c504 Simulate COTAG tag implementation
New CLI command `lf cotag sim` with COTAG tag simulation implementation.

Detects COTAG reader activation sequence and emulates a COTAG tag.

Signed-off-by: andrej@towelbyte.net
2026-10-14 17:14:56 +02:00
Iceman 7f4dfe7472 Merge pull request #3703 from nieldk/gdb-gateway
Add standaolne module gdb-gateway
2026-10-14 09:52:16 +07:00
Niel Nielsen 92c7609fc5 Add standaolne module gdb-gateway 2026-10-13 20:03:45 +02:00
Iceman 162acb60a2 Merge pull request #3682 from mfcarroll/fix/t55xx-detect-pwd-guard
`lf t55xx detect` - don't send a password the PWD bit hasn't confirmed
2026-10-13 23:36:13 +07:00
Iceman 8110082977 Merge branch 'master' into fix/t55xx-detect-pwd-guard
Signed-off-by: Iceman <iceman@iuse.se>
2026-10-13 23:36:03 +07:00
Iceman feaeb3da0a Merge pull request #3677 from ByteOrderMarc/pm5-hardnested-fix
fix: hardnested/autopwn on PM5 with hardened MIFARE Classic EV1
2026-10-13 23:18:49 +07:00
Iceman 7e683e7f25 Merge branch 'master' into pm5-hardnested-fix
Signed-off-by: Iceman <iceman@iuse.se>
2026-10-13 23:17:28 +07:00
Iceman ab445f084e Merge pull request #3697 from xianglin1998/fpga-merge-and-opensource
FPGA: Merge and opensource
2026-10-13 23:06:04 +07:00
Iceman 85a27f9a6a Merge pull request #3696 from r3wretrhy/fix/lf-savestate-leak-3675
client: free graph and demod buffer save states after restore
2026-10-13 19:12:36 +07:00
Iceman d25be83872 Merge branch 'master' into fix/lf-savestate-leak-3675
Signed-off-by: Iceman <iceman@iuse.se>
2026-10-13 19:01:51 +07:00
Iceman cea810820b Merge pull request #3694 from TomHarkness/doc-pm5-flipper-usage-update
doc: update PM5-FLIPPER-USAGE.md to current CEP state
2026-10-13 15:22:38 +07:00
Iceman 9c5e07d94d Merge pull request #3679 from innocentbystanderproxmark/pm5-documentation-addition
Documentation updated from feedback
2026-10-13 15:16:48 +07:00
Iceman f653da1674 Merge branch 'master' into pm5-documentation-addition
Signed-off-by: Iceman <iceman@iuse.se>
2026-10-13 15:16:35 +07:00
Iceman 66a01099c8 Merge pull request #3700 from nieldk/master
Fixed hf 15 sim - a non-matching masked inventory no longer makes the tag ignore later inventories
2026-10-13 15:04:05 +07:00
dxlandClaude Code 7b28012e6a FPGA: Stop tracking the generated fpga_pm5.fs
It is a build product of `make pm5`, like the .bin next to it, and the
build recreates it, so the copy in the tree only went stale and made
every build touch it again.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-13 00:34:58 +08:00
Niel Nielsen 8a04f38305 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-10-12 18:13:21 +02:00
dxl a3712776d3 FPGA: Added a workflow for pm3 fpga build 2026-10-12 23:08:40 +08:00
dxl 4f01016608 FPGA: Added a workaround for the GW1N-4D IDCODE(Flaws of Apicula). 2026-10-12 19:32:41 +08:00
dxl e69b791612 FPGA: Try fix workflow build error. 2026-10-12 14:51:59 +08:00
dxl 2802fd1b48 FPGA: Added workflow for PM5 fpga build. 2026-10-12 14:27:50 +08:00
dxl 431cded61e FPGA: PM5 FPGA build implemented. 2026-10-12 14:09:22 +08:00
dxl 1f3013c6d9 FPGA: Optimization of File Directory Structure 2026-10-12 14:08:22 +08:00
dxl 9ae4caf833 FPGA: Added yosys synthesizer script 2026-10-12 00:45:39 +08:00
dxl 78529d8df7 FPGA: Update & Merge from master(a48ce25) 2026-10-12 00:44:50 +08:00
dxl da413ac9b9 Merge branch 'master' into fpga-merge-and-opensource
# Conflicts:
#	fpga/hi_flite.v
2026-10-12 00:22:24 +08:00
dxl 256aca63b7 FPGA: Add source files specific to PM5. 2026-10-12 00:04:06 +08:00
dxl 7d5dd46d94 FPGA: Added a TODO in hi_reader.v 2026-10-11 23:43:32 +08:00
dxl 416201a535 FPGA: Change the WITH_HF_15_LOWSIGNAL macro toggle to a runtime check. 2026-10-11 18:48:38 +08:00
Zhaoqi XuandGrok Bot 10fa02ca24 client: free graph and demod buffer save states after restore
save_graphbuffer() and save_buffer8() calloc a copy, and the restore_*()
helpers only copy out of it, so every owner leaked its save state.
check_chiptype() lost 4 * g_GraphTraceLen bytes plus the packed demod
buffer on each online `lf search` (~2 MB after the COTAG probe), and the
Visa2000 demod leaked on every `lf search`, online or offline.

Add free_buffer_savestate() and call it after the last restore in
check_chiptype(), demodTI(), demodVisa2k(), demodzx(),
try_detect_modulation() and t55xx_psk_untrim_head(), including the
early-return and success paths that never restored.

Reported with the check_chiptype() diagnosis and fix by @BeheSQ.

Fixes #3675

Co-Authored-By: Grok Bot <noreply@users.noreply.github.com>
2026-10-11 06:51:44 +08:00
dxl 2b0514923d FPGA: rename all ssp frame set/clr definition. 2026-10-10 16:08:27 +08:00
dxl 36bfb81538 FPGA: lo_read.v merged. 2026-10-10 16:00:06 +08:00
dxl 42bf0d4926 FPGA: lo_adc.v merged. 2026-10-10 15:54:03 +08:00
dxl 7666e84440 FPGA: lo_edge_detect.v merged. 2026-10-10 15:18:50 +08:00
dxl 3e501de109 FPGA: hi_iso14443a.v merged. 2026-10-10 12:04:51 +08:00
dxl 8752c8acdc FPGA: Use $signed instead of the minus sign (-) to improve compatibility across different synthesis tools. 2026-10-10 10:30:07 +08:00
dxl 31b0ece921 FPGA: hi_simulate.v merged. 2026-10-10 09:41:25 +08:00
dxl 9d0d58ca4b FPGA: hi_sniffer.v merged. 2026-10-10 09:29:15 +08:00
dxl e1ec61e80f FPGA: hi_reader.v merged. 2026-10-09 20:23:07 +08:00
dxl a2b1389d4c FPGA: hi_get_trace.v merged. 2026-10-09 18:26:38 +08:00
dxl 2d3de66488 FPGA: hi_flite.v merged. 2026-10-09 17:14:53 +08:00
dxl b1795a9e7e FPGA: Added 'FPGA_CMD_SET_PWR_PWM_LOW_COUNT' cmd on PM5 platform. 2026-10-09 11:43:59 +08:00
dxl 52e4f6ba92 FPGA: Specify the bit width to comply with the [IEEE 1364] standard to resolve synthesis tool warnings. 2026-10-09 11:33:10 +08:00
Matthew Carroll 3ba49c6a61 Merge remote-tracking branch 'upstream/master' into fix/t55xx-detect-pwd-guard
# Conflicts:
#	CHANGELOG.md
2026-10-07 09:11:55 -07:00
Tom HarknessandClaude Sonnet 5 99d7b02957 doc: update PM5-FLIPPER-USAGE.md to current CEP state
RF over CEP works now that the FPGA bitstream step is done - it was
never actually CEP-blocked. Note CMD_CEP_STATUS (Hardware Status
dashboard) and the real open bug (Read Hitag2 over CEP fails with
stale cached data, firmware-side). SPI bit-order/phase is confirmed,
not pending.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-07 08:23:38 +11:00
Innocent Bystander a48ce253f7 adding an entry to CHANGELOG.md per git PR note 2026-10-06 14:57:09 +02:00
Innocent Bystander dfe5f23ae3 Change references to sim014.bin to sim024.bin to reflect the current sim firmware. 2026-10-06 14:57:09 +02:00
Innocent Bystander 0fe89aef1d Added CHANGELOG.md entry per github comment. 2026-10-05 22:31:37 -04:00
Tom HarknessandClaude Sonnet 5 dd8bf6c184 Add CHANGELOG entry for CMD_CEP_STATUS
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-04 14:42:29 +02:00
Tom HarknessandClaude Sonnet 5 ac9c402e13 PM5: add CMD_CEP_STATUS, a compact hardware-status snapshot
For the Flipper Zero FAP's status page: hw status/CMD_STATUS replies
entirely via free-text Dbprintf packets the FAP's frame layer discards,
with nothing structured on the terminating ack. CMD_CEP_STATUS follows
the CMD_CAPABILITIES precedent instead - one binary cep_status_t reply
covering CEP handshake state, BWM battery telemetry, and a firmware
version string.

Always replies PM3_SUCCESS; fields for a feature this build lacks
(no WITH_CEP, no WITH_BWM_STATUS) read as zero rather than failing the
command, so any client can call it unconditionally. cep_attached isn't
included yet - its getter (cep_is_attached()) only exists on the
not-yet-merged WFI-skip responsiveness branch (#3687); can be appended
later following capabilities_t's own append-only convention.

Stacked on the pm5-bwm-battery-telemetry branch (CMD_PM5_BWM_GET_BATTERY),
which this command's battery field reuses via bwm_read_battery_info().

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-04 14:42:29 +02:00
Tom HarknessandClaude Sonnet 5 7bd39effbd PM5 CEP: widen reply-header timeout, resync SPI on desync evidence
The Flipper master only clocks the bus in bursts roughly every ~120ms
(its own idle poll cadence). CEP_SPI_BYTE_TIMEOUT (~3-10ms real time)
is ~20x shorter than that gap, so cep_spi_write_sync()'s first reply
byte - the one racing against the master's next poll - was giving up
long before the master actually showed up. Measured CEP reply success
at ~22% before this fix, ~100% after, across repeated LA-captured test
runs.

Fix: a separate, ~20x longer timeout (CEP_SPI_HEADER_BYTE_TIMEOUT) used
only for the first two length-header bytes of a reply - the ones that
can land in the gap. Every byte after that stays on the short timeout,
since once the master starts clocking it stays mid-CS and keeps going.

Also makes cep_spi_data_available() call cep_spi_resync() on its two
existing desync-evidence paths (sync-preamble discard overflow, an
implausible length header) instead of just returning false - those are
exactly the AT32 errata ES0003 corruption cep_spi_resync() already
exists to recover from; silently returning false left SPI1 in that bad
state until a later CRC/length check happened to catch it.

Stacked on fix-cep-spi-reliability (#3686, open) - this builds directly
on cep_spi_resync()/cep_spi_wait_tdbe()'s bounded-wait rewrite from that
PR and can't be tested standalone without it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-04 14:39:54 +02:00