Hello guys,
attached is a patch that fixes a few issues regarding SIM reader in Motorola phones
(tested on C123), description:
if there’s a lot of reading from SIM it happens a FIFO gets full, IMHO the right way is to
read until the FIFO is empty (while-loop added)
FETCH APDU has to be handled in the same way as GET RESPONSE (added)
once REG_SIM_IT_SIM_NATR is triggered it should set the rxDoneFlag to 1 because otherwise
there’s trouble recognising NO SIM state on L1 if SIM isn’t present
in calypso_sim_powerup() and calypso_sim_reset() should set state to IDLE and put sim_len
to 0 because if you do powerdown/powerup the state machine gets messed up
unsetting CONFBYPASS should make the CONFSVCCLEV and CONFSRSTLEV irrelevant but it
doesn’t, calypso_sim_powerdown() fixed based on calypso spec
both calypso_sim_powerup() and calypso_sim_powerup() now return ATR as it should be when
you poweron/reset the card
some minor debug messages fixed to keep all the messages consistent
Patch is apply-able on the current master.
Cheers!
Lukas