[pkg-gnupg-maint] Bug#814584: gnupg2: gpg2 --card-status fail on armel / Raspberry Pi - "Card error"

NIIBE Yutaka gniibe at fsij.org
Fri Aug 5 12:57:35 UTC 2016


On 08/05/2016 09:01 PM, Petter Reinholdtsen wrote:
> I decided to test again using an FreedomBox image to reduce the
> difference since my initial testing. First I tested using version
> 2.1.11-7 in Debian testing, and then using version 2.1.14-1 in Debian
> experimental.  Both fail.  First the test using testing.

Thank you for your time.

With 2.1.11-7:

> fbx at freedombox:~$ cat .gnupg/scdaemon.conf 
> debug-level guru
> debug-all
> debug-ccid-driver
> log-file /run/user/1000/scd.log
> verbose
> fbx at freedombox:~$ touch /run/user/1000/scd.log; tail -f /run/user/1000/scd.log &
> fbx at freedombox:~$ gpg2 --card-status                                           2016-05-22 00:57:45 scdaemon[15783] listening on socket '/home/fbx/.gnupg/S.scdaemon'
> 2016-05-22 00:57:45 scdaemon[15783] handler for fd -1 started
> 2016-05-22 00:57:45 scdaemon[15783] DBG: enter: apdu_open_reader: portstr=(null)
> 2016-05-22 00:57:45 scdaemon[15783] DBG: ccid-driver: using CCID reader 0 (ID=08E6:3438:X:0)
[...]
> 2016-05-22 00:57:45 scdaemon[15783] DBG: ccid-driver: usb_claim_interface failed: -1

I think that this failure is because of insufficient configuration of
the access permission.

Please read my message again:

    Message-ID: <5760E002.1090305 at fsij.org>

It is also available as:

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814584#30

Let's see the log of version 2.1.14-1:

> Next, after running 'apt install -t experimental gnupg2 scdaemon', I got
> this result:
> fbx at freedombox:~$ killall gpg-agent scdaemon          
> 2016-05-22 01:04:09 scdaemon[15783] DBG: chan_5 <- [eof]
> 2016-05-22 01:04:09 scdaemon[15783] handler for fd -1 terminated
> 2016-05-22 01:04:09 scdaemon[15783] SIGTERM received - still 0 running threads
> 2016-05-22 01:04:09 scdaemon[15783] scdaemon (GnuPG) 2.1.11 stopped
> fbx at freedombox:~$ 
> fbx at freedombox:~$ gpg2 --card-status                  
> 2016-05-22 01:04:17 scdaemon[16362] listening on socket '/run/user/1000/gnupg/S.scdaemon'
> 2016-05-22 01:04:17 scdaemon[16362] handler for fd -1 started
> 2016-05-22 01:04:17 scdaemon[16362] DBG: enter: apdu_open_reader: portstr=(null)
> 2016-05-22 01:04:17 scdaemon[16362] DBG: ccid-driver: usb_open failed: LIBUSB_ERROR_ACCESS

In 2.1.14, libusb has been changed, so, the error message is
different, but it also means access error.  It's highly likely access
permission problem.

> So I guess it is one step forward, two steps back. :(

We are still same place, I think.

>> Well, if you would like to change other factors to get success anyway,
>> I'd recommend to take some hardware approach which possibly may
>> stabilize the USB communication:
>>
>>   (1) Use good voltage supply to RPi board.
>>
>>   (2) Only connect the card reader (+ the smart card) to USB port of
>>       RPi so that we can minimize the load of USB.  If you connect
>>       keyboard and mouse, try good ones (or none by using the
>>       network).
>>
>>   (3) Use a USB HUB with an external voltage supply to connect the
>>       card reader.
> 
> I've tried all three adjustments, did not make a difference. :(

Please try again with proper permission.

> I bought the the card and reader I am using from
> <URL: http://shop.kernelconcepts.de/ >.  They work fine using amd64, but
> not at all using armel. :(

I don't know about FreedomBox image.  Apparently, udev rules doesn't
work well.  Please try manually chmod or chgrp device file under
/dev/bus/usb/
-- 



More information about the pkg-gnupg-maint mailing list