+ uint8_t block = receivedCmd[1];
+ if ( tagType == 7 ) {
+
+ if ( block < 4 ) {
+ //NTAG 215
+ uint8_t start = 4 * block;
+
+ uint8_t blockdata[50] = {
+ data[0],data[1],data[2], 0x88 ^ data[0] ^ data[1] ^ data[2],
+ data[3],data[4],data[5],data[6],
+ data[3] ^ data[4] ^ data[5] ^ data[6],0x48,0x0f,0xe0,
+ 0xe1,0x10,0x12,0x00,
+ 0x03,0x00,0xfe,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,
+ 0x00,0x00};
+ ComputeCrc14443(CRC_14443_A, blockdata+start, 16, blockdata+start+17, blockdata+start+18);
+ EmSendCmdEx( blockdata+start, 18, false);
+ } else {
+ ComputeCrc14443(CRC_14443_A, blockzeros,16, blockzeros+17,blockzeros+18);
+ EmSendCmdEx(blockzeros,18,false);
+ }
+ p_response = NULL;
+
+ } else {
+ EmSendCmdEx(data+(4*block),16,false);
+ // Dbprintf("Read request from reader: %x %x",receivedCmd[0],receivedCmd[1]);
+ // We already responded, do not send anything with the EmSendCmd14443aRaw() that is called below
+ p_response = NULL;
+ }
+ } else if(receivedCmd[0] == 0x3A) { // Received a FAST READ -- just returns all zeros.
+ uint8_t len = (receivedCmd[2]- receivedCmd[1] ) * 4;
+ ComputeCrc14443(CRC_14443_A, blockzeros,len, blockzeros+len+1, blockzeros+len+2);
+ EmSendCmdEx(blockzeros,len+2,false);
+ p_response = NULL;
+ } else if(receivedCmd[0] == 0x3C && tagType == 7) { // Received a READ SIGNATURE --
+ // ECC data, taken from a NTAG215 amiibo token. might work. LEN: 32, + 2 crc
+ uint8_t data[] = {0x56,0x06,0xa6,0x4f,0x43,0x32,0x53,0x6f,
+ 0x43,0xda,0x45,0xd6,0x61,0x38,0xaa,0x1e,
+ 0xcf,0xd3,0x61,0x36,0xca,0x5f,0xbb,0x05,
+ 0xce,0x21,0x24,0x5b,0xa6,0x7a,0x79,0x07,
+ 0x00,0x00};
+ ComputeCrc14443(CRC_14443_A, data, sizeof(data), data+33, data+34);
+ EmSendCmdEx(data,sizeof(data),false);
+ p_response = NULL;
+ } else if(receivedCmd[0] == 0x39 && tagType == 7) { // Received a READ COUNTER --
+ uint8_t data[] = {0x00,0x00,0x00,0x00,0x00};
+ ComputeCrc14443(CRC_14443_A, data, sizeof(data), data+4, data+5);
+ EmSendCmdEx(data,sizeof(data),false);
+ p_response = NULL;