biktoe
Posts: 5
Joined: Fri May 20, 2016 8:41 am

RFC522 RFID Reader

Wed Jun 01, 2016 7:24 pm

Hi all,

Could someone point me in the right direction for the control of the RFC522 RFID reader/writer in JAVA? 99.9% of the times Google is my friend, but it has let me down in this case.
I'm already using Pi4J, but struggle to find proper examples for this hardware. All ready-made libraries/examples are in Python, a language which I despise :lol:

Any help would be appreciated!

Regards,
Bik

User avatar
topguy
Posts: 4611
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: RFC522 RFID Reader

Sun Jun 05, 2016 9:17 pm

Probably not much resources in Java for a device meant for Arduinos.
Most likely you would have to re-engineer the code yourself based on some previous implementations.

clicky
Posts: 222
Joined: Thu Oct 25, 2012 7:34 am

Re: RFC522 RFID Reader

Mon Jun 06, 2016 7:25 am

MFRC522 is not made for Arduino - it is general purpose chip which on this board was configured to use SPI interface (if I got it right - at least by https://www.addicore.com/v/vspfiles/dow ... tGuide.pdf or https://community.particle.io/t/getting ... ed/3571/97).

Read documentation (for instance here: http://www.nxp.com/documents/data_sheet/MFRC522.pdf) and get the commands you need to send it for it to work (read/write data of it).

Pi4j (http://pi4j.com/) provides low level SPI interface (sorry - it seems that I am one of those who say LED diode O: ) and you can take it from there. Here is example file: https://github.com/Pi4J/pi4j/blob/maste ... ample.java

HTH

mattlewis
Posts: 111
Joined: Sat Jan 12, 2013 3:05 pm
Location: UK
Contact: Website

Re: RFC522 RFID Reader

Mon Jun 06, 2016 11:56 am

I've just ordered one of these off ebay and will be adding support for it in my diozero Java library.
Matt
http://www.diozero.com/

Sacredgamer
Posts: 1
Joined: Tue Feb 13, 2018 11:34 pm

Re: RFC522 RFID Reader

Tue Feb 13, 2018 11:42 pm

Hello guys,

I know this thread is old but I made my own interface for Java. I followed the instructions on this site:
https://pimylifeup.com/raspberry-pi-rfid-rc522/

In addition, I created the following API for Java:
https://github.com/Sacredgamer/RFID-RC552-Interface

mattlewis
Posts: 111
Joined: Sat Jan 12, 2013 3:05 pm
Location: UK
Contact: Website

Re: RFC522 RFID Reader

Sun Feb 18, 2018 5:29 pm

Nice. I should have updated this thread, I ported the Arduino library to Java last year, code here: https://github.com/mattjlewis/diozero/b ... RC522.java

Matt
http://www.diozero.com/

Return to “Java”

Who is online

Users browsing this forum: No registered users and 4 guests