Closed GoogleCodeExporter closed 9 years ago
Hello,
You're right, it is better to retrieve UID from a tag without reading
physically the
tag and fortunatelly you already have this data in tag structure.
Original comment by romu...@libnfc.org
on 9 Mar 2010 at 3:12
BTW, could you described what you experiment when you are saying:
"some problems with this function, when I tried to continuously searching for
tags"
What kind of problem ? What happends ?
I'm asking because i'm not sure that changing this method will avoid all
problems if
its related to reading when continuously searching for tag.
Original comment by romu...@libnfc.org
on 9 Mar 2010 at 3:17
Hi Roel,
So I search for tag in loop, in the first I get MifareTag and saves it, then in
the
next loops I get new MifareTag and compare UIDs from the old tag with the new
one. If
I find new Tag (UID don't equals) I save new MifareTag. The problem was with
Mifare
Ultraligth, because when I put this tag into the field, old and new UIDs don't
equals. I get similar UIDs but not the same.
If you'd like I could send you code, when I'll back from work :)
Original comment by rose...@gmail.com
on 10 Mar 2010 at 8:16
Ops... sorry Rconty, I clicked on the wrong email on your profile :P
Original comment by rose...@gmail.com
on 10 Mar 2010 at 8:29
D'oh! Must think before I code! I take it!
Original comment by romain.t...@gmail.com
on 30 Mar 2010 at 1:10
Hum, actualy, a Mifare UltraLight UID is 7 byte long but you select it
providing a 8 byte long UID.
e.g. nfc-list reports:
ATQA (SENS_RES): 00 44
UID (NFCID1): 88 04 99 9c 99 6d 02 80
SAK (SEL_RES): 00
mifare_ultralight_connect use 0x8804999c996d0280 to select the tag, but it's
UID is 0x04999c996d0280 (no
trailling 0x88)...
Original comment by romain.t...@gmail.com
on 30 Mar 2010 at 1:45
Temporary fix has been committed at r203. I don't close this since I really
think refactoring is required to have a
unique freefare_get_tag_uid(). Still thinking about it though...
Original comment by romain.t...@gmail.com
on 30 Mar 2010 at 2:01
0x88 is a special code called CT to cascade UID:
This is an NXP trick to allow to select 4 bytes UID same way we select 7 bytes
UID:
CT (Cascade Tag) byte (88), signals that the UID is not complete yet.
Have a look at
http://code.google.com/p/libnfc/source/browse/trunk/src/lib/nfc.c#405
Original comment by romu...@libnfc.org
on 30 Mar 2010 at 2:41
Okay, I am happy with r205!
rosek86, take note that you will need libnfc from at least r328 to have this
working in libfreefare.
Original comment by romain.t...@gmail.com
on 30 Mar 2010 at 4:27
Original issue reported on code.google.com by
rose...@gmail.com
on 9 Mar 2010 at 2:19