diff options
author | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2005-11-08 10:34:18 +0000 |
---|---|---|
committer | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2005-11-08 10:34:18 +0000 |
commit | 7600eb5ebbb8ac0f7532e7e7ae6cb5d4dc29d30b (patch) | |
tree | f38665192c50bdcbbda8e74d00f585ced5cea63b /utils | |
parent | 27e8fe5394184505e09318d3691761da59ecdff5 (diff) |
- better layering abstraciton
- differentiate between library internal definitions and public ones
- implement getopt/setopt like get/setsockopt
- offer speed changing controls
git-svn-id: https://svn.gnumonks.org/trunk/librfid@1662 e0336214-984f-0b4b-a45f-81c69e1f0ede
Diffstat (limited to 'utils')
-rw-r--r-- | utils/openct-escape.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/openct-escape.c b/utils/openct-escape.c index 6f19eb5..0f9a68a 100644 --- a/utils/openct-escape.c +++ b/utils/openct-escape.c @@ -24,6 +24,7 @@ #include <rfid/rfid_protocol.h> #include <rfid/rfid_reader_cm5121.h> #include <rfid/rfid_protocol_mifare_classic.h> +#include <rfid/rfid_protocol_mifare_ul.h> static struct rfid_reader_handle *rh; static struct rfid_layer2_handle *l2h; @@ -250,7 +251,7 @@ mifare_classic_read(struct rfid_protocol_handle *ph) if (ret < 0) return ret; - printf("Page 0x%x: %s\n", i, rfid_hexdump(buf, 4)); + printf("Page 0x%x: %s\n", i, rfid_hexdump(buf, len)); } return 0; } @@ -319,12 +320,12 @@ int main(int argc, char **argv) #endif break; case RFID_PROTOCOL_MIFARE_CLASSIC: - rc = mfcl_set_key(ph, MIFARE_CL_KEYB_DEFAULT); + rc = mfcl_set_key(ph, MIFARE_CL_KEYA_DEFAULT_INFINEON); if (rc < 0) { printf("key format error\n"); exit(1); } - rc = mfcl_auth(ph, RFID_CMD_MIFARE_AUTH1B, 10); + rc = mfcl_auth(ph, RFID_CMD_MIFARE_AUTH1A, 0); if (rc < 0) { printf("mifare auth error\n"); exit(1); |