b/src/target/firmware/calypso/sim.c
@@ -536,6 +536,8 @@ void sim_handler(void)
/* Case 2: No input / Output of known length */
if (mode == SIM_APDU_PUT) {
sim_state = SIM_STATE_RX_ACK;
+ /* ignore waiting char here*/
+ sim_ignore_waiting_char = 1;
calypso_sim_receive(response, 1);
break;
/* Case 4: Input / No output */
@@ -563,6 +565,8 @@ void sim_handler(void)
break; /* wait until data is received */
/* Disable all interrupt driven functions */
writew(0xFF, REG_SIM_MASKIT);
+ /*stop ignoring waiting char*/
+ sim_ignore_waiting_char = 0;
/* error received */
if (sim_rx_character_count == 2) {
puts("SIM: command failed\n");