[Pcsclite-muscle] Different behaviour with Select MF on Omnikey 5427 and 5022

Sebastien Lorquet sebastien at lorquet.fr
Wed Nov 4 10:33:21 EST 2020


Hello again

Again I would first compare the developer manuals of the two readers to 
make sure that these emulated commands are supported.

That should be quite easy and does not require anything costly.


Mifare classic is not handled using APDUs, so this timeout is not a real 
mute card condition when the select MF was sent to the card, since it 
will never be (makes no sense, not a valid MF classic command). It is a 
reader problem. Either because:

-one of the readers does not support the same emulation commands. Recent 
readers should be more compliant with PCSC 2 part 10 and would be likely 
to only support emulation commands with CLA=FFh and should not use 
card-support CLA values anymore.

-the apdu is actually sent to the card by the reader, despite the card 
not being in a state where it can process I-bocks (that encapsulates 
APDUs), since it's a mifare classic and not an ISO14443 compliant card.

39.7 ms is suspiciously close to the default FWT (frame waiting time) of 
38,7 ms achieved with the FWI = 7 used in ISO14443. I would guess the 
second point. The reader is trying to be clever by sending the apdu even 
if it can't.

What happens between the card and the readers could be very interesting. 
An RF analysis tool (micropross, proxispy, etc) is required to check that.

Sebastien

Le 04/11/2020 à 16:19, Ludovic Rousseau a écrit :
> Le mer. 4 nov. 2020 à 15:37, Stephan Guilloux
> <stephan.guilloux at crisalid.com> a écrit :
>> Hmmmmm.
>> I thought also to some kind of emulation ...
>> There, it's clearly out of my skills/materials to start on that part ;-)
> Me too.
> I am not a contactless expert. That is why it is always a good idea to
> ask questions on the pcsclite-muscle list.
>
>> Anyway, I had in mind another question to yours (reader does not wait
>> the card long enough):
>> Would it be possible that it's not the reader itself, but CCID,
>> claiming "no answer" a bit too early ?
> I am not sure to know what you call CCID here. I will assume it is the
> CCID driver.
>
>  From your traces we have:
> 00000053 [1953493952] -> 000000 6F 07 00 00 00 00 0C 00 00 00 00 A4 00
> 0C 02 3F 00
> 00039734 [1953493952] <- 000000 80 00 00 00 00 00 0C 40 FE 00
> 00000069 [1953493952] commands.c:1534:CCID_Receive Card absent or mute
>
> The reader answered with the error code 0xFE for "CCID timed out while
> talking to the ICC"
> It is a decision of the reader to report the error after 00039734 µs
> (or 39.7 ms). The driver can't force the reader to wait longer.
>
> Bye
>



More information about the pcsclite-muscle mailing list