1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2020 iceman1001
4 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
5 // at your option, any later version. See the LICENSE.txt file for the text of
7 //-----------------------------------------------------------------------------
8 // High frequency ISO14443A / ST commands
9 //-----------------------------------------------------------------------------
17 // get ST Microelectronics chip model (from UID)
18 char *get_st_chip_model(uint8_t pc
) {
19 static char model
[40];
21 memset(model
, 0, sizeof(model
));
24 sprintf(s
, "SRIX4K (Special)");
33 sprintf(s
, "SRIX512");
45 sprintf(s
, "ST25TA64K");
48 sprintf(s
, "ST25??? IKEA Rothult");
51 sprintf(s
, "ST25TA02KB");
54 sprintf(s
, "ST25TA512B");
57 sprintf(s
, "ST25TA02KB-P");
60 sprintf(s
, "ST25TA02KB-D");
63 sprintf(s
, "Unknown");
69 // print UID info from SRx chips (ST Microelectronics)
70 void print_st_general_info(uint8_t *data, uint8_t len) {
71 //uid = first 8 bytes in data
72 PrintAndLogEx(NORMAL, "");
73 PrintAndLogEx(SUCCESS, " UID: " _GREEN_("%s"), sprint_hex(SwapEndian64(data, 8, 8), len));
74 PrintAndLogEx(SUCCESS, " MFG: %02X, " _YELLOW_("%s"), data[6], getTagInfo(data[6]));
75 PrintAndLogEx(SUCCESS, "Chip: %02X, " _YELLOW_("%s"), data[5] >> 2, get_st_chip_model(data[5] >> 2));