1101 Commits

Author SHA1 Message Date
GameTec-live 1a014f9656 Merge pull request #407 from matteoscrugli/feature/lf-idteck-psk1-emulation
Deploy wiki to GitHub Pages with Jekyll / build (push) Failing after 13m20s
Deploy wiki to GitHub Pages with Jekyll / deploy (push) Has been skipped
Push handler / Create tagged release with artifacts (push) Has been skipped
Push handler / Create dev pre-release with artifacts (push) Failing after 13m45s
Push handler / Build Firmware (push) Failing after 12m20s
Feature/lf: add IDTECK PSK1 tag emulation and T55xx clone
dev
2026-05-15 14:00:46 +02:00
matteoscrugli 1e78976bd9 feat(lf): shift IDTECK command IDs to avoid collision with Jablotron PR #404
LupusE requested in the PR #407 review (2026-05-13) to move IDTECK
command IDs since PR #404 (Jablotron) also uses 3017 / 5010 / 5011.
Both PRs are open with the feature-freeze label; Jablotron retains
the original slots and IDTECK shifts up:

  DATA_CMD_IDTECK_WRITE_TO_T55XX: 3017 -> 3018
  DATA_CMD_IDTECK_SET_EMU_ID:     5010 -> 5012
  DATA_CMD_IDTECK_GET_EMU_ID:     5011 -> 5013

Files changed:
- firmware/application/src/data_cmd.h
- software/script/chameleon_enum.py

app_cmd.c references the constants by name only, no edit needed there.
2026-05-15 10:09:51 +02:00
matteoscrugli da8c788786 docs(changelog): add IDTECK LF protocol entry 2026-05-15 10:09:51 +02:00
matteoscrugli 729a7e56ea feat(cli): add lf idteck subgroup and extend lf clone with idteck type
Adds host-side CLI support for IDTECK:
- lf idteck econfig -s <slot> [--id <hex>]   set or read the emulated frame
- lf idteck write --id <hex>                 clone to a T55xx tag in reader mode
- lf clone -t idteck --id <hex>              same via the unified clone command
- hw slot list                                now renders Frame and Card ID
                                              for IDTECK slots

Input accepts 16 hex characters for the full 64-bit frame, or 8 hex
for the 32-bit payload (the fixed preamble 4944544B is auto-prepended).
A non-blocking informational note is emitted when the payload checksum
does not match the value computed from the card number, since some
readers validate this field and some do not.

Private helpers in chameleon_cli_unit.py (_idteck_compute_checksum,
_idteck_compose_frame, _idteck_frame_info) parse and compose IDTECK
frames and expose card-number-driven composition for a future
`lf idteck compose` command.
2026-05-15 10:09:51 +02:00
matteoscrugli 77e967c78b feat(lf): integrate IDTECK into firmware command and T55xx write paths
Exposes IDTECK to the host command protocol:
- DATA_CMD_IDTECK_SET_EMU_ID (5010) / GET_EMU_ID (5011) / WRITE_TO_T55XX (3017)
- Matching handlers in app_cmd.c for setting the emulated frame on
  the current LF slot, reading it back, and programming a T55xx tag

Adds write_idteck_to_t55xx in lf_reader_main (modeled on the other
per-protocol T55xx writers), wrapping idteck_t55xx_writer and the
shared write_t55xx helper.

After this commit the firmware is fully functional for IDTECK: a
host can set an emulated frame, read it back, or clone it to a T55xx.
The CLI wiring is added in the following commit.
2026-05-15 10:08:48 +02:00
matteoscrugli b8f070851c feat(lf): add IDTECK tag emulation (PSK1 RF/32)
Adds IDTECK as a new LF protocol for tag emulation. IDTECK is a PSK1
encoding at RF/32 with a 64-bit frame: a 32-bit fixed preamble
0x4944544B ("IDTK") followed by a 32-bit card payload (one-byte
checksum + 24-bit card number in byte-reversed layout, matching the
format used by the Proxmark3 client).

The modulator drives LF_MOD (load-modulation, same hardware path used
for FSK protocols like HID Prox) via the shared utils/psk1 helper,
producing a 62.5kHz subcarrier with a 180-degree phase flip at every
differential bit transition. Because PSK1 is differential the reader
decodes phase transitions between consecutive bits rather than
absolute phase, so carrier phase-lock is not required — a free-running
subcarrier from HFXO (±40ppm) stays within the tolerance of consumer
readers.

The 16us subcarrier period is below the counter_top minimum of 3 at
the legacy 125kHz PWM base clock used for ASK/FSK protocols. To avoid
rescaling every existing protocol, pwm_init now selects the base
clock based on the active tag type (predicate IS_PSK1_TYPE): 1MHz for
PSK1, 125kHz otherwise. Legacy protocols are untouched.

The comment in lf_sense_enable is updated to reflect that the absence
of carrier phase-lock (envelope-only tag-mode antenna taps) rules out
coherent demod but does not preclude differential-phase encodings
like the one introduced here.

T5577 cloning configuration uses the existing T5577_MODULATION_PSK1
symbol combined with RF/32 bitrate and 2 data blocks. Emulation read
is not added: the tag-emulation ADC path is 125kHz envelope-filtered,
so PSK demod would need a dedicated edge-timing decoder (left as a
follow-up).
2026-05-15 10:08:48 +02:00
matteoscrugli 5e2401587e feat(lf): add shared PSK1 wave-form helper for tag emulation
Factors out the PSK1 subcarrier generator into utils/psk1.{c,h}.
The helper takes a frame (MSB-first bytes), a bit count and a
destination wave-form buffer, and fills the buffer with PWM entries
expressing differential PSK1 as polarity flips at bit transitions.

No protocol uses this helper yet; it is introduced alone so that
individual PSK1 protocol files (starting with IDTECK in the next
commit) can plug into the same timing and encoding logic without
each re-implementing it.

The helper targets the 1MHz PWM base clock that will be selected by
pwm_init for PSK1 tag types; counter_top and duty constants are
defined accordingly.
2026-05-15 10:08:48 +02:00
GameTec-live 013f1f5ecd Merge pull request #420 from nieldk/PRNG-fix
Deploy wiki to GitHub Pages with Jekyll / build (push) Failing after 49s
Deploy wiki to GitHub Pages with Jekyll / deploy (push) Has been skipped
Push handler / Create dev pre-release with artifacts (push) Has been skipped
Push handler / Create tagged release with artifacts (push) Has been skipped
Push handler / Build Firmware (push) Failing after 24s
feat(firmware): Add configurable PRNG type for MF1 emulator
2026-05-15 08:19:14 +02:00
Niel Nielsen 1bf8229d26 Add files via upload 2026-05-14 13:21:31 +02:00
Niel Nielsen 7e48d5427a Add files via upload 2026-05-13 21:22:03 +02:00
Niel Nielsen 1954faf3af Fix: Device does not go to sleep, #421
The fix in EVT_END_SEQ0:
	1.	ANT_NO_MOD() — silences LF_MOD so the local drive no longer charges the peak detector
	2.	bsp_delay_ms(2) — 2ms settle, slightly above the ~2ms time constant so the detector drains to reflect only the external field
	3.	is_lf_field_exists() — now sees the real field state
	4.	If field gone → nrfx_pwm_stop() → EVT_STOPPED → lf_field_lost() runs correctly
	5.	If field present → ANT_MOD() restores modulation for the next PWM sequence​​​​​​​​​​​​​​​​
2026-05-13 21:13:57 +02:00
Niel Nielsen cba4b84c4a FIX MFDEs version detection
Fixes version detection of MFDes info
2026-05-13 12:31:24 +02:00
Niel Nielsen b973385f8f Add full DESFire key check command with 3K3DES support
Adds hf des chk and hf des info commands for MIFARE DESFire EV1/EV2/EV3 key checking and card info enumeration.

Tested against: DESFire EV1 (SAK 0x20, 2KB storage) via Chameleon Ultra v2.1 USB
2026-05-12 11:21:24 +02:00
Niel Nielsen 5a3c0f4354 Add Chameleon Ultra for Sailfish OS to compatible apps 2026-05-11 14:31:24 +02:00
Niel Nielsen cef8b42c26 make_style as that is best practise 2026-05-11 12:36:51 +02:00
Niel Nielsen 0038fdd959 Add files via upload 2026-05-11 11:26:45 +02:00
Niel Nielsen 8351a3e206 Add files via upload 2026-05-11 11:26:13 +02:00
Niel Nielsen 4e8227d331 Add files via upload 2026-05-11 11:09:24 +02:00
Niel Nielsen 0c5e5ba7a2 Add files via upload 2026-05-11 10:51:00 +02:00
Niel Nielsen 6ac9993a41 fix(auth-trace): correct AR/AT prng step counts and add AR decryption display
- prng_successor steps for AR were 32 (should be 64) and AT were 64
  (should be 96), one full 32-bit word off in each case
- AR keystream (ks2) was computed but discarded; AR decrypted value
  was never shown
- Reorder output to show expected → encrypted → decrypted for AR then AT
2026-05-11 10:45:54 +02:00
Niel Nielsen 43f4d55c2b Update app_cmd.c 2026-05-11 10:25:50 +02:00
Niel Nielsen d3f9a521cb Update app_cmd.c 2026-05-11 09:50:23 +02:00
Niel Nielsen 5f8f29c8b4 Update data_cmd.h 2026-05-11 09:48:31 +02:00
Niel Nielsen 9d8c52fbdb Add sleep timeout commands for configuration 2026-05-11 09:45:32 +02:00
Niel Nielsen 68f929b23f Add files via upload 2026-05-10 20:40:39 +02:00
Niel Nielsen 173f8d472e Add files via upload 2026-05-10 20:39:58 +02:00
Niel Nielsen a64798f8a7 Add files via upload 2026-05-10 19:48:06 +02:00
Niel Nielsen 5b12dd4e7e Add files via upload 2026-05-10 19:47:07 +02:00
Niel Nielsen 269d9eb283 Add files via upload 2026-05-10 19:39:42 +02:00
Niel Nielsen 2701e64755 Add files via upload 2026-05-10 19:15:34 +02:00
Niel Nielsen c0fd09b737 Add files via upload 2026-05-10 19:13:59 +02:00
Niel Nielsen e2ce3f3a29 Add files via upload 2026-05-10 17:05:43 +02:00
Niel Nielsen 4bfc18ae6f Add files via upload 2026-05-10 17:05:06 +02:00
GameTec-live f06efdf815 Merge pull request #413 from nieldk/t55write
Deploy wiki to GitHub Pages with Jekyll / build (push) Failing after 35s
Deploy wiki to GitHub Pages with Jekyll / deploy (push) Has been skipped
Push handler / Build Firmware (push) Failing after 34s
Push handler / Create dev pre-release with artifacts (push) Has been skipped
Push handler / Create tagged release with artifacts (push) Has been skipped
T55write
2026-05-08 17:26:51 +02:00
GameTec-live 1a769a0c4a Merge pull request #417 from azuwis/fix-hf-mf-eview
Push handler / Build Firmware (push) Failing after 30s
Deploy wiki to GitHub Pages with Jekyll / build (push) Failing after 13m2s
Deploy wiki to GitHub Pages with Jekyll / deploy (push) Has been skipped
Push handler / Create dev pre-release with artifacts (push) Has been skipped
Push handler / Create tagged release with artifacts (push) Has been skipped
fix: hf mf eview param error due to chunk exceeding 32-block limit
2026-05-07 21:20:58 +02:00
Niel Nielsen 394781a45f Add files via upload 2026-05-07 20:08:23 +02:00
Niel Nielsen 36daf7038c Add files via upload 2026-05-07 20:07:23 +02:00
Niel Nielsen f8b0ae6085 FEAT: hf 14a auth-trace 2026-05-07 17:46:53 +02:00
Niel Nielsen 5c4cf13124 Merge branch 'RfidResearchGroup:main' into t55write 2026-05-07 13:54:35 +02:00
GameTec-live cce9d5b48d Merge pull request #419 from azuwis/fix-hf14a-raw
Push handler / Build Firmware (push) Failing after 26s
Deploy wiki to GitHub Pages with Jekyll / build (push) Failing after 13m0s
Deploy wiki to GitHub Pages with Jekyll / deploy (push) Has been skipped
Push handler / Create dev pre-release with artifacts (push) Has been skipped
Push handler / Create tagged release with artifacts (push) Has been skipped
fix: hf14a_raw should return data bytes, not Response object
2026-05-07 11:24:48 +02:00
Zhong Jianxin d2c1f43a0e fix: hf14a_raw should return data bytes, not Response object
Callers treat the return value as bytes (len(), slicing), but hf14a_raw
was returning the Response object itself, causing TypeError.
2026-05-06 21:05:44 +08:00
Zhong Jianxin 874bb49485 fix: hf mf eview param error due to chunk exceeding 32-block limit
The firmware limits mf1_read_emu_block_data to at most 32 blocks per
request, but eview's chunk_count only honored data_max_length (256).
Added the same 32-block cap already used by esave.
2026-05-06 18:21:47 +08:00
Niel Nielsen bba432c579 Add files via upload 2026-05-01 20:14:24 +02:00
Niel Nielsen f7feda5dc9 Add files via upload 2026-05-01 18:45:52 +02:00
Niel Nielsen 8555f86c22 Merge branch 'RfidResearchGroup:main' into t55write 2026-05-01 17:52:45 +02:00
Niel Nielsen c63cc16bb5 Add files via upload 2026-05-01 17:50:32 +02:00
GameTec-live e4a6e74b45 Merge pull request #387 from naaraxi/main
Deploy wiki to GitHub Pages with Jekyll / build (push) Failing after 39s
Deploy wiki to GitHub Pages with Jekyll / deploy (push) Has been skipped
Push handler / Build Firmware (push) Failing after 24s
Push handler / Create dev pre-release with artifacts (push) Has been skipped
Push handler / Create tagged release with artifacts (push) Has been skipped
Support for changing the wake time in the client
2026-05-01 16:30:25 +02:00
naaraxi 0460d9b95e Support for changing the wake time in the client 2026-05-01 14:36:52 +03:00
GameTec-live d7b8e63966 Merge pull request #406 from nieldk/t55write
Push handler / Build Firmware (push) Failing after 28s
Deploy wiki to GitHub Pages with Jekyll / build (push) Failing after 13m20s
Deploy wiki to GitHub Pages with Jekyll / deploy (push) Has been skipped
Push handler / Create dev pre-release with artifacts (push) Has been skipped
Push handler / Create tagged release with artifacts (push) Has been skipped
hf 14a sniff improvements for nonce collection and crack, fence to catch missing or blocked mfkey binaries
2026-04-30 17:56:42 +02:00
Niel Nielsen 285d81b31e fix: restore executable permission to chameleon_cli_main.py 2026-04-28 20:36:26 +00:00