38 Commits
Author SHA1 Message Date
Philippe Teuwen 634edd11fd make style 2026-09-16 19:00:50 +02:00
iceman1001 ace5d63ff9 hitag2: fix simulation against genuine readers, add restore, fix info
Simulation now completes the full exchange with a genuine Paxton reader in
password mode, and crypto mode read/write passes Proxmark-to-Proxmark.

Firmware:
- SOF was one bit period short. The lead-in that compensated for the lost
  head half bit was removed and nothing replaced it, so readers rejected
  every answer with a second START_AUTH. Default is now 6.
- The edge-detect threshold was latched before being measured, so the value
  chosen depended on whether the Proxmark was in a field when sim started.
  It is now measured on field entry and re-armed when the reader leaves.
- The percentile walk latched on run-scoped variables, so one attempt made
  outside a field poisoned every later one.
- Field loss was detected from TIMESTAMP, which is free-running MCU time and
  never stalls. Detect it from receive silence instead.
- Frames of a length the protocol does not have no longer reach the state
  machine; our own modulation tail was resetting the session and breaking
  every write.
- A dropped edge merges two or three reader bit periods into one gap. Those
  bits were discarded; they are now recovered by decomposition, which is what
  made crypto mode work (AUTH decode 15% -> 100%).
- Threshold selection is limited to 20 and 32 and settles in under 25 ms.

Client:
- lf hitag info printed a hardcoded 0x06 and reported 'Password mode' for
  every tag. It now reads page 3, takes -k (4 bytes password, 6 bytes
  crypto), and says so when the config cannot be read.
- lf hitag restore: writes a dump back in dependency order - user pages,
  then key material, then config last - validates the config byte, and
  prints the credential the tag will require afterwards.
- lf hitag crack2 now reports why it failed instead of a bare 'fail'.
- trace list: bit count moved to its own column, relative mode shows a
  Frame Delay Time row rather than renaming Start/End, --frame and -r
  rejected together.
2026-09-04 13:20:29 +02:00
dxl 2a018af97c lfadc HAL is completed, some remark and unused code can be deleted. 2026-08-23 04:50:56 +08:00
dxl e3511c5350 Used HAL layer
in appmain.c and cmd added.
in cmd.c and add some code for test CEP
in em4x50.c(Do not timeout--)
in em4x70.c
in emvsim.c
in epa.c
in felica.c
in felicasim.c
in felicasim.c
in hfops.c
in hfsnoop.c
in hitag2.c
in hitag_common.c(Cross-platform implementation is incomplete.)
in hitagS.c
in hitagu.c
in i2c.c(Incomplete, continue to abstract.)
in i2c_direct.c
in iclass.c
in iso14443a.c(Sniff no finish yet)
in iso14443b.c and fixed bug for st25
in iso15693.c
in legicrf.c
in legicrfsim.c
in lfadc.c(lf_count_edge_periods_ex() improved)
in lfops.c(TI tag no finish yet)
in lfsampling.c
in lfzx.c
in mifarecmd.c
in mifaredesfire.c
in mifaresim.c
in mifaresniff_disabled.c
in mifareutil.c
in pcf7931.c
in sam_xxx
in secc & seos
in start.c
in thinfilm.c
in utils
2026-08-19 15:32:39 +02:00
rfidgeek1337 f7f0605207 Update lfadc.c
Signed-off-by: rfidgeek1337 <rfidgeek1337@proton.me>
2025-06-11 18:14:19 +02:00
rfidgeek1337 2dfb0706fa Update lfadc.c
Signed-off-by: rfidgeek1337 <rfidgeek1337@proton.me>
2025-06-11 18:13:21 +02:00
rfidgeek1337 c4e019ec60 LF HITAG: Adjust timing for LF ADC measurements to increase stability when the tag is in public mode/TTF mode
Signed-off-by: rfidgeek1337 <rfidgeek1337@proton.me>
2025-06-11 18:07:51 +02:00
iceman1001 4304372858 tweaking felica timings to see if it gets better results 2024-04-22 10:41:28 +02:00
iceman1001 679f2d4feb remove comments 2024-04-03 17:15:12 +02:00
iceman1001 5a7bb278aa style 2024-02-20 11:14:44 +01:00
Philippe Teuwen b703bb746b Adapting license headers, WIP 2022-01-06 02:20:38 +01:00
Łukasz Jurczyk 218a4ba2ec Added ledcontrol to lf functions 2021-11-18 15:00:54 +01:00
Philippe Teuwen 88308ea727 typos 2021-10-10 01:35:45 +02:00
Philippe Teuwen 5b54385347 rename globals 2021-08-21 23:08:26 +02:00
iceman1001 b993236be2 send sync signal to clock when reset 2021-06-24 17:20:48 +02:00
iceman1001 27184d7f5b style 2021-04-08 10:44:31 +02:00
iceman1001 7d83f5de82 adaptations to lf hitag.. 2021-04-04 17:08:19 +02:00
Philippe Teuwen 4ed57c7c4d make style 2020-08-13 12:25:04 +02:00
iceman1001 9130474818 adaptations to new code 2020-07-02 12:33:53 +02:00
iceman1001 1c7de4a8c3 fix: "lf search" / "lf hitag" - no more stack overflow in hitag reader 2020-06-23 11:13:49 +02:00
Philippe Teuwen b556810776 armsrc: clarify static vars vs global vars, part 2 2020-05-19 17:25:58 +02:00
Philippe Teuwen 3e7512a5d5 armsrc: clarify static vars vs global vars 2020-05-19 17:05:43 +02:00
Philippe Teuwen 026707b960 arm: fix prototypes 2020-05-11 13:48:57 +02:00
iceman1001 1f5de5debd hitag sniff, use edgemode 2020-03-24 10:08:11 +01:00
iceman1001 d11716110f fix coverity 267215 2020-03-01 16:39:25 +01:00
iceman1001 cfcb049459 chg: hitag2 now obeys 'lf conf' divisor setting 2020-02-23 10:45:23 +01:00
iceman1001 b304adeeca hitag, determine adc levels to get better demodulation 2020-02-22 13:16:04 +01:00
iceman1001 9448ec4052 hitagstuff 2020-01-29 17:26:08 +01:00
iceman1001 60b444d5d8 no inline 2020-01-29 08:18:45 +01:00
iceman1001 04bca3cdb7 fix partial data acqusitions not use bigbuff_malloc 2020-01-29 04:37:10 +01:00
iceman1001 e0cd9c38da test: hitag to use decimation on sample to save space 2020-01-22 13:13:04 +01:00
iceman1001 cb67feee19 documentation 2020-01-17 17:06:46 +01:00
iceman1001 f25beac361 less checks in time critical loops 2020-01-17 14:25:57 +01:00
iceman1001 958754edf4 enforce following lf config 2020-01-16 10:42:39 +01:00
iceman1001 89bae75c55 hitag signal refactoring 2020-01-14 22:08:43 +01:00
iceman1001 0869cbc6ad Fix: 'lf config' - calling without param messes up all device settings. 2020-01-09 19:28:44 +01:00
iceman1001 f7156e7485 chg: adapted lfsampling, and swapped from 'silent' logic to the more natural 'verbose' logic 2020-01-07 22:05:01 +01:00
iceman1001 094c9905b0 hitag rework - WIP 2019-12-24 10:20:07 +01:00