From 29e9d188b45b998d71e62691d7fd2a37060b73af Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Wed, 15 Dec 2010 12:51:05 +0000 Subject: [PATCH] Display additional Mifare DESFire EV1 information if applicable. --- examples/mifare-desfire-info.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/examples/mifare-desfire-info.c b/examples/mifare-desfire-info.c index 0ac09f5..e00d492 100644 --- a/examples/mifare-desfire-info.c +++ b/examples/mifare-desfire-info.c @@ -119,6 +119,17 @@ main(int argc, char *argv[]) mifare_desfire_get_key_version (tags[i], 0, &version); printf ("Master Key version: %d (0x%02x)\n", version, version); + uint32_t size; + res = mifare_desfire_free_mem (tags[i], &size); + printf ("Free memory: "); + if (0 == res) { + printf ("%d bytes\n", size); + } else { + printf ("unknown\n"); + } + + printf ("Use random UID: %s\n", (strlen (tag_uid) / 2 == 4) ? "yes" : "no"); + free (tag_uid); mifare_desfire_disconnect (tags[i]);