|
41 | 41 | const generateUssp = () => { |
42 | 42 | let ussp = ""; |
43 | 43 |
|
44 | | - ussp += "80"; |
| 44 | + ussp += "80"; // Tag of **UICC Toolkit** Application specific parameters field |
45 | 45 |
|
46 | 46 | let utasp = ""; |
47 | | - utasp += toHex(priority); |
48 | | - utasp += toHex(timer); |
49 | | - utasp += toHex(entryLabelLength); |
50 | | - utasp += toHex(menuCount); |
| 47 | + utasp += toHex(priority); // Priority level of the Toolkit application instance |
| 48 | + utasp += toHex(timer); // Maximum number of timers allowed for this application instance |
| 49 | + utasp += toHex(entryLabelLength); // Maximum text length for a menu entry |
| 50 | + utasp += toHex(menuCount); // Maximum number of menu entries allowed for this application instance |
51 | 51 | for (let i = 0; i < menuCount; i++) { |
52 | | - utasp += toHex(i+1); |
53 | | - utasp += "00"; |
| 52 | + utasp += toHex(i+1); // Position of the n-th menu entry |
| 53 | + utasp += "00"; // Identifier of the n-th menu entry ('00' means do not care) |
54 | 54 | } |
55 | | - utasp += toHex(channel); |
56 | | - utasp += "00"; |
57 | | - ussp += toHex(utasp.length / 2); |
| 55 | + utasp += toHex(channel); // Maximum number of channels for this application instance |
| 56 | + utasp += "00"; // Length of Minimum Security Level field |
| 57 | + |
| 58 | + ussp += toHex(utasp.length / 2); // Length of UICC Toolkit Application specific parameters field |
58 | 59 | ussp += utasp; |
59 | 60 |
|
60 | 61 | if (useUiccFs) { |
61 | | - ussp += "81"; |
| 62 | + ussp += "81"; // Tag of **UICC Access** Application specific parameters field |
62 | 63 |
|
63 | 64 | let uiccFs = ""; |
64 | | - uiccFs += "00"; |
65 | | - uiccFs += "01"; |
66 | | - uiccFs += "00"; |
67 | | - uiccFs += "00"; |
68 | | - uiccFs += toHex(adf1Aid.length / 2); |
| 65 | + uiccFs += "00"; // Length of UICC file system AID |
| 66 | + uiccFs += "01"; // Length of Access Domain for UICC file system |
| 67 | + uiccFs += "00"; // Access Domain for UICC file system |
| 68 | + uiccFs += "00"; // Length of Access Domain DAP |
| 69 | + uiccFs += toHex(adf1Aid.length / 2); // Length of ADF#1 AID |
69 | 70 | uiccFs += adf1Aid; |
70 | | - uiccFs += "01"; |
71 | | - uiccFs += "00"; |
72 | | - uiccFs += "00"; |
73 | | - ussp += toHex(uiccFs.length / 2); |
| 71 | + uiccFs += "01"; // Length of Access Domain for ADF#1 |
| 72 | + uiccFs += "00"; // Access Domain for ADF#1 |
| 73 | + uiccFs += "00"; // Length of Access Domain DAP#1 |
| 74 | + |
| 75 | + ussp += toHex(uiccFs.length / 2); // Length of UICC Access Application specific parameters field |
74 | 76 | ussp += uiccFs; |
75 | 77 | } |
76 | 78 |
|
|
0 commit comments