Closed iyxan23 closed 1 month ago
Figured it out! Apparently I didn't set the last positional parameter of readPassiveTargetID
to True
which doesn't save the card id into the property self.inListedTag
(which is later used on inDataExchange
as a target card). That was the reason why PN532 returned a 0x27
, because the library didn't save the target id that it got from readPassiveTargetID
.
I seriously cannot believe how I did not found this out for like two days.
Glad you got it worked out 👍
Hi! Thank you for this awesome project, I've been tinkering with it for a while on my RPi and it had been awesome. It works great on my MIFARE cards.
Recently I decided to develop an android app to emulate a card with HCE and let the PN532 retrieve something from it by sending an APDU SELECT command.
But I can't seem to be able to figure out the reason why PN532 seem to reject the InDataExchange command I wrote.
It returned
0x27
(bytearray("\'")
), which according to the user manual that the problem is that "the target number is unknown".The debugs:
My code essentially does a SAMConfiguration at the start, then does a
readPassiveTargetID
withPN532_MIFARE_ISO14443A_106KBPS
. Then when a card is found, it will send out aninDataExchange
with a APDU SELECT command with the AID the same as the one I set on my custom android app.Any ideas what's going on? Am I missing something? thanks!