-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Each second passiv read of Target ID does not find a card. #52
Comments
Late ... but hey better than no answer :-) I have exactly the same issue!!! Tested with 4 & 7 bytes UID lengths but i also get just an target back every second call to readPassiveTargetID() function. Output @ 4 or 7 byte Cards: I have found an "dirty" workaround, but not sure if i can go this way (lower performance because of calling the function twice...) @weingaunity did you ever found an solution to this |
Please provide a complete example sketch that can be used to demonstrate this issue for local testing. |
Possibly related to #93 |
Note: See updated info in #117 Old comment, better info in above issue link: I made changes in Adafruit_PN532.cpp: Under line 335 where it says // I2C TUNING delay(SLOWDOWN); (Original line in 1.3.1) to delay(1); (My modification.) This means a delay of 1ms no matter what interface you're using. I'm using SPI. Before the modification, the library would only delay if you're using i2c. This fixed my issue. I have board v1.3, I am using library 1.3.1. I see this behavior on two separate Adafruit PN532 boards. Both 1.3. This fixed the issue on both of them. I'm using a ESP32-S3-DevKitC-1 with both boards (Not the same one, this issue exists on two independent adafruit boards with a different ESP32-S3-DevKitC-1 on each. The weirdest part is it WAS WORKING on one of the setups without the delay a few days ago. I know I haven't modified the library at all until today. I got nothin' |
I was having problems reading data from a Mifare ultralight tag and setting the delay to 1 fixed it. |
Is everyone experiencing this issue using SPI? |
I was using SPI and for I2C the delay is set to 1 anyway |
Correct. Asking as still looking for an example sketch and/or information about how to recreate this locally. |
I just used the ntag2xx_read example provided by this library and then changed the delay to 1. Before I got no ack frames. Interestingly reading the ID worked fine, but even when commenting out that line and just skipping to reading the tag directly it didn't work. But with debug enabled it didn't get the error in this part of the code if (!sendCommandCheckAck(pn532_packetbuffer, 4)) {
#ifdef MIFAREDEBUG
PN532DEBUGPRINT.println(F("Failed to receive ACK for write command"));
#endif
return 0;
} |
Still can't recreate this locally. Running the
|
Same issue on Particle Xenon. Delay(1) fixed the issue. Using the ntag2xx_read example. |
Hi, i'm using the readPassiveTargetID function.
Cards with 4byte-IDs are detected permanently. But each 2nd read of a card with 7 bytes does not work.
Any advice?
Thg.
Output @ 4byte Cards:
NOCARD
NOCARD
CARDFOUND // placed card
CARDFOUND
CARDFOUND
CARDFOUND // removed card
NOCARD
NOCARD
Output @ 7byte Cards:
NOCARD
NOCARD
CARDFOUND // placed card
NOCARD
CARDFOUND
NOCARD
CARDFOUND
NOCARD
CARDFOUND // removed card
NOCARD
NOCARD
The text was updated successfully, but these errors were encountered: