区分Mifare Ultralight与Mifare Ultralight C

mib*_*lma 6 rfid nfc mifare

有没有可靠的方法来确定RFID卡是Mifare Ultralight还是Mifare Ultralight C?

到目前为止,我发现的唯一方法是利用这两张卡的大小差异,发出读取命令超出较小的一个的边界.但它确实看起来像黑客,我认为如果卡使用Ultralight C身份验证机制,读取命令可能会失败.

const char* mifare_ultralight_identification(const nfc_target_info_t nti)
{
  byte_t abtCmd[2];
  byte_t abtRx[265];
  size_t szRxLen;

  abtCmd[0] = 0x30;  // MIFARE Ultralight READ command
  abtCmd[1] = 0x10;  // block address (1K=0x00..0x39, 4K=0x00..0xff)

  if (!nfc_initiator_transceive_dep_bytes(pnd,abtCmd,2,abtRx,&szRxLen)) {
    // READ command of 0x10 failed, we consider that Ultralight does have 0x10 address, so it's a "simple" Ultralight (i.e. not a Ultralight C)
    // When a READ failed, the tag returns in HALT state, so we need to reselect tag
    nfc_initiator_select_passive_target(pnd, NM_ISO14443A_106, nti.nai.abtUid, nti.nai.szUidLen, NULL);
    return "";
  }
  return " C";
}
Run Code Online (Sandbox Code Playgroud)

资源

NFC*_*guy 6

是的,如果您有关于MIFARE Ultralight C身份验证机制如何工作的文档,则可以.MIFARE Ultralight不支持此功能,因此会引发错误情况.