-
- if ( len == 7 && receivedCmd[0] == ISO14443B_HALT ) {
- cardSTATE = SIM_HALTED;
- } else if ( len == 11 && receivedCmd[0] == ISO14443B_ATTRIB ) {
- cardSTATE = SIM_ACKNOWLEDGE;
- } else {
- // Todo:
- // - SLOT MARKER
- // - ISO7816
- // - emulate with a memory dump
- Dbprintf("new cmd from reader: len=%d, cmdsRecvd=%d", len, cmdsReceived);
-
- // CRC Check
- uint8_t b1, b2;
- if (len >= 3){ // if crc exists
- ComputeCrc14443(CRC_14443_B, receivedCmd, len-2, &b1, &b2);
- if(b1 != receivedCmd[len-2] || b2 != receivedCmd[len-1])
- DbpString("+++CRC fail");
- else
- DbpString("CRC passes");
- }
- cardSTATE = SIM_IDLE;
- }
-