Tag.is_present on Type2 not working (works on Type4)
Hi,
I am a newbie on NFC, so sorry if this is obvious - I've tried searching this forum for an answer, but only came close with a similar issue on Type4 cards, which is working for me just fine.
So, I have a need to register when a card is present and when it leaves again. I have some Type2 tags for this.
Given this code:
def connected(tag):
print(tag)
return True
def released(tag):
print("Bye")
tag = clf.connect(
I would expect it to echo out the Tag ID when I present it to the reader, and the echo "Bye" once I remove it. This works as expected on a Type4 tag I have..
Output (Put tag on and keep it)
>Type4BTag MIU=255 FWT=0.154657
Output (When tag is removed)
>Bye
But on the Type2's it simply fires bothcallbacks in an endless loop, as if it "looses connection" to the tag right away - I am guessing it is Tag.is_present not working properly (hence the headline).
Output (Put tag on and keep it there):
Type2Tag ID=4A17ABDD
Bye
Type2Tag ID=4A17ABDD
Bye
Type2Tag ID=4A17ABDD
Bye
Type2Tag ID=4A17ABDD
Bye
Type2Tag ID=4A17ABDD
Bye
Type2Tag ID=4A17ABDD
Bye
Type2Tag ID=4A17ABDD
Bye
Type2Tag ID=4A17ABDD
Bye
..... This continues until I remove the tag from the reader.:
I have tried to format the Type2 tag (as that is apparently required for Type4 tags at least - but I am not allowed to).
The hardware I am using is a Raspberry Pi 3, with the Adafruit NFC Breakout board (PN532)
Any suggestions?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- nfcpy Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Rune Espensen for more information if necessary.