Open raftheunis87 opened 5 years ago
Same issue here. See if you have libnfc-pn53x-examples, libnfc-examples, libnfc-bin. After uninstall issue resolved for me. Maybe a confict between packages
the same here, removing libnfc related stuff didn't help...
Hi @danielzzz,
what are you trying to achieve? What card/tag do you use? Do you want to communicate with Android device via Android HCE?
Cannot process ISO 14443-4 tag because AID was not set.
error is thrown when the following conditions are met:
reader.autoProcessing
is enabled (true) (that's by default)reader.aid
is not setYou have two options:
reader.autoProcessing = false
(this affects all tag types).
Then you can process the tags yourself (i.e. send custom commands using reader.transmit
).
See Alternative usage section in the project's README for more info on this approach.
BTW: this way MIFARE DESFire example is implementedreader.aid
as described in basic example on the line 17.In case you are trying to use Android HCE, the second option could work for you. You set the reader.aid
to some custom unique HEX string which will identify your app. Then you set the same value in aid-filter
tag in the host-apdu-service
manifest as described in Service manifest declaration and AID registration in Android HCE guide. Then, when a NFC enabled Android device with you HCE service approaches the NFC reader and is detected, nfc-pcsc sends SELECT FILE command with your AID. This command tells Android OS that all further commands (sent using reader.transmit
) should be send to your app's HCE service. This way you can implement bi-directional communication with Android NFC device. Refer to the Android HCE docs for more info.
Hope it helps. 🙂
PS Don't forget to star ⭐️my library, if you find it useful. 😃Thanks.
cc @raftheunis87 It may be helpful to you, as well. 🙂 Sorry for not responding earlier.
hi @pokusew - thanks for this extended answer. I really appreciate it!
I had this reader laying around and I wanted to check if it is capable of reading nfc tags from my phone.
thanks for the pointers to the docs I will check it out if it helps.
cheers! dan
hi, ignore my comment, I had a wrong fake reader which didn't work properly. using an acr122 worked fine. I added a pull request for react-native-hce if you find it might be interesting to add.
best, dan
Hey all,
I'm running an application with the nfc-pcsc module. When I hold my Android device close to the acr-122u, I get the following logging:
My code is:
Any idea how to fix this?
Kind regards!