Android NfcV (ISO 15693) tag

假装没事ソ 提交于 2019-12-01 14:33:53

The exact details depend on which ISO 15693 compatible chip is inside the tag. The ISO 15693-3 standard lists different write commands. Support for these are all optional, so your tag may support one or more of these or even use a proprietary command for writing data. I would recommend to look up the datasheet of the chip and/or acquire the ISO standard to find out what the right command is.

Once you know what the right command is, you can simply pass the bytes of the command in a byte array to the NfcV.transceive() method. (Usually the command bytes consist of a flag byte, followed by a write command byte, one or more block bytes and the data bytes to be written.)

Tried the following: Getting the "Tag was lost" Exception:

        nfc.connect();
        byte[] arrByt = new byte[7];
        arrByt[0] = 0x40;
        arrByt[1] = 0x21;
        arrByt[2] = 0x06;
        arrByt[3] = 0x00;
        arrByt[4] = 0x00;
        arrByt[5] = 0x00;
        arrByt[6] = 0x00;           
        byte[] response = nfc.transceive(arrByt);

I guess the android framework does not handle the response from the ISO15693 tags very well. I have been playing with HF-I tags. Few commands work flawlessly and for few other commands the NFC stack throws TAG Lost exception.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!