如何在 MIFARE Ultralight EV1 标签上设置和取消设置密码?

ban*_*ing 6 tags authentication android nfc mifare

我希望能够使用NfcA?Android 上的标签技术在 MIFARE Ultralight EV1 (MFOUL21) 标签上设置和取消设置密码保护。

我知道我会为此使用该nfcA.transceive()方法,但我不确定该方法的参数是什么,所以任何人都可以提供代码片段来设置和取消设置密码吗?

更新:

对于 TapLinx 库,我基本上希望nfcA.transceive(...)代码片段相当于:

  1. ultralightEV1.programPwd(passwordBytes);
  2. ultralightEV1.programPack(packBytes);
  3. ultralightEV1.enablePasswordProtection(enabled, fromPageNum);
  4. ultralightEV1.authenticatePwd(passwordBytes);

Eri*_*ikM 1

您可以使用 NXP 的 TapLinx 库(可从https://www.mifare.net/en/products/tools/taplinx/获取)以抽象方式与 MIFARE Ultralight EV1 进行通信。

要使用“收发”,根据http://www.advanide.com/wp-content/uploads/products/rfid/UltraLight%20EV1_MF0ULX1.pdf上提供的数据表,需要使用 WRITE 命令 (A2),并带有地址25-28小时。

更新:要发送的命令应该是(对于 MFOUL21):

  1. ultralightEV1.programPwd(passwordBytes); A227AABBCCDD(密码AABBCCDD)

  2. ultralightEV1.programPack(packBytes); A228EEFF0000(适用于 PACK 0000)

  3. ultralightEV1.enablePasswordProtection(启用, fromPageNum); A225xx0000yy(其中 xx 是调制模式;00..strong mod. 禁用;01..strong mod 启用;yy = 密码保护开始的页面)

  4. ultralightEV1.authenticatePwd(passwordBytes); 1BAABBCCDD