You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Mifare-Ultralight NFC卡读取数据不符、认证失败问题求助

Mifare Ultralight NFC卡读取问题

我正在测试全新无密钥的Mifare Ultralight NFC卡,用NFC Tools和NXP TagInfo应用读取到的字节数据,与自研代码读取的数据存在差异,因此怀疑代码存在问题。

我的代码:

byte[] key = new byte[]{(byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF};

StringBuilder result = new StringBuilder();
for(int i=0;i<64;i+=4){
   if(util.authenticate(i, 0, key)){
      for(int j=i;j<i+4;j++){
         byte[] readData = util.read_block(i);
         if(readData != null){
            result.append(NfcUtil.toHexString(readData));
         }
      }
   }
}

所有块的认证均返回false,即使尝试了extended-std.keys中的所有密钥。注释认证方法后,读取的数据发生变化,解码后能看到信息,但不符合标准Type2 Ndef格式,与NFC Tools的输出不一致。

请问:

  • 必须进行认证才能始终获取正确数据吗?
  • 即使卡上只有一条记录,也需要对所有块进行认证吗?

内容的提问来源于stack exchange,提问作者Orlay Garcia Duconge

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.17 09:00:51