2024-05-09 12:52 AM
We are currently using Flutter for our NFC App development, and used the 'Flutter_nfc_kit' package for NFC Connection. We have successfully implemented the Android's workflow. The workflow consists of :
1) Get UID
2) invoke custom command of GetRandomNumber
3) Use the GetRandomNumber values to encrypt the password that is going to be entered
4) invoke custom command of PresentPassword with the encrypted password
5) Retrieve the data from the password-locked memory
In Android, it all went well but when we built the iOS version, we encountered some errors.
The code that we used for the Android device for the transceive bytes format are exactly the same, but in iOS,
it throws an error of : Tag Connection Lost (when I didn't input the IC Mfg. Code) and Stack Error (when I input the IC Mfg. Code). This is the example of the code that we sent for the 'GetRandomNumber' command =>
[0x20 (request flags), 0xB4 (OpCode), 0x02 (IC Mfg. Code), UID].
I have set up the iOS info.plist file with the basic NFC Settings =>
Solved! Go to Solution.
2024-05-13 12:55 AM
Hi ivannagara,
in iOS, the custom command does not work in Addressed mode. This is a bug into iOS CoreNFC.
So, you must use the "non addressed" flag when sending a command.
If I understand weel, you should replace [0x20 (request flags)] by [0x00 or 0x02 (request flags)]
In addition, you don't have to pass the IC code (0x02) as it is automatically added by iOS CoreNFC .
And UID is not needed as you work in Non Addressed mode.
Hope it helps and clarifies.
Thx for you feedback.
2024-05-13 12:55 AM
Hi ivannagara,
in iOS, the custom command does not work in Addressed mode. This is a bug into iOS CoreNFC.
So, you must use the "non addressed" flag when sending a command.
If I understand weel, you should replace [0x20 (request flags)] by [0x00 or 0x02 (request flags)]
In addition, you don't have to pass the IC code (0x02) as it is automatically added by iOS CoreNFC .
And UID is not needed as you work in Non Addressed mode.
Hope it helps and clarifies.
Thx for you feedback.
2024-05-13 08:29 PM
Thanks for the reply.
I agree with the statement that you stated, and I have fixed the problem.
I also found out that I cannot use the 'tag.sendRequest(...)' function even though it is for ISO 15693 tags, but I must use the 'tag.customCommand(...)' function for the GetRandomNumber and PresentPassword commands.
But for the ReadMultipleBlocks command, I must use the 'tag.sendRequest(...)' because it will throw error if I use the other one. I think this is pretty weird, but I'm just letting anyone who has the same problem know about this.
I hope this helps, thanks!
Best Regards,
Ivan Nagara
2024-05-14 11:44 PM
thx for feedback.
Regarding ReadMultipleblock :