2

I'm using the reader below to read mifare cards (13.56mhz), I have an electron/node.js application for this. For some reason after an uncertain amount of time(shortest time I noticed was about 30 minutes) the reader just stops reading, but the power is still on indicated by a red LED on the reader.

I'm using this to do the card reading and also followed the gpio wiring shown. I'm having a hard time figuring out what's wrong since I only experience this on my Pi 3 Model B+(2017), I also have Pi 4's which I don't experience this in. Sometimes restarting the application works and it can read again, sometimes I have to reboot the pi itself. Both are running buster, updated. Same application.

crimson589
  • 141
  • 5
  • 1
    add some console.log's to the code where you suspect it may be failing – Jaromanda X Apr 28 '21 at 00:38
  • 1
    @JaromandaX I already tried debugging the section of the javascript code responsible for reading the card, it's not detecting any card at all. – crimson589 Apr 28 '21 at 00:44
  • 1
    so, you can still successfully communicate with the RC522, it just doesn't detect cards? – Jaromanda X Apr 28 '21 at 00:46
  • 1
    does the issue occur after a specific number of reads? – jsotola Apr 28 '21 at 00:49
  • 1
    @JaromandaX I can't really tell since the part of the code that detects cards will just keep looping until it detects one, even if there is something wrong with the reader or there is even no reader. The code doesn't detect if a reader is present or something is wrong. – crimson589 Apr 28 '21 at 00:50
  • 1
    @jsotola No, as far as I can tell right now it just stops reading when it's not in used for a while. – crimson589 Apr 28 '21 at 00:53
  • 1
    anything in any system logs that may point to an issue? maybe a momentary power issue? – Jaromanda X Apr 28 '21 at 01:50
  • 1
    @JaromandaX how can I check that? – crimson589 Apr 28 '21 at 02:04
  • 1
    by inspecting the system logs - bunch of them in /var/log folder – Jaromanda X Apr 28 '21 at 02:14
  • 2
    @JaromandaX browsed a few of them like syslog, user.log, boot, kern. didn't find anything that caught my attention, anything I should be looking for? – crimson589 Apr 28 '21 at 02:34
  • 1
    maybe a momentary power issue was one suggestion ... also, are you using SPI or I2C connection for that RC522? – Jaromanda X Apr 28 '21 at 02:35
  • 1
    @JaromandaX SPI – crimson589 Apr 28 '21 at 02:37
  • 1
    @JaromandaX I checked the logs again and I did find under-voltage warnings. Would that cause the reader to stop working? currently the things connected to the pi are the reader, a fan(5v), a monitor(4.3 inch lcd) connected via usb and hdmi. My power for the pi is a 5.1v – crimson589 Apr 28 '21 at 03:55

0 Answers0