Hygiene: drop dead code, re-raise SystemError, resource+doc cleanup, add LICENSE

- pd.py: remove _lock_etu_from_edges (long-disabled) and the no-op
  while-True FIND START wrapper.
- pd.py: re-raise SystemError (libsigrokdecode's clean EOF signal) in the
  six 'except Exception: pass' guards so put()/wait() at end-of-capture
  exits cleanly instead of being swallowed.
- pd.py: fix _measure_clock_period docstring (averages, not robust-min);
  drop stale 'line 1633' comment; document the synthetic pcap UDP header
  (zero IP checksum / fixed loopback+ports are intentional).
- signal_diagnostic.py: add --max-samples cap + document whole-capture
  RAM cost; fix stale '--rst/--vcc=ignore' guidance (-> --no-rst/--no-vcc).
- tests: make test_valid_cla_interindustry_classes use subTest (was a
  no-op tuple expression).
- start.sh/start.bat: note the -A multi-spec form is sigrok-cli 0.7.x.
- Remove stale tests/baseline_new.txt (v1.1.3-era, ATR-included mode).
- Add top-level LICENSE (GPL-2.0-or-later).
This commit is contained in:
catarrh committed 2026-09-11 01:33:12 +03:00
1 parent e6ff3a2e14
commit e1903649a7
7 files changed
+356 -521

No files matched your search

-476
View File
@@ -1,476 +0,0 @@
=== Baseline captured 2026-09-04T22:55:20+03:00 ===
=== test_8 ATR-included ===
('iso7816 decoder v1.1.3',)
('Invalid TS byte 0x90 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x90 - skipped
('Invalid TS byte 0x00 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x00 - skipped
('Invalid TS byte 0xf7 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0xf7 - skipped
('Invalid TS byte 0xff (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0xff - skipped
('Invalid TS byte 0x10 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x10 - skipped
('Invalid TS byte 0x95 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x95 - skipped
('Invalid TS byte 0x7a (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x7a - skipped
('Invalid TS byte 0xff (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0xff - skipped
('Invalid TS byte 0x10 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x10 - skipped
('warm reset: re-arming ATR hunt',)
CHKSUM ERROR count: 28
reader exchanges : 37
capture ATRs : 2
capture APDUs : 54
byte-exact matches (LCS) : 28
reader exchanges not in capture (pre-capture / dropped): 9
capture APDUs not in reader log:
- proactive/CAT (unlogged by reader SDK): 17
- valid exchanges (reader retries/dupes): 9
- GARBAGE (mis-framed/desync): 0
Degradation metrics:
- BAD_FCS (desynced by decoder): 0
- payload mismatches (LCS-matched, bytes differ): 0
- suspicious CLA: 0
RESULT: OK - capture fully explained (reader + CAT + valid retries)
=== test_8 mid-session ===
('iso7816 decoder v1.1.3',)
('etu recovered (samples):', 1237)
('warm reset: re-arming ATR hunt',)
('Invalid TS byte 0x95 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x95 - skipped
('Invalid TS byte 0x7a (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x7a - skipped
(382251, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 0, 1, 1, 1, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 0, 0, 1, 1, 1, 1, 1, 1, 1]
('Invalid TS byte 0xfc (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0xfc - skipped
(7362370, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 1, 1, 1, 1, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
('Invalid TS byte 0xff (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0xff - skipped
(14335815, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 1, 1, 1, 1, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
('Invalid TS byte 0xff (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0xff - skipped
('Invalid TS byte 0xfb (pre-activation?), resyncing',)
CHKSUM ERROR count: 38
reader exchanges : 37
capture ATRs : 2
capture APDUs : 54
byte-exact matches (LCS) : 28
reader exchanges not in capture (pre-capture / dropped): 9
capture APDUs not in reader log:
- proactive/CAT (unlogged by reader SDK): 17
- valid exchanges (reader retries/dupes): 9
- GARBAGE (mis-framed/desync): 0
Degradation metrics:
- BAD_FCS (desynced by decoder): 0
- payload mismatches (LCS-matched, bytes differ): 0
- suspicious CLA: 0
RESULT: OK - capture fully explained (reader + CAT + valid retries)
=== test_7 ATR-included ===
('iso7816 decoder v1.1.3',)
('warm reset: re-arming ATR hunt',)
('Invalid TS byte 0x07 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x07 - skipped
('Invalid TS byte 0x95 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x95 - skipped
('Invalid TS byte 0x7a (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x7a - skipped
('Invalid TS byte 0xff (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0xff - skipped
('Invalid TS byte 0x10 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x10 - skipped
('Invalid TS byte 0x95 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x95 - skipped
('Invalid TS byte 0x7a (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x7a - skipped
(23123034, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 1, 1, 1, 1, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
('Invalid TS byte 0xff (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0xff - skipped
CHKSUM ERROR count: 166
reader exchanges : 37
capture ATRs : 4
capture APDUs : 10
byte-exact matches (LCS) : 10
reader exchanges not in capture (pre-capture / dropped): 27
capture APDUs not in reader log:
- proactive/CAT (unlogged by reader SDK): 0
- valid exchanges (reader retries/dupes): 0
- GARBAGE (mis-framed/desync): 0
Degradation metrics:
- BAD_FCS (desynced by decoder): 0
- payload mismatches (LCS-matched, bytes differ): 0
- suspicious CLA: 0
RESULT: OK - capture fully explained (reader + CAT + valid retries)
=== test_7 mid-session ===
('iso7816 decoder v1.1.3',)
('warm reset: re-arming ATR hunt',)
('etu recovered (samples):', 1236)
('warm reset: re-arming ATR hunt',)
('ENDATR', b'3b9f95801fc78031e073fe21136364035b83079000f7')
(45481390, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 1, 1, 1, 1, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
(45636295, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 1, 1, 1, 1, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
('Invalid TS byte 0x9f (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x9f - skipped
('Invalid TS byte 0x95 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x95 - skipped
('Invalid TS byte 0x80 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x80 - skipped
('Invalid TS byte 0x1f (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x1f - skipped
('Invalid TS byte 0xc7 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0xc7 - skipped
('Invalid TS byte 0x80 (pre-activation?), resyncing',)
CHKSUM ERROR count: 162
reader exchanges : 37
capture ATRs : 4
capture APDUs : 10
byte-exact matches (LCS) : 10
reader exchanges not in capture (pre-capture / dropped): 27
capture APDUs not in reader log:
- proactive/CAT (unlogged by reader SDK): 0
- valid exchanges (reader retries/dupes): 0
- GARBAGE (mis-framed/desync): 0
Degradation metrics:
- BAD_FCS (desynced by decoder): 0
- payload mismatches (LCS-matched, bytes differ): 0
- suspicious CLA: 0
RESULT: OK - capture fully explained (reader + CAT + valid retries)
=== xiaomi_phone ATR-included ===
('iso7816 decoder v1.1.3',)
('Invalid TS byte 0xf4 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0xf4 - skipped
(11685168, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 1, 1, 1, 1, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
('Invalid TS byte 0xff (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0xff - skipped
(11703683, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 1, 0, 1, 0, 0, 0, 0, 0])
iso7816-1: CHKSUM ERROR bits=[0, 1, 1, 0, 1, 0, 0, 0, 0, 0]
('Invalid TS byte 0x0b (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x0b - skipped
('Invalid TS byte 0xe8 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0xe8 - skipped
('Invalid TS byte 0xbc (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0xbc - skipped
(11739309, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 0, 0, 1, 1, 1, 0, 1, 0])
iso7816-1: CHKSUM ERROR bits=[0, 1, 0, 0, 1, 1, 1, 0, 1, 0]
('Invalid TS byte 0xb9 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0xb9 - skipped
('Invalid TS byte 0x5c (pre-activation?), resyncing',)
CHKSUM ERROR count: 142
reader exchanges : 0
capture ATRs : 0
capture APDUs : 0
byte-exact matches (LCS) : 0
reader exchanges not in capture (pre-capture / dropped): 0
capture APDUs not in reader log:
- proactive/CAT (unlogged by reader SDK): 0
- valid exchanges (reader retries/dupes): 0
- GARBAGE (mis-framed/desync): 0
Degradation metrics:
- BAD_FCS (desynced by decoder): 0
- payload mismatches (LCS-matched, bytes differ): 0
- suspicious CLA: 0
RESULT: OK - capture fully explained (reader + CAT + valid retries)
=== xiaomi_phone mid-session ===
('iso7816 decoder v1.1.3',)
('etu recovered (samples):', 53)
(11673977, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 0, 1, 0, 0, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 0, 0, 1, 0, 0, 1, 1, 1, 1]
(11695589, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 0, 0, 0, 0, 0, 0, 0, 0])
iso7816-1: CHKSUM ERROR bits=[0, 1, 0, 0, 0, 0, 0, 0, 0, 0]
(11697509, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 1, 0, 0, 0, 0, 0, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 0, 1, 0, 0, 0, 0, 0, 1, 1]
(11698149, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 1, 0, 0, 0, 0, 0, 0, 0])
iso7816-1: CHKSUM ERROR bits=[0, 0, 1, 0, 0, 0, 0, 0, 0, 0]
(11698789, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 0, 0, 0, 0, 0, 0, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 0, 0, 0, 0, 0, 0, 1, 1]
(11699429, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 1, 0, 0, 0, 0, 0, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 0, 1, 0, 0, 0, 0, 0, 1, 1]
(11701349, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 0, 0, 0, 0, 0, 0, 0, 0])
iso7816-1: CHKSUM ERROR bits=[0, 1, 0, 0, 0, 0, 0, 0, 0, 0]
(11701989, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 0, 0, 1, 0, 0, 1, 0, 0])
iso7816-1: CHKSUM ERROR bits=[0, 1, 0, 0, 1, 0, 0, 1, 0, 0]
(11709030, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 1, 0, 0, 0, 0, 0, 0, 0])
iso7816-1: CHKSUM ERROR bits=[0, 0, 1, 0, 0, 0, 0, 0, 0, 0]
CHKSUM ERROR count: 10140
reader exchanges : 0
capture ATRs : 0
capture APDUs : 620
byte-exact matches (LCS) : 0
reader exchanges not in capture (pre-capture / dropped): 0
capture APDUs not in reader log:
- proactive/CAT (unlogged by reader SDK): 18
- valid exchanges (reader retries/dupes): 602
- GARBAGE (mis-framed/desync): 0
Degradation metrics:
- BAD_FCS (desynced by decoder): 0
- payload mismatches (LCS-matched, bytes differ): 0
- suspicious CLA: 0
RESULT: OK - capture fully explained (reader + CAT + valid retries)
=== samsung_phone_sample ATR-included ===
('iso7816 decoder v1.1.3',)
(3125821, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 0, 1, 1, 1, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 0, 0, 1, 1, 1, 1, 1, 1, 1]
('Invalid TS byte 0xfc (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0xfc - skipped
('Invalid TS byte 0x03 (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x03 - skipped
(21909783, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 0, 1, 1, 1, 1, 0, 1, 0])
iso7816-1: CHKSUM ERROR bits=[0, 0, 0, 1, 1, 1, 1, 0, 1, 0]
('Invalid TS byte 0xbc (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0xbc - skipped
(21952849, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 1, 1, 1, 1, 1, 1, 0, 0])
iso7816-1: CHKSUM ERROR bits=[0, 1, 1, 1, 1, 1, 1, 1, 0, 0]
('Invalid TS byte 0x7f (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x7f - skipped
(21969301, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 1, 1, 1, 0, 0, 0, 1, 0])
iso7816-1: CHKSUM ERROR bits=[0, 1, 1, 1, 1, 0, 0, 0, 1, 0]
('Invalid TS byte 0x8f (pre-activation?), resyncing',)
iso7816-1: Invalid TS byte 0x8f - skipped
('Invalid TS byte 0xfe (pre-activation?), resyncing',)
CHKSUM ERROR count: 2062
reader exchanges : 0
capture ATRs : 0
capture APDUs : 2
byte-exact matches (LCS) : 0
reader exchanges not in capture (pre-capture / dropped): 0
capture APDUs not in reader log:
- proactive/CAT (unlogged by reader SDK): 0
- valid exchanges (reader retries/dupes): 2
- GARBAGE (mis-framed/desync): 0
Degradation metrics:
- BAD_FCS (desynced by decoder): 0
- payload mismatches (LCS-matched, bytes differ): 0
- suspicious CLA: 0
RESULT: OK - capture fully explained (reader + CAT + valid retries)
=== samsung_phone_sample mid-session ===
('iso7816 decoder v1.1.3',)
('etu recovered (samples):', 72)
(3272987, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 1, 1, 1, 1, 1, 1, 1, 0])
iso7816-1: CHKSUM ERROR bits=[0, 0, 1, 1, 1, 1, 1, 1, 1, 0]
(3273839, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 0, 1, 1, 0, 1, 1, 1, 0])
iso7816-1: CHKSUM ERROR bits=[0, 0, 0, 1, 1, 0, 1, 1, 1, 0]
('etu recovered (samples):', 71)
(21919147, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 1, 0, 1, 1, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 0, 1, 0, 1, 1, 1, 1, 1, 1]
(22026940, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 1, 0, 1, 1, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 0, 1, 0, 1, 1, 1, 1, 1, 1]
(22831386, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 1, 1, 1, 1, 0, 0, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 1, 1, 1, 1, 0, 0, 1, 1]
(22850665, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 1, 1, 1, 1, 1, 0, 1, 0])
iso7816-1: CHKSUM ERROR bits=[0, 1, 1, 1, 1, 1, 1, 0, 1, 0]
(22853174, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 1, 1, 1, 1, 0, 1, 1, 0])
iso7816-1: CHKSUM ERROR bits=[0, 1, 1, 1, 1, 1, 0, 1, 1, 0]
(22855060, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 1, 0, 1, 1, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 0, 1, 0, 1, 1, 1, 1, 1, 1]
(22873632, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 1, 1, 1, 1, 1, 1, 1, 0])
CHKSUM ERROR count: 1514
reader exchanges : 0
capture ATRs : 1
capture APDUs : 49
byte-exact matches (LCS) : 0
reader exchanges not in capture (pre-capture / dropped): 0
capture APDUs not in reader log:
- proactive/CAT (unlogged by reader SDK): 0
- valid exchanges (reader retries/dupes): 44
- GARBAGE (mis-framed/desync): 5
GARBAGE: 00a41f04026f38ff61
GARBAGE: 00a40004026f07ff61
GARBAGE: 00a40004026f78ff61
GARBAGE: 00a4000402ff6fdfff
GARBAGE: 00a40004026fe3ff61
Degradation metrics:
- BAD_FCS (desynced by decoder): 6
in GARBAGE: 5, in retries: 1, in CAT: 0, in matched: 0
- payload mismatches (LCS-matched, bytes differ): 0
- suspicious CLA: 0
RESULT: UNCLEAN - 5 mis-framed capture APDU(s)
=== sunrise_phone_sample ATR-included ===
('iso7816 decoder v1.1.3',)
('ENDATR', b'3b9f96801fc68031e073fe211b644127910082900037')
CHKSUM ERROR count: 0
reader exchanges : 0
capture ATRs : 1
capture APDUs : 1077
byte-exact matches (LCS) : 0
reader exchanges not in capture (pre-capture / dropped): 0
capture APDUs not in reader log:
- proactive/CAT (unlogged by reader SDK): 5
- valid exchanges (reader retries/dupes): 1072
- GARBAGE (mis-framed/desync): 0
Degradation metrics:
- BAD_FCS (desynced by decoder): 0
- payload mismatches (LCS-matched, bytes differ): 0
- suspicious CLA: 0
RESULT: OK - capture fully explained (reader + CAT + valid retries)
=== sunrise_phone_sample mid-session ===
('iso7816 decoder v1.1.3',)
('etu recovered (samples):', 5723)
(88911990, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 1, 0, 1, 1, 0, 0, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 0, 1, 0, 1, 1, 0, 0, 1, 1]
(92269756, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 0, 1, 1, 0, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 0, 1, 1, 0, 1, 1, 1, 1]
(93979892, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 0, 1, 1, 0, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 0, 1, 1, 0, 1, 1, 1, 1]
(94115907, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 1, 1, 1, 1, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
(95206798, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 0, 1, 1, 0, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 0, 1, 1, 0, 1, 1, 1, 1]
(95329967, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 1, 1, 1, 1, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
(95981570, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 0, 1, 1, 0, 1, 1, 1, 0])
iso7816-1: CHKSUM ERROR bits=[0, 0, 0, 1, 1, 0, 1, 1, 1, 0]
(99228947, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 0, 1, 1, 0, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 0, 1, 1, 0, 1, 1, 1, 1]
(99366855, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 1, 1, 1, 1, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
CHKSUM ERROR count: 1834
reader exchanges : 0
capture ATRs : 0
capture APDUs : 1
byte-exact matches (LCS) : 0
reader exchanges not in capture (pre-capture / dropped): 0
capture APDUs not in reader log:
- proactive/CAT (unlogged by reader SDK): 0
- valid exchanges (reader retries/dupes): 1
- GARBAGE (mis-framed/desync): 0
Degradation metrics:
- BAD_FCS (desynced by decoder): 0
- payload mismatches (LCS-matched, bytes differ): 0
- suspicious CLA: 0
RESULT: OK - capture fully explained (reader + CAT + valid retries)
=== sim_turnon ATR-included ===
('iso7816 decoder v1.1.3',)
('ENDATR', b'3b9f96801fc78031e073fe211163444d2183079000e2')
CHKSUM ERROR count: 0
reader exchanges : 0
capture ATRs : 1
capture APDUs : 1390
byte-exact matches (LCS) : 0
reader exchanges not in capture (pre-capture / dropped): 0
capture APDUs not in reader log:
- proactive/CAT (unlogged by reader SDK): 5
- valid exchanges (reader retries/dupes): 1385
- GARBAGE (mis-framed/desync): 0
Degradation metrics:
- BAD_FCS (desynced by decoder): 0
- payload mismatches (LCS-matched, bytes differ): 0
- suspicious CLA: 0
RESULT: OK - capture fully explained (reader + CAT + valid retries)
=== sim_turnon mid-session ===
('iso7816 decoder v1.1.3',)
('etu recovered (samples):', 2855)
(108117240, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 1, 0, 1, 1, 0, 0, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 0, 1, 0, 1, 1, 0, 0, 1, 1]
(109877662, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 0, 1, 1, 0, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 0, 1, 1, 0, 1, 1, 1, 1]
(113088360, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 1, 0, 1, 1, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 0, 1, 0, 1, 1, 1, 1, 1, 1]
(113308472, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 0, 1, 1, 0, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 0, 1, 1, 0, 1, 1, 1, 1]
(113339895, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 1, 0, 1, 1, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 0, 1, 0, 1, 1, 1, 1, 1, 1]
(113602225, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 0, 0, 0, 0, 0, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 0, 0, 0, 0, 0, 0, 1, 1, 1]
(113954522, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 0, 0, 0, 0, 0, 1, 0, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 0, 0, 0, 0, 0, 1, 0, 1, 1]
(113983375, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 1, 1, 0, 0, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 1, 1, 0, 0, 1, 1, 1, 1]
(114163147, 'CHKSUM ERROR: ', 0, 'bits: ', [0, 1, 0, 1, 1, 0, 1, 1, 1, 1])
iso7816-1: CHKSUM ERROR bits=[0, 1, 0, 1, 1, 0, 1, 1, 1, 1]
CHKSUM ERROR count: 5044
reader exchanges : 0
capture ATRs : 0
capture APDUs : 9
byte-exact matches (LCS) : 0
reader exchanges not in capture (pre-capture / dropped): 0
capture APDUs not in reader log:
- proactive/CAT (unlogged by reader SDK): 0
- valid exchanges (reader retries/dupes): 7
- GARBAGE (mis-framed/desync): 2
GARBAGE: 00feedc2feedeefeedeafeec00feecffe797edeafeedeafeec00feecffe797edeafeecc0fefc80e7e7e7e7e7e7e767edfafeec00feecffe797edfafeecc2f9feece6edfafeec00feecffe797edfafeecc2f9feec41fbedfafeec08feecffe797edeafeecc2f9feec02feedfafeecc2f9feec83feedfefeecc2f9feecf2edf2feecc0feec3efeedfafeecc0feec4cfbedfefeecc2f9fefc4080808080808080808088808480808080feec41feedfefeecc0feecc0ecfeec02e7e6feedeefeedeafeecc0f9feece7edfafeedeafeedeafeec82f9feedfafeec08feec18e7e7fdedfefeec8af9feedfafeec0af9feedfafeec00feec18e7e7fdedfafeec02f9feedfafeec0af9
GARBAGE: 000667f9e7e7e7e7e7e7e7e7e7e767ec100083e7e7e7e7e7e7e7e7e7e7e7e797ec1820e7e7e7e7e7e7e7e7e7e7e7e727ec1800eae7e7e7e7e7e7e7e7e7e7e7e7e7cfedf6feec08feedeafeec0af9feec03ffe727edf6feec00feec52feedeafeec0af9feecffe7e7e7fbedf6feec80feedeafeec02f9feecffe7e7e7fbedf6feec88e6edfefeec00feedfafeec80e4edfafeec88e4edfafeec00feedfafeec08feedfafeec80feedfefeec80feedfefeec08feedfefeec00feedfafeec80e4ece4ece4edfafeec02e7e6feece23dccffec9d95dcf2edf6feec80e4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4edfafeecc2f9feedc2feedfefeedf6feec80e4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4edf2feecc0feedc6feedfafeecc0feedc27dedfeedf6feec88e4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4ece4
Degradation metrics:
- BAD_FCS (desynced by decoder): 5
in GARBAGE: 2, in retries: 3, in CAT: 0, in matched: 0
- payload mismatches (LCS-matched, bytes differ): 0
- suspicious CLA: 0
RESULT: UNCLEAN - 2 mis-framed capture APDU(s)
=== signal diagnostics ===
--- test_8 ---
First activity: sample 1
Frequency: 5.33 MHz
Period: 3.0 samples
Rising edges: 71858170
Transitions: 6
Transitions: 168
Transitions: 7423
--- test_7 ---
First activity: sample 2
Frequency: 5.33 MHz
Period: 3.0 samples
Rising edges: 71428947
Transitions: 16
Transitions: 444
Transitions: 8998
--- xiaomi_phone ---
First activity: sample 11497325
Frequency: 5.33 MHz
Period: 3.0 samples
Rising edges: 12833950
Transitions: 0
Transitions: 78488
--- samsung_phone_sample ---
First activity: sample 3096536
Frequency: 4.00 MHz
Period: 4.0 samples
Rising edges: 14002767
Transitions: 38
Transitions: 171694
Transitions: 117098
--- sunrise_phone_sample ---
+2 -1
View File
@@ -143,7 +143,8 @@ class TestValidateT0Apdu(unittest.TestCase):
# messaging 0x0C, chaining 0x10, and the SM/structural 0x4x/0x5x.
for cla in (0x01, 0x02, 0x03, 0x0C, 0x10, 0x14, 0x44, 0x50, 0x54):
pkt = bytes([cla, 0xa4, 0x00, 0x04, 0x00, 0x90, 0x00])
self._valid(pkt), 'CLA=0x%02x' % cla
with self.subTest(cla=cla):
self._valid(pkt)
def test_valid_cla_channel1_select_after_manage_channel(self):
# The command that follows MANAGE CHANNEL (00 70 00 00 01) opening