This applet allows to set the global PIN, the ATS/ATR and the UID size (for contactless cards) on JCOP 4 cards including on cards that are fused, i.e. the config module was deleted.
Cards supported are J3R110/J3R150/J3R180/J3R200 for the contactless or dual-interface cards and J2R110/J2R150/J2R180/J2R200 for the contact-only cards.
Support for more parameters as well as J2R452/J3R452 can be added on request, open an issue.
Install the applet with GlobalPlatformPro with CVMManagement privilege:
gp --install JCOP4Params.cap --privs CVMManagement
The PIN is set in HEX format. The syntax is 12 {length} {tries} {pin} where length and tries are coded in 1 byte.
For instance for a 6 bytes PIN with 3 tries, setting the PIN to 313233343536 (123456 in hex format):
gp --personalize FF4A434F50342D506172616D7301 --store-data 120603313233343536
The historical bytes of the cold ATR, warm ATR and ATS are all set at once. The syntax is A7 {hist}.
For instance for the following historical bytes:
+ Historical bytes: 80 73 C8 21 D3
Category indicator byte: 80 (compact TLV data object)
Tag: 7, len: 3 (card capabilities)
Selection methods: C8
- DF selection by full DF name
- DF selection by partial DF name
- Implicit DF selection
Data coding byte: 21
- Behaviour of write functions: proprietary
- Value 'FF' for the first byte of BER-TLV tag fields: invalid
- Data unit in quartets: 2
Command chaining, length fields and logical channels: D3
- Command chaining
- Extended Lc and Le fields
- Logical channel number assignment: by the card
- Maximum number of logical channels: 4
you would run the command:
gp --personalize FF4A434F50342D506172616D7301 --store-data A78073C821D3
gp --personalize FF4A434F50342D506172616D7301 --store-data C0
gp --personalize FF4A434F50342D506172616D7301 --store-data C4
gp --personalize FF4A434F50342D506172616D7301 --store-data C7
Note: if the card's true hardware UID is not 7 bytes this might not work or break the contactless interface until you set it back to 4 bytes or random.