Skip to content
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

Not able to read cards (specifically) unless a card/tag is present while the board starts #581

Open
moussie369 opened this issue Mar 9, 2022 · 6 comments
Labels
bug 🐛 a not intended feature

Comments

@moussie369
Copy link

moussie369 commented Mar 9, 2022

Step 1: Describe your environment

  • OS version: W10 (latest)
  • Arduino IDE version: 1.8.15
  • MFRC522 Library version: 1.4.x
  • Arduino device: nano v3 (clone)
  • MFRC522 device: firmware is 2.0

Step 2: Describe the problem

Cards won't be read unless one is present when the program starts, if trying to read a card after some times it won't detect anything.
It works fine when using older versions (1.3.6 is the last to work)

Affected file(s) or example(s):

*All examples/any code using this library
*DumpInfo

Steps to reproduce:

  1. Reset the board
  2. Wait ~10-15s
  3. Place a card in front of the reader

Observed Results:

Nothing happens and it won't read anything until the board is reseted.
It works fine if only using tags or if a card/tag is present while it's rebooting.

Expected Results:

  • Detect/dump the card informations to serial
@Rotzbua Rotzbua added the bug 🐛 a not intended feature label Mar 12, 2022
@Rotzbua
Copy link
Collaborator

Rotzbua commented May 23, 2022

Did you test 1.4.0?

@moussie369
Copy link
Author

Yes, 1.3.6 was the last to work

@Rotzbua
Copy link
Collaborator

Rotzbua commented May 23, 2022

Can you test current version without connected reset pin and replace code with:

MFRC522 mfrc522(SS_PIN, UNUSED_PIN);   // Create MFRC522 instance

@moussie369
Copy link
Author

The arduino IDE and platformio won't build with UNUSED_PIN

@Rotzbua
Copy link
Collaborator

Rotzbua commented May 23, 2022

Sry, ofc with scope MFRC522 mfrc522(SS_PIN, MFRC522::UNUSED_PIN);

@moussie369
Copy link
Author

moussie369 commented May 23, 2022

Well I think I found the culprit, since then I bought a few more nano clones and it seems to work ok with them.
I was kind of freaking out trying to figure out what had changed since march until I realized it.
I still don't get why it's working only with 1.3.6 and earlier, but unplugging rst and putting MFRC522::UNUSED_PIN didn't do anything

edit: unfortunately trying to flash the bootloader from the other boards I didn't pay attention and blocked the nano, I remember it was quite an adventure to get them to work when new so I won't try today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 a not intended feature
Projects
None yet
Development

No branches or pull requests

2 participants