diff options
author | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2005-10-23 22:01:39 +0000 |
---|---|---|
committer | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2005-10-23 22:01:39 +0000 |
commit | 870fdfd44cc9fe080cd1d45d00975cb0e89ed7b0 (patch) | |
tree | 0b07df9557b2ca0bec3897f28955cf1af92544a8 /openct-escape.c | |
parent | b9e8c17d8c4f28938c7cb0a665a1f21232ebdf66 (diff) |
- 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
Diffstat (limited to 'openct-escape.c')
-rw-r--r-- | openct-escape.c | 11 |
1 files changed, 7 insertions, 4 deletions
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: |