From 870fdfd44cc9fe080cd1d45d00975cb0e89ed7b0 Mon Sep 17 00:00:00 2001 From: laforge Date: Sun, 23 Oct 2005 22:01:39 +0000 Subject: - handle reception of chained frames correctly - workaround to RC632 problem: asic doesn't remove crc bytes at end of frame ?!? git-svn-id: https://svn.gnumonks.org/trunk/librfid@1560 e0336214-984f-0b4b-a45f-81c69e1f0ede --- openct-escape.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'openct-escape.c') diff --git a/openct-escape.c b/openct-escape.c index 628aded..92a8f94 100644 --- a/openct-escape.c +++ b/openct-escape.c @@ -147,7 +147,7 @@ static int select_mf(void) } -static int get_challenge(unsigned char len) +static int iso7816_get_challenge(unsigned char len) { unsigned char cmd[] = { 0x00, 0x84, 0x00, 0x00, 0x08 }; unsigned char ret[256]; @@ -161,7 +161,7 @@ static int get_challenge(unsigned char len) if (rv < 0) return rv; - //printf("%s\n", rfid_hexdump(ret, rlen)); + printf("%d: [%s]\n", rlen, rfid_hexdump(ret, rlen)); return 0; } @@ -181,6 +181,8 @@ iso7816_select_application(void) return rv; /* FIXME: parse response */ + printf("%s\n", rfid_hexdump(resp, rlen)); + return 0; } @@ -201,6 +203,7 @@ iso7816_select_ef(u_int16_t fid) return rv; /* FIXME: parse response */ + printf("%s\n", rfid_hexdump(resp, rlen)); return 0; } @@ -325,9 +328,9 @@ int main(int argc, char **argv) iso7816_select_application(); iso7816_select_ef(0x011e); iso7816_select_ef(0x0101); -#if 0 +#if 1 for (i = 0; i < 4; i++) - get_challenge(0x60); + iso7816_get_challenge(0x60); #endif break; case RFID_PROTOCOL_MIFARE_UL: -- cgit v1.2.3