Topic: Driver for NXP RC522


I just bought this board:

It's based on NXP RC522 chip. Here are:
    - the user manual (datasheet):
    - ths SDK, Windows driver and code samples: (from the supplier website:

I know that it's not NFC compliant. But I'd like to use Mfoc for Mifare analyzing. To do that I need it is recognized by libnfc through a specific driver.

So my questions are:
    - How can I implement a linux driver to be able to use it as ISO14443 reader?
    - what functions does I have to implement?
    - in case it would be too complicated for me, where can I post a feature request for that? (I can provide a test environment)

Thank you.

Re: Driver for NXP RC522

Whoops! Just see that topic:

Any idea of its progress?

Thank you.

3 (edited by EvgenyBoger 2013-10-06 19:28:24)

Re: Driver for NXP RC522

Previous Ehuoyan's readers had simple serial protocol and didn't expose underlying chip interface. 
Looks like the same is for this new model.

You might consider this script interesting.It has nothing to do with libnfc though.

You probably should request serial protocol reference from Ehuoyan (they used to provide such a documents before).

Re: Driver for NXP RC522

Yes! Thank you for your answer. Your script seems very useful.

Ehuoyan gives me the serial protocol reference for their YHY523U module (Here: Seems to be the same as for YHY632. I modifed the python driver but cannot reach to make it working. The script is blocked on line 106 (cur_byte = because it doesn't read anything.

I tried raw writings on /dev/ttyUSB0 but did not work either.

Here is the beep command I want to run (from the serial API reference, section 5.3.5, but I don't hear the 'beep'):

echo -ne '\xaa\xbb\x06\x00\x00\x00\x06\x01\x64\x63' > /dev/ttyUSB0

Here is my serial conf:

~$ stty -a -F /dev/ttyUSB0 
speed 115200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S;
susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 0; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke

Maybe I missed an option. I would like the following configuration: Baud rate: 115200 bps (default), Data: 8 bits, Stop: 1 bit, Parity: None, Flow control: None

Any idea?

Thank you.

5 (edited by Alduin0 2014-04-24 03:20:49)

Re: Driver for NXP RC522

the rc522 is currently incompatible?

With arduino?

Re: Driver for NXP RC522

A driver for the rc522 would be really awesome, cause its a really cheap device. I know it doesn't supports NFC emulation like the 532, but I got my Arduino Shield with the 522 just for 2€ on eBay.
Libnfc support would extend the possibilities with this device.