Topic: Reading the correct data from tag in C

Hey guys,

I am very new to this but I have managed to implement in my own project the code from nfc-mfultralight.c.
What I don't understand is that when I read the data I get lots of garbage.

For example, I have 255555574558888 in the tag (I used an android device to do this).
Now when I run :

nfc-mfultralight r /home/user/dump

I get this

d▒r▒!▒ H▒▒U255555574558888▒-67644-67546-2346

This is from the examples, so shouldn't it just read the correct data? The android app I am using just sees the 255555574558888 value. The value -67644-67546-2346 is part of what I had written before.

How do I know just the correct data I need to read? What should I change in the example code so that it works correctly?

I am using an ACR122 to read the data from the tags.


PS: This is my first project with nfc devices, lib nfc and MIFARE Ultralight tags, so any things you think I should read please do tell me. Regards.

Re: Reading the correct data from tag in C

I sort of fixed this.
I saw the hex in the tags and kind of so where the payload started, so I basically ignore (most of) the other stuff and just get what I want.

Re: Reading the correct data from tag in C

Anyone here alive?? I am not asking anyone to write the code for me but maybe point me in the right direction.

I have fixed this issue by just getting what I want but I would really like to know how to properly read the tag.