aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Kerler <info@revskills.de>2011-10-21 20:01:01 +0200
committerHarald Welte <laforge@gnumonks.org>2011-10-21 20:01:01 +0200
commit427688677e365bdec801cad640b84ef215870e71 (patch)
treece900631f241c0a95784bc521965980b4cbf23fa
parent4b27294faf0fd1ac23ed2c8f780eaa8b599f5df2 (diff)
Fix fi/di calculation for certain mobiles like GT-S770 or HTC Raphael
There were some mistakes while copying the tables from ISO 7816-3, and also a quite old version of 7816-3 was used.
-rw-r--r--firmware/src/simtrace/iso7816_uart.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/src/simtrace/iso7816_uart.c b/firmware/src/simtrace/iso7816_uart.c
index 37b2fd7..17303ca 100644
--- a/firmware/src/simtrace/iso7816_uart.c
+++ b/firmware/src/simtrace/iso7816_uart.c
@@ -113,14 +113,14 @@ struct iso7816_3_handle isoh;
/* Table 6 from ISO 7816-3 */
static const u_int16_t fi_table[] = {
- 0, 372, 558, 744, 1116, 1488, 1860, 0,
+ 372, 372, 558, 744, 1116, 1488, 1860, 0,
0, 512, 768, 1024, 1536, 2048, 0, 0
};
/* Table 7 from ISO 7816-3 */
static const u_int8_t di_table[] = {
- 0, 1, 2, 4, 8, 16, 0, 0,
- 0, 0, 2, 4, 8, 16, 32, 64,
+ 0, 1, 2, 4, 8, 16, 32, 0,
+ 12, 20, 2, 4, 8, 16, 32, 64,
};
/* compute the F/D ratio based on Fi and Di values */