42 Commits
Author SHA1 Message Date
Aaron Tulino (Aaronjamt) 1f99ddd4db SEOS emulation support 2026-07-28 11:18:18 -07:00
Milan DavídekandClaude Opus 4.7 52f37bff8d Merge upstream/main into Jablotron PR #404
Resolved conflicts from upstream feature additions (IDTECK PR #407,
LF_T55XX_WRITE PR #413, ISO14443-4 T=CL emulation, HF14A scan-keep,
etc.) by keeping both sides where independent.

Command ID note for reviewer:
- Maintainer's IDTECK shift commit (1e78976) stated "Jablotron retains
  the original slots 3016 and 3017", but upstream had already taken
  3016 for DATA_CMD_LF_T55XX_WRITE. Only 3017 was actually free.
- Resolution: JABLOTRON_WRITE_TO_T55XX kept at 3017 (honors intent).
  JABLOTRON_SCAN moved 3016 -> 3019 (next free slot).
- 5xxx range: JABLOTRON_SET/GET_EMU_ID = 5010/5011 unchanged
  (IDTECK shifted to 5012/5013 as planned).

Python files parse cleanly. No duplicate command IDs in data_cmd.h
(3xxx and 5xxx ranges checked).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 13:51:54 +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
Milan DavídekandClaude Sonnet 4.6 fcb6eb4718 Add Jablotron LF tag support (read, emulate, write to T55xx)
Jablotron uses differential biphase (inverted) at RF/64, 64-bit frames:
  bits  0-15: 0xFFFF preamble
  bits 16-55: 40-bit data (5 bytes), bit 16 must be 0
  bits 56-63: 8-bit checksum = (sum of data bytes) XOR 0x3A

Firmware:
  - rfid/nfctag/lf/protocols/jablotron.c  - encoder/decoder codec
  - rfid/nfctag/lf/utils/diphase.c        - inverted-biphase state machine
    (shared util, reusable by other diphase protocols)
  - rfid/reader/lf/lf_jablotron_data.c    - GPIO-interval reader path
  - app_cmd.c: JABLOTRON_SCAN, JABLOTRON_WRITE_TO_T55XX,
                JABLOTRON_SET_EMU_ID, JABLOTRON_GET_EMU_ID
  - tag_base_type.h: TAG_TYPE_JABLOTRON enum
  - t55xx.h: T5577_JABLOTRON_CONFIG (DIPHASE modulation, RF/64)
  - lf_tag_em.c: load callback, factory-default data, save callback

Python CLI (software/script/):
  - lf jablotron read               - scan a real tag
  - lf jablotron write --id         - clone onto T55xx
  - lf jablotron econfig -s N --id  - set emulator ID on a slot
  - hw slot list shows Jablotron ID and decimal card number

Python test (software/script/tests/test_jablotron_modulator.py):
  Pure-Python round-trip validator that reimplements the modulator and
  diphase decoder, expands PWM entries to an edge stream, and confirms
  the decoded data matches the input.  Regression guard for both the
  firmware's double-frame encoding and the single-frame variant.

Notable PWM design choices:
  - Constant-level diphase encoding uses the same PAC pattern:
    CC=0 for LOW, CC=counter_top+1 for HIGH.  counter_top=31 gives
    exactly 32 carrier cycles per half-bit at NRF_PWM_CLK_125kHz.
  - The 64-bit frame is encoded twice in the 256-entry PWM buffer with
    the internal level variable persisting between the two passes.
    This is required for clean PWM looping: a single 64-bit diphase
    frame with an odd number of zero bits ends at a level opposite the
    starting level, leaving no transition at the loop boundary where
    the reader expects one.  Encoding twice guarantees a continuous
    diphase stream regardless of the data's zero-count parity.

Reference: Proxmark3 cmdlfjablotron.c

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 14:15:55 +02:00
Niel NielsenandNiel Nielsen efa2ea2c7b protocol ISO 14443-4 and emv scan, loading json file from PM3rdv4 2026-04-07 10:23:58 +02:00
Kevin YuanandGitHub 3924ad134b Merge branch 'main' into pac-emulation 2026-04-02 14:17:42 +01:00
Niel Nielsen e02918b867 feat(lf): add EM4x05/EM4x69 reader (RTF gap protocol) 2026-04-02 07:34:16 +02:00
Kevin Yuan c494a2cc81 Add PAC/Stanley LF tag reading support
Implements NRZ/Direct modulation decoder for PAC/Stanley 125kHz cards
using SAADC ADC sampling with spike-aware threshold calibration.
The LC antenna produces brief high-amplitude transients at NRZ transitions
which are clipped before the moving-average filter to isolate the actual
data levels.
2026-03-24 14:37:25 +00:00
Jozef Bernadic 36645932de feat(lf): add ioProx support (reader, emulation and T55xx writer) 2026-03-03 16:24:08 +01:00
Oleg Moiseenko e2c6bfc9e1 Adds generic ADC read functionality
This introduces a new command to sample the ADC values from the LF antenna and returns them to the user.
2025-10-09 00:32:07 +03:00
Derek Jamison 8c670f8554 Add LF Viking support 2025-08-29 11:00:02 -04:00
TeCHiScyandGitHub 098e0a914b feat: add lf HIDProx read, t55xx write, emulate function (#267)
* feat: add lf HIDProx read, t55xx write, emulate function

code quaility:
- consistance: simulation -> emulation, label -> tag
- machine translated unreadable comments are made native

logic:
- newly added cli command includes: `lf hid prox read`, `lf hid prox write`, `lf hid prox econfig`
- machester demodulator is simplified
- various wiegand formats of HIDProx are supported
- goertzel algorithm is used in  HIDProx FSK demod
- lf read is refactored using stream/feed pattern to boost scan speed
- t55xx write is refactored to share same logic between em410x & HIDProx
- lf emulating is refactored to use PWM peripheral, allowing more card type to be added

closes: #212, #210

* chore: remove not implemented wiegand format comments

* fix: build ci

* fix: build ci

* fix: build ci

* fix: build ci
2025-08-04 07:01:53 +02:00
turbocool3r 248f3b2839 Add support for Ultralight emulation.
This version only emulates MF0ICU1 properly.
2024-06-19 22:55:43 +03:00
Philippe Teuwen 963d4d62f1 Deduce APP_FW_VER from git tag 2023-09-25 23:32:01 +02:00
dxl 2a98245700 Security BLE implemented 2023-08-28 01:40:04 +08:00
Philippe Teuwen e43e668594 Remove tabs & spaces at end of lines 2023-08-23 00:18:31 +02:00
Philippe Teuwen 8d5643d1e9 Add option to enable sdk_validation.h 2023-08-21 01:02:52 +02:00
Philippe TeuwenandGitHub 9db1671be5 Merge pull request #63 from augustozanellato/factory_reset
Add factory reset command
2023-08-19 00:46:39 +02:00
Philippe Teuwen 8e093d00b6 Enable watchdog 2023-08-18 23:11:03 +02:00
Augusto Zanellato 7b76aefd5e ACK command and use delayed reset 2023-08-18 22:35:39 +02:00
Philippe Teuwen bbf5f3027b NRF_LOG: add option to activate UART backend on SWO pin, see How_to_use_Firmware.md 2023-08-18 22:31:07 +02:00
Nemanja Nedeljkovic 0b5290706b Merge 2023-08-17 12:24:52 +02:00
Philippe TeuwenandGitHub 32e0cdf16b Merge pull request #50 from domints/add-animation-modes-support
Add animation modes support
2023-08-16 23:48:07 +02:00
Philippe Teuwen 92a3f0966f suppress GCC warnings in nRF SDK and restore -Warray-bounds and -Wsizeof-array-div 2023-08-16 23:26:30 +02:00
Philippe Teuwen 5afd3332bd Suppress GCC 12 linker warnings about missing stubs 2023-08-16 23:26:30 +02:00
Nemanja Nedeljkovic 83811861cc Add git version command 2023-08-11 18:01:02 +02:00
Dominik Szymański f30ff7054c Add animation modes support 2023-08-10 22:26:22 +02:00
dxl 611d01ac37 High performance of mf1 simulation implemented 2023-07-31 14:44:38 +08:00
DXLandGitHub e7264bddaa Merge pull request #17 from ca1e/ntag
Add Ntag21x Support
2023-07-19 10:37:22 +08:00
Philippe Teuwen db0bf483ce Fix cflags for gcc < 12 2023-07-14 10:31:32 +02:00
dxl 029c1c84b2 After passing the test compilation, merge the commit to the main branch. 2023-07-03 15:07:35 +08:00
Foxushkaanddxl 84c9380f83 Expose nfc_tag_mf1_is_detection_enable and fix typo 2023-07-03 15:00:15 +08:00
Foxushkaanddxl 4a7cf188a1 Fix compilation on latest compilator version (12)
CFLAGS -Wno-error
2023-07-03 15:00:15 +08:00
derGraph c2f78e2a36 Adding STLink Support
Adding STLink Support: make flash_stlink uploads program over openocd.
2023-06-10 20:37:13 +02:00
ca1e 2a7604d8cc ntag21x implement 2023-06-09 18:55:15 +08:00
dxl 0f05ec3da8 Add saadc resource to project. 2023-06-06 20:25:54 +08:00
dxl ad331a0f0a move some resource. 2023-03-14 15:37:17 +08:00
dxl deeec029e3 RGB water lamp. 2023-02-22 18:32:27 +08:00
dxl 7311be46a5 Use common resources to provide hardware-related interfaces and functions. 2023-02-22 11:53:33 +08:00
dxl 23ab54a3a3 Application completes the hardware distinction between ultra and lite versions. 2023-02-17 17:47:40 +08:00
dxl 8b4a6807c2 application project from keil change to gcc. 2023-01-01 23:30:48 +08:00