[Pcsclite-muscle] Gemalto (was Gemplus) GemPC Key SmartCard Reader not working in debian stretch
Wolfgang Pichler
wpichler
Mon May 22 02:26:15 PDT 2017
Hi,
i will try to collect this data.
An other thing i forgot to mention here - for me the bug only encountered on arm architecture (i have no idea why?) - the same lib versions on i386 / amd64 did worked.
I found the problem by adding some debug lines - to see where it does not get the correct answer. At this point i recongnised that the lib request to ready 65535 bytes from the usb stack - which seemed to be too much ;-). So i simply used a fixed value - which will be enough for my needs (signing a 256 bytes hash). But as said - this is just a workaround for me - no bug fix.
The only difference i found between the two sticks is - that the one which worked announced on more speed entry than the other stick. The rest ist identically.
Here is the original thread for reference:
http://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-20170220/000823.html <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-20170220/000823.html>
I forgot to answer - sorry.
The plattform is not a 2 byte int plattform.
The bug must be somewhere, where it does calculate the read size?
br,
Wolfgang
> Am 22.05.2017 um 11:05 schrieb Ludovic Rousseau <ludovic.rousseau at gmail.com>:
>
> 2017-05-22 10:16 GMT+02:00 Wolfgang Pichler <wpichler at callino.at <mailto:wpichler at callino.at>>:
> Hi,
>
> Hello,
>
> i did had the same bug - it seems that some Gemalto Sticks (not all) have a problem in the firmware intitalize procedure. Because of this problem you get a too big usb read bytes request - which will then fail?
>
> Very interesting.
>
> Can you send me the output of the GNU/Linux command "lsusb -v" for your bogus device?
> And also the lines logged by the Linux kernel when you connect the device.
>
> Same question with a non-bogus device if you have one.
>
> How have you found the work around?
> Have you used a USB hardware spy or something similar?
>
> I am surprised to see that changing the _reception_ buffer length has an effect. The USB device should not know this buffer size. But I am not a USB expert.
>
> Attached a workaround for this problem - which does work for me.
>
> But as stated - this is a workaround - not a real bug fix.
>
> The workaround has a bad size effect that reader responses of more than 4096 bytes would have problems.
> Before I apply any workaround I need to understand why your change makes the reader work.
>
> Bye
>
> --
> Dr. Ludovic Rousseau
> _______________________________________________
> Pcsclite-muscle mailing list
> Pcsclite-muscle at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20170522/2c3a09a6/attachment.html>
More information about the pcsclite-muscle
mailing list