On Saturday 18 March 2006 16:52, Chaskiel Grundman wrote:
> > send: 00 a4 00 0c 02 3f 00
> > recv: a4
>
> This means that the set_protocol patch is incorrect. the a4 is a proper
> T=0 ack byte. (and my assumptions about what usb T=0 devices do don't
> apply here)
>
> You didn't say what actually happens when eutron_send only gets/sends 5
> bytes. Does the card reply at all in that case?

send: 00 a4 00 0c 02
recv: a4

This results in an immediate error after reading the a4, and I see why.  
eutron_recv has this code in the loop:

  if(rbs == 0)
    goto failed;

rbs probably means "remaining bytes" ?

Since in this case it is for a read of len=1, all the desired data is read, 
and this is considered an error.  I changed the "goto failed" into a "break" 
and now we get farther:

send: 3f 00

After sending these next two bytes, openct tries to read len=1.  The first 
attempt returns no data.  The second attempt returns -5 (ioctl error), and 
that's the end.

-Justin
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to