Communicate with NFC Reader and Mifare ultralight bracelet

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Communicate with NFC Reader and Mifare ultralight bracelet

1,687 Views
bruno_piccinin
Contributor I

Hello,

I have some issues about R/W Mifare ultralight tag.

First of all, I need to communicate to NFC Reader using Android.

The hardware is not a built-in hardware, and I'm communicating with the NFC Reader through serial port ("dev/ttyS2").

The supplier sent me only these documentation about the NFC Reader

https://cdn-shop.adafruit.com/datasheets/S50.pdf 

And about the NFC Reader Hardware

http://www.chinaidcard.com/uploadfiles/files/20170728182043_7212.pdf 

With some sample code, at the moment I am able though our android app to read data of specific sector, block and key of Mifare Classic 1k card.

At the moment I'm using the following command to get data

Es. Sector 1, Block 1, Key B

AUTO READ Command -> 20 00 80 04 07 03 01 00 7E 03

ACTIVATE CARD Command -> 20 00 10 01 00 EE 03

LOAD KEY Command -> 20 00 4C 08 04 01 FF FF FF FF FF FF BE 03

READ BLOCK Command -> 20 00 12 03 04 01 05 EE 03

WRITE BLOCK Command -> 20 00 11 13 04 01 05 Byte[16] ED 03

Studying the commands, I noted that the 2 first bytes 20 00 are always fixed.

The last 2 bytes depends for the action (maybe?)

The Sector and block (combination) are defined by the byte I marked with this color.

The key (A or B) is defined by the byte I marked with this color.

The oder bytes are fixed, but I have not yet understood the meaning of their value.

With those commands in that order, our app can read the data of a block (Sector 1, Block 1, Key B) when we pass the NFC Card near the NFC Reader Hardware.

I need to do the same with a MIfare Ultralight NTAG2016 bracelet, but I don't know how to do that.

I can't find the proper commands to do what I need.

With a Mifare Ultralight i can read only the serial number.

Can someone help me to do the same thing with Mifare Ultralight tag?

0 Kudos
1 Reply

1,205 Views
Jonathan_Iglesias
NXP TechSupport
NXP TechSupport

Dear Bruno Piccinin, please check this community document that can help you to see the command sequence to change the key form ultralight C and perform write operations also to protect it. 

https://community.nxp.com/docs/DOC-341606

if you have more questions please let me know.

Have a great day !

BR

Jonathan

0 Kudos