Show T=15 as PPS capability, not a transport protocol

T=15 in the ATR is a Protocol-and-Parameter-Selection capability,
not a data protocol like T=0/T=1. Previously 'Protocols: T=0, T=15'
was misleading.

- _decode_atr: exclude T=15 from protocols, set pps=True instead
- TCK presence: only-t0 rule now also requires no PPS (T=15 implies TCK)
- PWA ATR detail: 'Protocol: T=0' + 'PPS: supported' rows
- +1 test with the real UICC ATR (3B 9F 95 80 1F C7 ...)
- Bump 1.22.2, SW cache v33->v34
This commit is contained in:
catarrh committed 2026-09-05 23:20:16 +03:00
1 parent 6376fb1591
commit 6bdbbea209
7 files changed
+30 -8

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ from .gsmtap import GsmtapSender, GsmtapReceiver
from .pcap import PcapWriter
from .dump import FileDumper, format_message
__version__ = '1.22.1'
__version__ = '1.22.2'
__all__ = [
'SniffSession',
'DeviceDisconnected',
+8 -2
View File
@@ -4177,6 +4177,7 @@ def _decode_atr(data):
interface = []
protocols = []
pps = False
flags = t0 & 0xF0
i = 1
level = 1
@@ -4229,7 +4230,10 @@ def _decode_atr(data):
b = body[i]
i += 1
cur_t = b & 0x0F
protocols.append(_T_PROTOCOLS.get(cur_t, f'T={cur_t}'))
if cur_t == 15:
pps = True
else:
protocols.append(_T_PROTOCOLS.get(cur_t, f'T={cur_t}'))
flags = b & 0xF0
level += 1
else:
@@ -4239,6 +4243,8 @@ def _decode_atr(data):
result['interface'] = interface
if protocols:
result['protocols'] = protocols
if pps:
result['pps'] = True
k = result['historical_len']
if k and i + k <= len(body):
@@ -4246,7 +4252,7 @@ def _decode_atr(data):
i += k
# TCK present unless only T=0 is proposed (ISO 7816-3 §8.2.5).
only_t0 = not protocols or protocols == ['T=0']
only_t0 = (not protocols or protocols == ['T=0']) and not pps
if not only_t0 and i < len(body):
tck = body[i]
check = 0