No output when tracing a Gemalto Cryptoflex ,NET card

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/simtrace@lists.osmocom.org/.

Holger Hans Peter Freyther holger at freyther.de
Tue Jan 10 18:23:19 UTC 2012


On 01/10/2012 06:55 PM, jeremy brookfield wrote:

>
> However, when the card type is a Gemalto  Cryptoflex .NET alI see is the ATR APDU.

Hi,

i think this is known[1], what happens is that ATR and the first APDU end in 
the same USB message and then on the host the apdu_split does not work 
correctly, the hack to prevent this is below.



[1] http://lists.osmocom.org/pipermail/simtrace/2011-December/000193.html

diff --git a/firmware/src/simtrace/iso7816_uart.c 
b/firmware/src/simtrace/iso7816_uart.c
index 17303ca..16a7db3 100644
--- a/firmware/src/simtrace/iso7816_uart.c
+++ b/firmware/src/simtrace/iso7816_uart.c
@@ -258,6 +258,8 @@ transition_to_tck(struct iso7816_3_handle *ih)
                 /* If only T=0 supported, there is no TCK but we
                  * immediately transition to APDUs */
                 set_atr_state(ih, ATR_S_DONE);
+               /* send off the USB context */
+               ih->rctx_must_be_sent = 1;
                 return ISO7816_S_WAIT_APDU;
         } else {
                 set_atr_state(ih, ATR_S_WAIT_TCK);




More information about the simtrace mailing list