2

I bought a bunch of the common RC522 boards from some Aliexpress vendor. They (I tried multiple) seem to work at the register read-write level, but they don't seem to execute commands, much less recognise any RFID card.

But the realy weird thing is that the version returns 0X12, which matches neither the rc522 1.0, nor the 2.0, nor the clone that should return 0x88.

I verfied with my scope that the chip indeed answers to the SPI byte 1110_1110 (read register 0x37) with the value 0001_0010. The signal is crips, no clock skew, nice sharp edges.

I tried this with and Arduino Uno, an Arduino Due, using a recent version of the miguelbalboa library. But as I see this on my scope, it can't see how it can be a software problem.

Has anyone seen this, or better: found a solution?

4
  • 1
    Have you verified that your (unseen) code is actaully valid? i.e. does your (unseen) code work with other boards that are not 0x12? – Jaromanda X Feb 22 '18 at 23:00
  • All boards I have seem to respond in this way (I tried some 5 out of 100). For the code I tried a few repo's, last was I think github.com/miguelbalboa/rfid. But as I see the SPI 'command' byte & response on a scope, the question is mostly independent of the actual code. – Wouter van Ooijen Feb 23 '18 at 7:27
  • Oh, ok. I meant ones that don't respond with version 0x12 which you say doesn't match any values you expected - Or, put another way, do you have any rc522 boards that return a version that "matches" 1.0, 2.0 or the 0x88? Perhaps these 0x12's require different code? – Jaromanda X Feb 23 '18 at 7:33
  • Looking at the MFRC522 library ... the version needs to be one of 0x88, 0x90, 0x91 or 0x92 ... anything else aborts PCD_PerformSelfTest - other than that there's nothing in the code that specifically requires a particular version ... however, given that the version you have is not one of those four, perhaps the issue is with compatibility – Jaromanda X Feb 23 '18 at 7:39
0

Put a delay(5) right after init() in setup() and firmware readout will work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.