diff options
author | Eric Wild <ewild@sysmocom.de> | 2019-11-22 17:45:40 +0100 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2019-12-02 23:29:46 +0000 |
commit | 7f5cfd4e5d66e58e73a81e642b1d06e141d149f5 (patch) | |
tree | 19ac6796e09ded07ae229682b6cd13b870e7b348 /ccid | |
parent | 1d9986a19999ef7d328288eb344720e747d31ae1 (diff) |
pps exchange after power on
Change-Id: Ibe289de5134eec4f7ba26c75ceb4714ad523f0da
Diffstat (limited to 'ccid')
-rw-r--r-- | ccid/CCID_Tests.ttcn | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/ccid/CCID_Tests.ttcn b/ccid/CCID_Tests.ttcn index f6816be8..c620b0be 100644 --- a/ccid/CCID_Tests.ttcn +++ b/ccid/CCID_Tests.ttcn @@ -46,6 +46,54 @@ private const integer NR_SLOTS := 16; const octetstring c_UICC_SELECT_MF := '00a40004023f00'O; const octetstring c_SIM_SELECT_MF := 'a0a40004023f00'O; +/* Table 7 of ISO7816-3 */ +type enumerated ISO7816_Fi { + ISO7816_FI_372_4MHz ('0000'B), + ISO7816_FI_372_5MHz ('0001'B), + ISO7816_FI_558_6MHz ('0010'B), + ISO7816_FI_744_8MHz ('0011'B), + ISO7816_FI_1116_12MHz ('0100'B), + ISO7816_FI_1488_16MHz ('0101'B), + ISO7816_FI_1860_20MHz ('0110'B), + + ISO7816_FI_512_5MHz ('1001'B), + ISO7816_FI_768_7MHz ('1010'B), + ISO7816_FI_1024_10MHz ('1011'B), + ISO7816_FI_1536_15MHz ('1100'B), + ISO7816_FI_2048_20MHz ('1101'B) +}; + +/* Table 8 of ISO7816-3 */ +type enumerated ISO7816_Di { + ISO7816_DI_1 ('0001'B), + ISO7816_DI_2 ('0010'B), + ISO7816_DI_4 ('0011'B), + ISO7816_DI_8 ('0100'B), + ISO7816_DI_16 ('0101'B), + ISO7816_DI_32 ('0110'B), + ISO7816_DI_64 ('0111'B), + + ISO7816_DI_12 ('1000'B), + ISO7816_DI_20 ('1001'B) +} + +private template (value) CCID_ProtocolData ts_ProtoDataT0(ISO7816_Fi fi, ISO7816_Di di, + uint8_t guard_time := 0, + uint8_t wait_int := 0) := { + T0 := { + Findex := enum2int(fi), + Dindex := enum2int(di), + + bRFU := '000000'B, + inv_convention := false, + bRFU2 := '0'B, + + bGuardTimeT0 := guard_time, + bWaitingIntegerT0 := wait_int, + bClockStop := STOPPING_NOT_ALLOWED + } +}; + type function void_fn() runs on Slot_CT; /* altstep running on the per-slot test component */ @@ -329,6 +377,7 @@ private function f_TC_select_mf() runs on Slot_CT { var integer i; f_ccid_power_on(); + f_ccid_set_par(ts_ProtoDataT0(ISO7816_FI_512_5MHz, ISO7816_DI_32)); for (i := 0; i < 1000; i := i+1) { f_ccid_xfr(c_UICC_SELECT_MF, ?); } |