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

Wolfgang Pichler <[email protected]> Mon, 22 May 2017 11:53:26 +0200
Newsgroups gmane.comp.lib.muscle
Message-ID <[email protected]>
--===============6406795020920303547==
Content-Type: multipart/alternative;
 boundary="Apple-Mail=_28CD11A4-C52B-4929-B3AF-E85408CDB44C"


--Apple-Mail=_28CD11A4-C52B-4929-B3AF-E85408CDB44C
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Hi,

i=E2=80=99ve also thought about a bug in the libusb - but also an =
upgrade to the latest libusb did not help. The same (latest) libusb =
version on amd64 did work - and on arm it did not work.

So - yes - without the workaround i have two Gemalto sticks - one is =
working - the other one not.

I am using this sticks on a raspberry - running a customized raspbian =
(odoo PosBox Image)

https://downloads.raspberrypi.org/raspbian_lite_latest


I=E2=80=99ve not tried an upgrade to the latest linux kernel - because i =
do not have a cross compile environment here - and i do not assume that =
it will have to do something with the bug.

Do you have a raspberry for testing ? I can send you these two sticks if =
you want.

br,
Wolfgang

> Am 22.05.2017 um 11:38 schrieb Ludovic Rousseau =
<[email protected]>:
>=20
> 2017-05-22 11:26 GMT+02:00 Wolfgang Pichler <[email protected] =
<mailto:[email protected]>>:
> Hi,
>=20
> Hello,
> =20
>=20
> i will try to collect this data.
>=20
> An other thing i forgot to mention here - for me the bug only =
encountered on arm architecture (i have no idea why=E2=80=A6) - the same =
lib versions on i386 / amd64 did worked.
>=20
> I suspect a bug in the USB hardware or USB Linux layer of your arm =
platform then.
>=20
> I just talked to a USB expert and the reader (USB device) has no idea =
of the reception buffer size. So the problem should not be in the reader =
(for this bug).
>=20
> 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.
>=20
> 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.
>=20
> Without your change you have a working reader and a non working one?
>=20
> Using the same hardware and software platform?
> =20
> Here is the original thread for reference:
> =
http://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-20170=
220/000823.html =
<http://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-2017=
0220/000823.html>
>=20
> I forgot to answer - sorry.
>=20
> The plattform is not a 2 byte int plattform.=20
> =20
>=20
> The bug must be somewhere, where it does calculate the read size=E2=80=A6=

>=20
> Try to upgrade to a recent Linux kernel.
> Are you using Linux?
>=20
> Bye
>=20
> --=20
>  Dr. Ludovic Rousseau
> _______________________________________________
> Pcsclite-muscle mailing list
> [email protected]
> =
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle


--Apple-Mail=_28CD11A4-C52B-4929-B3AF-E85408CDB44C
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D"">Hi,<div class=3D""><br class=3D""></div><div class=3D"">i=E2=80=
=99ve also thought about a bug in the libusb - but also an upgrade to =
the latest libusb did not help. The same (latest) libusb version on =
amd64 did work - and on arm it did not work.</div><div class=3D""><br =
class=3D""></div><div class=3D"">So - yes - without the workaround i =
have two Gemalto sticks - one is working - the other one not.</div><div =
class=3D""><br class=3D""></div><div class=3D"">I am using this sticks =
on a raspberry - running a customized raspbian (odoo PosBox =
Image)</div><div class=3D""><br class=3D""></div><div class=3D""><pre =
style=3D"background-color:#2b2b2b;color:#a9b7c6;font-family:'Menlo';font-s=
ize:9,0pt;" class=3D""><span style=3D"color:#6a8759;" class=3D""><a =
href=3D"https://downloads.raspberrypi.org/raspbian_lite_latest" =
class=3D"">https://downloads.raspberrypi.org/raspbian_lite_latest</a></spa=
n></pre><div class=3D""><br class=3D""></div></div><div class=3D""><br =
class=3D""></div><div class=3D"">I=E2=80=99ve not tried an upgrade to =
the latest linux kernel - because i do not have a cross compile =
environment here - and i do not assume that it will have to do something =
with the bug.</div><div class=3D""><br class=3D""></div><div class=3D"">Do=
 you have a raspberry for testing ? I can send you these two sticks if =
you want.</div><div class=3D""><br class=3D""></div><div =
class=3D"">br,</div><div class=3D"">Wolfgang</div><div class=3D""><br =
class=3D""></div><div class=3D""><div><blockquote type=3D"cite" =
class=3D""><div class=3D"">Am 22.05.2017 um 11:38 schrieb Ludovic =
Rousseau &lt;<a href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt;:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" =
class=3D""><div class=3D"gmail_extra"><div =
class=3D"gmail_quote">2017-05-22 11:26 GMT+02:00 Wolfgang Pichler <span =
dir=3D"ltr" class=3D"">&lt;<a href=3D"mailto:[email protected]" =
target=3D"_blank" class=3D"">[email protected]</a>&gt;</span>:<br =
class=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div =
style=3D"word-wrap:break-word" class=3D"">Hi,</div></blockquote><div =
class=3D""><br class=3D""></div><div class=3D"">Hello,<br =
class=3D"">&nbsp;<br class=3D""></div><blockquote class=3D"gmail_quote" =
style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex"><div style=3D"word-wrap:break-word" =
class=3D""><div class=3D""><br class=3D""></div><div class=3D"">i will =
try to collect this data.</div><div class=3D""><br class=3D""></div><div =
class=3D"">An other thing i forgot to mention here - for me the bug only =
encountered on arm architecture (i have no idea why=E2=80=A6) - the same =
lib versions on i386 / amd64 did worked.</div></div></blockquote><div =
class=3D""><br class=3D""></div><div class=3D"">I suspect a bug in the =
USB hardware or USB Linux layer of your arm platform then.<br class=3D""> =
<br class=3D""></div><div class=3D"">I just talked to a USB expert and =
the reader (USB device) has no idea of the reception buffer size. So the =
problem should not be in the reader (for this bug).<br class=3D""><br =
class=3D""></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div =
style=3D"word-wrap:break-word" class=3D""><div class=3D"">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.</div><div class=3D""><br class=3D""></div><div =
class=3D"">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.</div></div></blockquote><div class=3D""><br =
class=3D""></div><div class=3D"">Without your change you have a working =
reader and a non working one?<br class=3D""></div><div class=3D""><br =
class=3D"">Using the same hardware and software platform?<br =
class=3D"">&nbsp;<br class=3D""></div><blockquote class=3D"gmail_quote" =
style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex"><div style=3D"word-wrap:break-word" =
class=3D""><div class=3D"">Here is the original thread for =
reference:</div><div class=3D""><a =
href=3D"http://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-M=
on-20170220/000823.html" target=3D"_blank" =
class=3D"">http://lists.alioth.debian.<wbr =
class=3D"">org/pipermail/pcsclite-muscle/<wbr =
class=3D"">Week-of-Mon-20170220/000823.<wbr class=3D"">html</a></div><div =
class=3D""><br class=3D""></div><div class=3D"">I forgot to answer - =
sorry.</div><div class=3D""><br class=3D""></div><div class=3D"">The =
plattform is not a 2 byte int plattform. <br =
class=3D""></div></div></blockquote><blockquote class=3D"gmail_quote" =
style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex"><div style=3D"word-wrap:break-word" =
class=3D""><div class=3D"">&nbsp;</div></div></blockquote><blockquote =
class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex"><div style=3D"word-wrap:break-word" =
class=3D""><div class=3D""><br class=3D""></div><div class=3D"">The bug =
must be somewhere, where it does calculate the read =
size=E2=80=A6</div></div></blockquote><div class=3D""><br =
class=3D""></div><div class=3D"">Try to upgrade to a recent Linux =
kernel.<br class=3D""></div><div class=3D"">Are you using Linux?<br =
class=3D""><br class=3D""></div><div class=3D"">Bye<br class=3D""><br =
class=3D""></div></div>-- <br class=3D""><div class=3D"gmail_signature" =
data-smartmail=3D"gmail_signature">&nbsp;Dr. Ludovic Rousseau</div>
</div></div>
_______________________________________________<br =
class=3D"">Pcsclite-muscle mailing list<br class=3D""><a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a><br =
class=3D"">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclit=
e-muscle</div></blockquote></div><br class=3D""></div></body></html>=

--Apple-Mail=_28CD11A4-C52B-4929-B3AF-E85408CDB44C--


--===============6406795020920303547==
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
--===============6406795020920303547==--