Re: Gemalto (was Gemplus) GemPC Key SmartCard Reader not working in debian stretch

Sébastien Chaumat <[email protected]> Tue, 23 May 2017 21:25:45 +0000
Newsgroups gmane.comp.lib.muscle
Message-ID <CAKm-UmakNJGDpqp=LzXpOqKY6C5FJrKmTa-1NgmtrU21vWzrcw@mail.gmail.com>
--94eb2c0600fe1071aa055037a261
Content-Type: multipart/alternative; boundary="94eb2c0600fe1071a3055037a25f"

--94eb2c0600fe1071a3055037a25f
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Kernel output

10341.496256] usb 1-1: new full-speed USB device number 26 using xhci_hcd
[10341.641725] usb 1-1: New USB device found, idVendor=3D08e6, idProduct=3D=
3438
[10341.641732] usb 1-1: New USB device strings: Mfr=3D1, Product=3D2,
SerialNumber=3D3
[10341.641736] usb 1-1: Product: USB SmartCard Reader
[10341.641739] usb 1-1: Manufacturer: Gemalto
[10341.641742] usb 1-1: SerialNumber: CF4B23C4

lsusb -v in attachement

Le lun. 22 mai 2017 =C3=A0 11:07, Ludovic Rousseau <ludovic.rousseau@gmail.=
com>
a =C3=A9crit :

> 2017-05-22 10:16 GMT+02:00 Wolfgang Pichler <[email protected]>:
>
>> Hi,
>>
>
> Hello,
>
>
>> i did had the same bug - it seems that some Gemalto Sticks (not all) hav=
e
>> a problem in the firmware intitalize procedure. Because of this problem =
you
>> get a too big usb read bytes request - which will then fail=E2=80=A6
>>
>
> 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 U=
SB
> 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
> [email protected]
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle

--94eb2c0600fe1071a3055037a25f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Kernel output</div><div><br></div><div>10341.496256] =
usb 1-1: new full-speed USB device number 26 using xhci_hcd</div><div>[1034=
1.641725] usb 1-1: New USB device found, idVendor=3D08e6, idProduct=3D3438<=
/div><div>[10341.641732] usb 1-1: New USB device strings: Mfr=3D1, Product=
=3D2, SerialNumber=3D3</div><div>[10341.641736] usb 1-1: Product: USB Smart=
Card Reader</div><div>[10341.641739] usb 1-1: Manufacturer: Gemalto</div><d=
iv>[10341.641742] usb 1-1: SerialNumber: CF4B23C4</div><div><br></div><div>=
lsusb -v in attachement</div><br><div class=3D"gmail_quote"><div dir=3D"ltr=
">Le=C2=A0lun. 22 mai 2017 =C3=A0=C2=A011:07, Ludovic Rousseau &lt;<a href=
=3D"mailto:[email protected]">[email protected]</a>&gt; a=
 =C3=A9crit=C2=A0:<br></div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"=
><div class=3D"gmail_extra"><div class=3D"gmail_quote">2017-05-22 10:16 GMT=
+02:00 Wolfgang Pichler <span dir=3D"ltr">&lt;<a href=3D"mailto:wpichler@ca=
llino.at" target=3D"_blank">[email protected]</a>&gt;</span>:<br><blockqu=
ote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc s=
olid;padding-left:1ex"><div style=3D"word-wrap:break-word">Hi,</div></block=
quote><div><br></div><div>Hello,<br>=C2=A0<br></div></div></div></div><div =
dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote"><blockquo=
te class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc so=
lid;padding-left:1ex"><div style=3D"word-wrap:break-word"><div></div><div>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 g=
et a too big usb read bytes request - which will then fail=E2=80=A6</div></=
div></blockquote><div><br></div></div></div></div><div dir=3D"ltr"><div cla=
ss=3D"gmail_extra"><div class=3D"gmail_quote"><div>Very interesting.<br><br=
></div><div>Can you send me the output of the GNU/Linux command &quot;lsusb=
 -v&quot; for your bogus device?<br>And also the lines logged by the Linux =
kernel when you connect the device.<br><br>Same question with a non-bogus d=
evice if you have one.<br></div><div><br>How have you found the work around=
?<br></div><div>Have you used a USB hardware spy or something similar?<br><=
br></div><div>I am surprised to see that changing the _reception_ buffer le=
ngth has an effect. The USB device should not know this buffer size. But I =
am not a USB expert.<br></div></div></div></div><div dir=3D"ltr"><div class=
=3D"gmail_extra"><div class=3D"gmail_quote"><div>=C2=A0<br></div><blockquot=
e class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc sol=
id;padding-left:1ex"><div style=3D"word-wrap:break-word"><div>Attached a wo=
rkaround for this problem - which does work for me.</div><div><br></div><di=
v>But as stated - this is a workaround - not a real bug fix.</div></div></b=
lockquote><div><br></div></div></div></div><div dir=3D"ltr"><div class=3D"g=
mail_extra"><div class=3D"gmail_quote"><div>The workaround has a bad size e=
ffect that reader responses of more than 4096 bytes would have problems.<br=
></div><div>Before I apply any workaround I need to understand why your cha=
nge makes the reader work.<br clear=3D"all"></div></div><br></div><div clas=
s=3D"gmail_extra">Bye<br><br></div></div><div dir=3D"ltr"><div class=3D"gma=
il_extra">-- <br><div class=3D"m_330151553136158136m_-287520824702272625gma=
il_signature" data-smartmail=3D"gmail_signature">=C2=A0Dr. Ludovic Rousseau=
</div>
</div></div>
_______________________________________________<br>
Pcsclite-muscle mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank=
">[email protected]</a><br>
<a href=3D"http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite=
-muscle" rel=3D"noreferrer" target=3D"_blank">http://lists.alioth.debian.or=
g/cgi-bin/mailman/listinfo/pcsclite-muscle</a></blockquote></div></div>

--94eb2c0600fe1071a3055037a25f--
--94eb2c0600fe1071aa055037a261
Content-Type: text/plain; charset="US-ASCII"; name="lsub-gemalto.txt"
Content-Disposition: attachment; filename="lsub-gemalto.txt"
Content-Transfer-Encoding: base64
Content-ID: <15c373386cb4d92debe1>
X-Attachment-Id: 15c373386cb4d92debe1

QnVzIDAwMSBEZXZpY2UgMDI2OiBJRCAwOGU2OjM0MzggR2VtYWx0byAod2FzIEdlbXBsdXMpIEdl
bVBDIEtleSBTbWFydENhcmQgUmVhZGVyCkRldmljZSBEZXNjcmlwdG9yOgogIGJMZW5ndGggICAg
ICAgICAgICAgICAgMTgKICBiRGVzY3JpcHRvclR5cGUgICAgICAgICAxCiAgYmNkVVNCICAgICAg
ICAgICAgICAgMi4wMAogIGJEZXZpY2VDbGFzcyAgICAgICAgICAgIDAgKERlZmluZWQgYXQgSW50
ZXJmYWNlIGxldmVsKQogIGJEZXZpY2VTdWJDbGFzcyAgICAgICAgIDAKICBiRGV2aWNlUHJvdG9j
b2wgICAgICAgICAwCiAgYk1heFBhY2tldFNpemUwICAgICAgICAgOAogIGlkVmVuZG9yICAgICAg
ICAgICAweDA4ZTYgR2VtYWx0byAod2FzIEdlbXBsdXMpCiAgaWRQcm9kdWN0ICAgICAgICAgIDB4
MzQzOCBHZW1QQyBLZXkgU21hcnRDYXJkIFJlYWRlcgogIGJjZERldmljZSAgICAgICAgICAgIDIu
MDAKICBpTWFudWZhY3R1cmVyICAgICAgICAgICAxIEdlbWFsdG8KICBpUHJvZHVjdCAgICAgICAg
ICAgICAgICAyIFVTQiBTbWFydENhcmQgUmVhZGVyCiAgaVNlcmlhbCAgICAgICAgICAgICAgICAg
MyBDRjRCMjNDNAogIGJOdW1Db25maWd1cmF0aW9ucyAgICAgIDEKICBDb25maWd1cmF0aW9uIERl
c2NyaXB0b3I6CiAgICBiTGVuZ3RoICAgICAgICAgICAgICAgICA5CiAgICBiRGVzY3JpcHRvclR5
cGUgICAgICAgICAyCiAgICB3VG90YWxMZW5ndGggICAgICAgICAgIDkzCiAgICBiTnVtSW50ZXJm
YWNlcyAgICAgICAgICAxCiAgICBiQ29uZmlndXJhdGlvblZhbHVlICAgICAxCiAgICBpQ29uZmln
dXJhdGlvbiAgICAgICAgICAwCiAgICBibUF0dHJpYnV0ZXMgICAgICAgICAweDgwCiAgICAgIChC
dXMgUG93ZXJlZCkKICAgIE1heFBvd2VyICAgICAgICAgICAgICAgNTBtQQogICAgSW50ZXJmYWNl
IERlc2NyaXB0b3I6CiAgICAgIGJMZW5ndGggICAgICAgICAgICAgICAgIDkKICAgICAgYkRlc2Ny
aXB0b3JUeXBlICAgICAgICAgNAogICAgICBiSW50ZXJmYWNlTnVtYmVyICAgICAgICAwCiAgICAg
IGJBbHRlcm5hdGVTZXR0aW5nICAgICAgIDAKICAgICAgYk51bUVuZHBvaW50cyAgICAgICAgICAg
MwogICAgICBiSW50ZXJmYWNlQ2xhc3MgICAgICAgIDExIENoaXAvU21hcnRDYXJkCiAgICAgIGJJ
bnRlcmZhY2VTdWJDbGFzcyAgICAgIDAKICAgICAgYkludGVyZmFjZVByb3RvY29sICAgICAgMAog
ICAgICBpSW50ZXJmYWNlICAgICAgICAgICAgICAwCiAgICAgIENoaXBDYXJkIEludGVyZmFjZSBE
ZXNjcmlwdG9yOgogICAgICAgIGJMZW5ndGggICAgICAgICAgICAgICAgNTQKICAgICAgICBiRGVz
Y3JpcHRvclR5cGUgICAgICAgIDMzCiAgICAgICAgYmNkQ0NJRCAgICAgICAgICAgICAgMS4wMSAg
KFdhcm5pbmc6IE9ubHkgYWNjdXJhdGUgZm9yIHZlcnNpb24gMS4wKQogICAgICAgIG5NYXhTbG90
SW5kZXggICAgICAgICAgIDAKICAgICAgICBiVm9sdGFnZVN1cHBvcnQgICAgICAgICA3ICA1LjBW
IDMuMFYgMS44VgogICAgICAgIGR3UHJvdG9jb2xzICAgICAgICAgICAgIDMgIFQ9MCBUPTEKICAg
ICAgICBkd0RlZmF1bHRDbG9jayAgICAgICA0ODAwCiAgICAgICAgZHdNYXhpdW11bUNsb2NrICAg
ICAgNDgwMAogICAgICAgIGJOdW1DbG9ja1N1cHBvcnRlZCAgICAgIDAKICAgICAgICBkd0RhdGFS
YXRlICAgICAgICAgIDEyOTAzIGJwcwogICAgICAgIGR3TWF4RGF0YVJhdGUgICAgICA4MjU4MDYg
YnBzCiAgICAgICAgYk51bURhdGFSYXRlc1N1cHAuICAgICA1MwogICAgICAgIGR3TWF4SUZTRCAg
ICAgICAgICAgICAyNTQKICAgICAgICBkd1N5bmNQcm90b2NvbHMgIDAwMDAwMDAwCiAgICAgICAg
ZHdNZWNoYW5pY2FsICAgICAwMDAwMDAwMAogICAgICAgIGR3RmVhdHVyZXMgICAgICAgMDAwMTAy
MzAKICAgICAgICAgIEF1dG8gY2xvY2sgY2hhbmdlCiAgICAgICAgICBBdXRvIGJhdWQgcmF0ZSBj
aGFuZ2UKICAgICAgICAgIE5BRCB2YWx1ZSBvdGhlciB0aGFuIDB4MDAgYWNjZXB0ZWQKICAgICAg
ICAgIFRQRFUgbGV2ZWwgZXhjaGFuZ2UKICAgICAgICBkd01heENDSURNc2dMZW4gICAgICAgMjcx
CiAgICAgICAgYkNsYXNzR2V0UmVzcG9uc2UgICAgICAwMAogICAgICAgIGJDbGFzc0VudmVsb3Bl
ICAgICAgICAgMDAKICAgICAgICB3bGNkTGF5b3V0ICAgICAgICAgICBub25lCiAgICAgICAgYlBJ
TlN1cHBvcnQgICAgICAgICAgICAgMAogICAgICAgIGJNYXhDQ0lEQnVzeVNsb3RzICAgICAgIDEK
ICAgICAgRW5kcG9pbnQgRGVzY3JpcHRvcjoKICAgICAgICBiTGVuZ3RoICAgICAgICAgICAgICAg
ICA3CiAgICAgICAgYkRlc2NyaXB0b3JUeXBlICAgICAgICAgNQogICAgICAgIGJFbmRwb2ludEFk
ZHJlc3MgICAgIDB4MDEgIEVQIDEgT1VUCiAgICAgICAgYm1BdHRyaWJ1dGVzICAgICAgICAgICAg
MgogICAgICAgICAgVHJhbnNmZXIgVHlwZSAgICAgICAgICAgIEJ1bGsKICAgICAgICAgIFN5bmNo
IFR5cGUgICAgICAgICAgICAgICBOb25lCiAgICAgICAgICBVc2FnZSBUeXBlICAgICAgICAgICAg
ICAgRGF0YQogICAgICAgIHdNYXhQYWNrZXRTaXplICAgICAweDAwNDAgIDF4IDY0IGJ5dGVzCiAg
ICAgICAgYkludGVydmFsICAgICAgICAgICAgICAgMAogICAgICBFbmRwb2ludCBEZXNjcmlwdG9y
OgogICAgICAgIGJMZW5ndGggICAgICAgICAgICAgICAgIDcKICAgICAgICBiRGVzY3JpcHRvclR5
cGUgICAgICAgICA1CiAgICAgICAgYkVuZHBvaW50QWRkcmVzcyAgICAgMHg4MiAgRVAgMiBJTgog
ICAgICAgIGJtQXR0cmlidXRlcyAgICAgICAgICAgIDIKICAgICAgICAgIFRyYW5zZmVyIFR5cGUg
ICAgICAgICAgICBCdWxrCiAgICAgICAgICBTeW5jaCBUeXBlICAgICAgICAgICAgICAgTm9uZQog
ICAgICAgICAgVXNhZ2UgVHlwZSAgICAgICAgICAgICAgIERhdGEKICAgICAgICB3TWF4UGFja2V0
U2l6ZSAgICAgMHgwMDQwICAxeCA2NCBieXRlcwogICAgICAgIGJJbnRlcnZhbCAgICAgICAgICAg
ICAgIDAKICAgICAgRW5kcG9pbnQgRGVzY3JpcHRvcjoKICAgICAgICBiTGVuZ3RoICAgICAgICAg
ICAgICAgICA3CiAgICAgICAgYkRlc2NyaXB0b3JUeXBlICAgICAgICAgNQogICAgICAgIGJFbmRw
b2ludEFkZHJlc3MgICAgIDB4ODMgIEVQIDMgSU4KICAgICAgICBibUF0dHJpYnV0ZXMgICAgICAg
ICAgICAzCiAgICAgICAgICBUcmFuc2ZlciBUeXBlICAgICAgICAgICAgSW50ZXJydXB0CiAgICAg
ICAgICBTeW5jaCBUeXBlICAgICAgICAgICAgICAgTm9uZQogICAgICAgICAgVXNhZ2UgVHlwZSAg
ICAgICAgICAgICAgIERhdGEKICAgICAgICB3TWF4UGFja2V0U2l6ZSAgICAgMHgwMDA4ICAxeCA4
IGJ5dGVzCiAgICAgICAgYkludGVydmFsICAgICAgICAgICAgICAxNgpEZXZpY2UgU3RhdHVzOiAg
ICAgMHgwMDAwCiAgKEJ1cyBQb3dlcmVkKQo=
--94eb2c0600fe1071aa055037a261
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Pcsclite-muscle mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
--94eb2c0600fe1071aa055037a261--