NFC-V ICODE SLIX (SL2S2002)

别等时光非礼了梦想. 提交于 2019-12-13 01:22:55

问题


I'm developing an application for managing ICODE SLIX-S tags under android. I'm finding problems regarding the "SET_PASSWORD" as defined in the data sheet (https://www.nxp.com/docs/en/data-sheet/SL2S2002_SL2S2102.pdf page 16). There is already a discussion about the problem(NFC-V SLIX-S write password) but it has not been solved. The problem I think is the format of the command passed to the transceive, I tried different formats but without solution. If someone had resolved in any way, thank you very much!

cmd = new byte[] {
    (byte)0x00,  // FLAGS
    (byte)0xB3,  // SET_PASSWORD!
    (byte)0x04, //manufacturer code (NXP should be 0x04)
    //0, 0, 0, 0, 0, 0, 0, 0,
    (byte)0x10,
    0, 0, 0, 0
};
//System.arraycopy(detectedTag.getId(), 0, cmd, 3, 8);  // paste tag UID into command
System.arraycopy(exorPassword, 0, cmd, 4, 4);
response = nfcV.transceive(cmd);  


W/System.err: android.nfc.TagLostException: Tag was lost.
    at android.nfc.TransceiveResult.getResponseOrThrow(TransceiveResult.java:48) <- THIS ON TRANSCEIVE

回答1:


NFC-V android stack is not working properly. It exits a timeout issue on Android OS. So, sometime even if you get a TagLost the command is executed on the Icode SLIX2. The best solution, I found, is to use NXP TapLink library. It replaces NFC android stack and works great with their NXP tags (from Mifare to ICode).

The set password will become:

byte[] rand = iCodeSLIX2.getRandomNumber();
byte[] pwd = Utilities.xor(password, Utilities.append(rand, rand));
iCodeSLIX2.setPasswordWrite(pwd);


来源:https://stackoverflow.com/questions/52723703/nfc-v-icode-slix-sl2s2002

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